Common patterns and architectures for building Claude Code skills. Use when deciding how to structure a skill, choosing between skill patterns, designing multi-step workflows, or when the user asks "what kind of skill should I build" or "how should I structure this skill".
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Common patterns and architectures for building Claude Code skills. Use when deciding how to structure a skill, choosing between skill patterns, designing multi-step workflows, or when the user asks "what kind of skill should I build" or "how should I structure this skill".
Skill Patterns
Choose the pattern that best fits your skill's purpose. Most skills use one primary pattern, sometimes combining elements from others.
Pattern 1: Sequential Workflow
Use when: Users need multi-step processes executed in a specific order.
Key techniques:
Explicit step ordering with numbered steps
Dependencies between steps (output of step N feeds step N+1)
Validation gates between steps
Rollback instructions for failures
Structure:
## Workflow: [Name]### Step 1: [Action]
[What to do]
Expected output: [What success looks like]
### Step 2: [Action]
Requires: Output from Step 1
[What to do]
### Step 3: [Action]
[What to do]
## Rollback
If Step 2 fails:
1. [Undo Step 1]
2. [Report error]
Use when: The same goal requires different approaches depending on context.
Key techniques:
Decision tree based on input characteristics
Different tool selection per branch
Fallback options
Transparency about choices made
Structure:
## Decision Tree### Check 1: [Condition]- If [A]: proceed to Path A
- If [B]: proceed to Path B
- Otherwise: proceed to Default Path
### Path A: [Name]
[Specific instructions for this case]
### Path B: [Name]
[Specific instructions for this case]
### Default Path
[Safe fallback instructions]
## Reporting
Always explain which path was chosen and why.
Many skills combine patterns. A deployment skill might use Sequential Workflow as the primary pattern with Context-Aware Routing to handle different environments, and Iterative Refinement for the validation step.
Skill Sizing Guidelines
Skill Size
Lines in SKILL.md
Supporting Files
Use Case
Small
< 100
None
Single concept, simple reference
Medium
100-300
0-2
Workflow, moderate reference
Large
300-500
2-5
Complex workflow, extensive reference
If SKILL.md exceeds 500 lines, split content into supporting files. Keep SKILL.md focused on core instructions and navigation.