From d368d2babb20be5e9d863c7d82f4f93af0cb28ab Mon Sep 17 00:00:00 2001 From: bastien Date: Thu, 2 Apr 2026 01:29:27 +0200 Subject: [PATCH] changed skills and agent to ask skill to call agents --- README.md | 159 +++++++++++++++++- claude.tar | Bin 0 -> 31744 bytes skills/analyze.md | 29 +--- skills/architect.md | 12 ++ skills/debug.md | 30 +--- skills/implement.md | 31 +--- skills/init-project.md | 17 ++ skills/refactor.md | 30 +--- skills/review.md | 31 +--- skills/ship-feature.md | 17 ++ .../CLAUDE.md => templates/project-CLAUDE.md | 0 11 files changed, 248 insertions(+), 108 deletions(-) create mode 100644 claude.tar create mode 100644 skills/architect.md create mode 100644 skills/init-project.md create mode 100644 skills/ship-feature.md rename projet/CLAUDE.md => templates/project-CLAUDE.md (100%) diff --git a/README.md b/README.md index 3b0a3f2..d718a98 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,158 @@ -# claude +# claude-config -Config de claude \ No newline at end of file +Global Claude Code configuration — agents, skills, and project templates. + +--- + +## Overview + +This repo contains the global Claude Code setup used across all projects. + +``` +claude-config/ +├── CLAUDE.md # Global coding preferences (style, rules, workflow) +├── agents/ # Specialized agent definitions (called by skills or orchestrators) +├── skills/ # Slash commands (/analyze, /debug, /ship-feature, ...) +└── templates/ + └── project-CLAUDE.md # Template for per-project .claude/CLAUDE.md +``` + +**Architecture principle:** +- `skills/` = entry points you invoke manually via `/skill-name` +- `agents/` = execution units called by skills or by orchestrator agents +- A skill delegates to one or more agents — it never contains logic itself + +--- + +## Installation + +Clone the repo and symlink it into `~/.claude/`: + +```bash +git clone git@github.com:youruser/claude-config.git ~/claude-config + +mkdir -p ~/.claude + +ln -sf ~/claude-config/agents ~/.claude/agents +ln -sf ~/claude-config/skills ~/.claude/skills +ln -sf ~/claude-config/CLAUDE.md ~/.claude/CLAUDE.md +``` + +Symlinks mean any update to this repo is immediately active — no manual sync needed. + +Verify the skills are loaded: + +```bash +claude +/skills +``` + +You should see all custom skills listed (`analyze`, `debug`, `ship-feature`, etc.). + +--- + +## Available slash commands + +| Command | Description | +|---|---| +| `/analyze` | Deep analysis of code or a codebase before any modification | +| `/architect` | Design a robust and scalable system architecture | +| `/debug` | Find root cause and fix an issue precisely | +| `/implement` | Implement a feature following project conventions | +| `/refactor` | Improve code quality without changing behavior | +| `/review` | Strict code review with severity-graded issues | +| `/init-project` | Initialize a complete project from scratch (orchestrator) | +| `/ship-feature` | Deliver a feature end-to-end via multi-agent pipeline (orchestrator) | + +Orchestrators (`/init-project`, `/ship-feature`) coordinate multiple agents sequentially with validation gates. +Standalone skills (`/analyze`, `/debug`, etc.) invoke a single specialized agent. + +--- + +## Agent pipeline (ship-feature) + +``` +/ship-feature + └── ship-feature (orchestrator) + ├── analyzer → understand the problem + ├── designer → design the solution + ├── [validation gate — waits for user approval] + ├── implementer → write the code + ├── reviewer → review loop (max 3 iterations) + └── tester → define test strategy +``` + +--- + +## Per-project setup + +Each project gets its own `.claude/CLAUDE.md` for local context and overrides. + +```bash +# In your project root +mkdir -p .claude +cp ~/claude-config/templates/project-CLAUDE.md .claude/CLAUDE.md +``` + +Then fill in the relevant sections: build commands, test commands, conventions, +architecture, and any exceptions to global rules. + +**Override rules:** +- Local `.claude/` takes precedence over global `~/.claude/` for identical filenames +- Files not defined locally fall back to global automatically +- Use local overrides only for project-specific deviations — keep global rules generic + +--- + +## Updating + +```bash +cd ~/claude-config +git pull +``` + +Changes are immediately active via symlinks. No restart needed for agents and skills +(Claude Code reloads them at the start of each session). + +--- + +## Adding a new skill or agent + +**New standalone skill** (single agent): + +1. Create `agents/myagent.md` — define role, tasks, rules, output format +2. Create `skills/myskill.md`: + +```markdown +--- +name: myskill +description: One-line description of what this skill does +argument-hint: +--- + +Load and follow strictly: +- .claude/agents/myagent.md + +Execute the MYAGENT agent on the following request: + +$ARGUMENTS +``` + +**New orchestrator skill** (multiple agents): + +1. Create `agents/myorchestrator.md` — define the workflow and agent call sequence +2. Create `skills/myorchestrator.md` referencing all involved agents + +--- + +## Extending per project + +If a project needs a modified version of an agent, place it in `.claude/agents/`: + +```bash +# Override the implementer for a specific project +cp ~/claude-config/agents/implementer.md .claude/agents/implementer.md +# Edit to add project-specific constraints +``` + +The local version takes precedence. All other agents continue to load from global. \ No newline at end of file diff --git a/claude.tar b/claude.tar new file mode 100644 index 0000000000000000000000000000000000000000..f53dab9ddf6854499895f090c261d3fda13facf1 GIT binary patch literal 31744 zcmeHQTXGvmmen^SxQC3^d}zXiL{OwS;h5+MGzrPDDN+MKvfY10AOTdXPz6^NNYM-E z1eJh#Tysln6dB}ge_;+}C_=JD) zZ~d=aYag^tf3mXw?e=~f`@ehtL%H7KAAJ9xn$BtG?)KLE zd~8dQMLst5%$h}6oM(1!{BQdyt?D$Nn(C^m?ff}kd~?=0+1`3r7USi}n#7DU3#yV+ zRi%}=OzT;(tl89}sN~%uTh?ijSMqwR)nY5}`e)yEkA~*$*>Tr&j*ol8-q|T{v`lXd zoJuEGY~pWrRGa#0VOMUH_NQf9T8z0UGIYV4M>9M6Xwpe|E6GZmjIWH$q2ePan2edH zm5gdsrgb_>GBdWLwBqojcOBiZGx%<>Hk#6A_9DqKv!tvmQ%q#VM#b2kCzXsZTFlY1 zEHMjnZfD6wT9l#tv0YfKc|J<5jOm+nI?M21ZAKVET_!0onol3wnsYDH>ZAM)tCGym z)9Dg}X9IXrN8EpZ(jDlCPYcYcN~bxS!H>$XKYtJESfJ=M&8;mR%)cw`#A3+le1ZPSr{;uA{HFtovF=-pmwertSLWQX7{fu$c>}pX! zWUlP*M#u^DPucL-q5pP!x4q8)Umoml=>M0}^q0IxZZ+t=IgRx{$J?pE8y@ykjO)@ zfIIZR_FjA4{?g>B*_FARCAGOsDmM>1W|yyv42T!2sTZ_A!g@vak@7`8Cde(a zBDmjJl+B=hT2Vd)ZUwTJd2UCLJYhXEqgj%JSwvjx8dDI1-9@S#X;Kz*H$FCqdr+Fo z#3birW+NGxyD_GE%^|tp2?TUV$1-$sqg+h0QO~{C=5_Cf-sv0D?|$f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!)r=G|!>TyrP&W>sO;GvK!etp9J@HA2t8uokc zV~M;nj8KSdRxGTbVx!teWI`cB;y|Jr6XER3*=ugjEsPk>$%6e_3wwY7m|Z4U5Z+v2 z35X4)FB!qja;bf*8_(9=drBx$H6kmD1&$!A$wG$>HMd++oUQ@iWK~k^oln64mBbJ) zdWVyp-7>w#w|npbpMic>@|UfYbQ-HNpY0aY1G|&}kBLBh`1E1S0H)9?`O!&E%9Zp= zMfJdeb6=xuK91%d5agy}#+W>YXftoHu|~PpfM`;a2JAs +--- -OBJECTIF -Understand the provided code or project deeply before any modification. +Load and follow strictly: +- .claude/agents/analyzer.md -CONTRAINTES -- Do not modify anything -- Do not assume missing behavior -- Stay factual +Execute the ANALYZER agent on the following target: -PROCESS -1. Identify the purpose of the code -2. Identify main components (functions, modules, flows) -3. Explain data flow -4. Detect potential issues or unclear parts -5. Highlight complexity or risks - -OUTPUT -- Summary of what the code does -- Key components -- Data flow explanation -- Risks / unclear areas \ No newline at end of file +$ARGUMENTS diff --git a/skills/architect.md b/skills/architect.md new file mode 100644 index 0000000..e1429d0 --- /dev/null +++ b/skills/architect.md @@ -0,0 +1,12 @@ +--- +name: architect +description: Design a robust and scalable system architecture +argument-hint: +--- + +Load and follow strictly: +- .claude/agents/architect.md + +Execute the ARCHITECT agent on the following request: + +$ARGUMENTS diff --git a/skills/debug.md b/skills/debug.md index 8a8e13d..180fad7 100644 --- a/skills/debug.md +++ b/skills/debug.md @@ -1,24 +1,12 @@ -ROLE -You are a senior engineer specialized in debugging. +--- +name: debug +description: Find root cause and fix an issue precisely +argument-hint: +--- -OBJECTIF -Find root cause and fix the issue. +Load and follow strictly: +- .claude/agents/debugger.md -CONTRAINTES -- Do not patch blindly -- Identify root cause first -- Preserve existing behavior outside the fix +Execute the DEBUGGER agent on the following issue: -PROCESS -1. Understand expected behavior -2. Reconstruct failing scenario -3. Trace execution path -4. Identify root cause -5. Implement minimal fix -6. Check for side effects - -OUTPUT -- Root cause -- Fix explanation -- Code changes -- Edge cases to watch \ No newline at end of file +$ARGUMENTS diff --git a/skills/implement.md b/skills/implement.md index bf027c8..33090e6 100644 --- a/skills/implement.md +++ b/skills/implement.md @@ -1,25 +1,12 @@ -ROLE -You are a senior engineer implementing a feature. +--- +name: implement +description: Implement a feature cleanly following project conventions +argument-hint: +--- -OBJECTIF -Implement the requested feature cleanly and safely. +Load and follow strictly: +- .claude/agents/implementer.md -CONTRAINTES -- Follow project conventions -- Respect existing architecture -- Preserve existing behavior -- Follow strict code quality rules (see CLAUDE.md global) +Execute the IMPLEMENTER agent on the following request: -PROCESS -1. Analyze existing code -2. Identify integration points -3. Propose minimal design -4. Implement step by step -5. Ensure no regression -6. Keep code readable and modular - -OUTPUT -- Explanation of approach -- Code changes -- Impacted parts -- Potential risks \ No newline at end of file +$ARGUMENTS diff --git a/skills/init-project.md b/skills/init-project.md new file mode 100644 index 0000000..ee47cb9 --- /dev/null +++ b/skills/init-project.md @@ -0,0 +1,17 @@ +--- +name: init-project +description: Initialize a complete project from scratch with structure, stack, and base files +argument-hint: +--- + +Load and follow strictly: +- .claude/agents/init-project.md +- .claude/agents/analyzer.md +- .claude/agents/designer.md +- .claude/agents/implementer.md +- .claude/agents/reviewer.md +- .claude/agents/tester.md + +Execute the orchestrator defined in .claude/agents/init-project.md with the following request: + +$ARGUMENTS diff --git a/skills/refactor.md b/skills/refactor.md index 1f033f7..6d79c80 100644 --- a/skills/refactor.md +++ b/skills/refactor.md @@ -1,24 +1,12 @@ -ROLE -You are a senior engineer performing a safe refactor. +--- +name: refactor +description: Improve code quality without changing behavior +argument-hint: +--- -OBJECTIF -Improve code quality without changing behavior. +Load and follow strictly: +- .claude/agents/refactorer.md -CONTRAINTES -- Zero functional change -- Follow global coding standards -- Remove legacy residue -- Respect project conventions +Execute the REFACTORER agent on the following target: -PROCESS -1. Identify problems (complexity, duplication, readability) -2. Propose refactor plan -3. Apply small safe transformations -4. Ensure behavior is unchanged -5. Remove outdated or unused code - -OUTPUT -- What was improved -- Before/after reasoning -- Any deviations from standards (with justification) -- Confirmation that no old logic remains \ No newline at end of file +$ARGUMENTS diff --git a/skills/review.md b/skills/review.md index 0daa6fd..4909f38 100644 --- a/skills/review.md +++ b/skills/review.md @@ -1,25 +1,12 @@ -ROLE -You are a strict but pragmatic code reviewer. +--- +name: review +description: Strict code review with severity-graded issues +argument-hint: +--- -OBJECTIF -Evaluate code quality and compliance with standards. +Load and follow strictly: +- .claude/agents/reviewer.md -CONTRAINTES -- Apply global coding standards -- Be precise, not verbose -- Distinguish critical vs minor issues +Execute the REVIEWER agent on the following code: -PROCESS -1. Check structure and readability -2. Check function size and responsibilities -3. Check parameters and variables -4. Check naming clarity -5. Detect code smells -6. Identify deviations from standards -7. Evaluate justification of deviations - -OUTPUT -- Critical issues -- Improvements -- Deviations from standard -- Justified vs unjustified deviations \ No newline at end of file +$ARGUMENTS diff --git a/skills/ship-feature.md b/skills/ship-feature.md new file mode 100644 index 0000000..9fe37a1 --- /dev/null +++ b/skills/ship-feature.md @@ -0,0 +1,17 @@ +--- +name: ship-feature +description: Ship a feature end-to-end via multi-agent orchestrator +argument-hint: +--- + +Load and follow strictly these agent files: +- .claude/agents/ship-feature.md +- .claude/agents/analyzer.md +- .claude/agents/designer.md +- .claude/agents/implementer.md +- .claude/agents/reviewer.md +- .claude/agents/tester.md + +Execute the orchestrator defined in .claude/agents/ship-feature.md with the following request: + +$ARGUMENTS diff --git a/projet/CLAUDE.md b/templates/project-CLAUDE.md similarity index 100% rename from projet/CLAUDE.md rename to templates/project-CLAUDE.md