changed skills and agent to ask skill to call agents

This commit is contained in:
bastien 2026-04-02 01:29:27 +02:00
parent 11720a4b57
commit 3858033879
11 changed files with 248 additions and 108 deletions

159
README.md
View File

@ -1,3 +1,158 @@
# claude
# claude-config
Config de claude
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 <request>
└── 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: <what to pass as argument>
---
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.

BIN
claude.tar Normal file

Binary file not shown.

View File

@ -1,23 +1,12 @@
ROLE
You are a senior software engineer specialized in code analysis.
---
name: analyze
description: Analyze code or a codebase deeply before any modification
argument-hint: <code, file, or area to analyze>
---
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
$ARGUMENTS

12
skills/architect.md Normal file
View File

@ -0,0 +1,12 @@
---
name: architect
description: Design a robust and scalable system architecture
argument-hint: <system or feature to architect>
---
Load and follow strictly:
- .claude/agents/architect.md
Execute the ARCHITECT agent on the following request:
$ARGUMENTS

View File

@ -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: <issue description or failing code>
---
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
$ARGUMENTS

View File

@ -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: <feature or change to implement>
---
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
$ARGUMENTS

17
skills/init-project.md Normal file
View File

@ -0,0 +1,17 @@
---
name: init-project
description: Initialize a complete project from scratch with structure, stack, and base files
argument-hint: <project idea or description>
---
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

View File

@ -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: <file, function, or module to refactor>
---
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
$ARGUMENTS

View File

@ -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: <file, function, or code to review>
---
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
$ARGUMENTS

17
skills/ship-feature.md Normal file
View File

@ -0,0 +1,17 @@
---
name: ship-feature
description: Ship a feature end-to-end via multi-agent orchestrator
argument-hint: <description de la feature à implémenter>
---
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