| name | add-skill |
| description | Add specialized craft skills to agents. Default craft principles always active. Everything MUST respect the craft philosophy. |
| user-invocable | false |
| context | conversation |
| allowed-tools | Read, Write, Bash, Task, AskUserQuestion |
Clean Claude Add-Skill โ Extend Agent Expertise
Craft principles are ALWAYS active. Add specialized expertise on top.
The Craft Foundation
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ ๐๏ธ CRAFT FOUNDATION (Always Active) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โข SOLID Principles โ Single responsibility, Open/closed, etc. โ
โ โข Clean Architecture โ Dependencies point inward โ
โ โข Hexagonal (Ports & Adapters) โ Domain at center โ
โ โข Explicit Error Handling โ Result<T, E>, no throw โ
โ โข Type Safety โ Strict mode, no any โ
โ โข Immutability โ Const by default โ
โ โข Tested โ Code always has tests (BDD style) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Syntax
/add-skill <agent> <skill> [--scope <path>]
/add-skill --list
Examples
/add-skill architect DDD
/add-skill architect CQRS
/add-skill architect CQRS --scope src/orders
/add-skill backend-engineer Event-Sourcing
/add-skill frontend-engineer React-Patterns
/add-skill qa-engineer Property-Testing
/add-skill --list
Skill Validation โ Craft Guard
Every skill MUST respect the craft philosophy.
When you add a skill, Clean Claude validates it:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ /add-skill architect DDD โ
โ โ
โ โ
VALIDATION โ
โ โ
โ 1. Is DDD craft-aligned? โ
โ โ Domain at center โ aligns with Hexagonal โ
โ โ Bounded contexts โ aligns with Clean Architecture โ
โ โ Aggregates โ aligns with Single Responsibility โ
โ โ Value Objects โ aligns with Immutability โ
โ โ
โ 2. Does it conflict with existing skills? โ
โ โ No conflicts โ
โ โ
โ โ
APPROVED: DDD is craft-aligned โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
What Gets Rejected
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ /add-skill architect "Throw exceptions everywhere" โ
โ โ
โ โ REJECTED โ
โ โ
โ This skill violates craft principles: โ
โ โ Conflicts with: Explicit Error Handling โ
โ โ Reason: throw is implicit, Result<T, E> is explicit โ
โ โ
โ Suggestion: Use "Explicit-Errors" skill instead โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Available Skills (Craft-Aligned)
All these skills have been validated against the craft philosophy:
Architecture Skills
| Skill | Description | Craft Alignment |
|---|
DDD | Domain-Driven Design | โ
Domain-first, bounded contexts |
CQRS | Command Query Responsibility Segregation | โ
Single responsibility, explicit |
Event-Sourcing | Event store, projections, replay | โ
Immutability, explicit state |
Hexagonal-Advanced | Deep ports & adapters patterns | โ
Extension of core Hexagonal |
Modular-Monolith | Module boundaries, internal APIs | โ
Bounded contexts, clean deps |
Frontend Skills
| Skill | Description | Craft Alignment |
|---|
React-Patterns | Compound components, custom hooks | โ
Composition, single responsibility |
State-Machines | XState, statecharts | โ
Explicit state, predictable |
A11y-Expert | Accessibility deep-dive | โ
Domain (user needs) first |
Performance | Core Web Vitals optimization | โ
Measurable, testable |
Backend Skills
| Skill | Description | Craft Alignment |
|---|
API-Design | REST best practices, HATEOAS | โ
Explicit contracts, testable |
GraphQL | Schema design, resolvers | โ
Type-safe, explicit |
Message-Queues | Event-driven patterns | โ
Decoupling, explicit |
Caching | Cache strategies, invalidation | โ
Explicit, predictable |
Testing Skills
| Skill | Description | Craft Alignment |
|---|
Testing-Advanced | Mocking strategies, test doubles | โ
Extension of core testing |
BDD | Gherkin, behavior specs | โ
Domain language, explicit |
Contract-Testing | Pact, consumer-driven | โ
Explicit contracts |
Property-Testing | QuickCheck-style, fuzzing | โ
Exhaustive, type-driven |
How It Works
Adding a Skill
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ /add-skill architect DDD โ
โ โ
โ 1. CRAFT VALIDATION โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ Is DDD craft-aligned? โ
โ
โ โ Any conflicts? None โ
โ
โ โ
โ 2. SKILL GENERATION โ
โ โโโโโโโโโโโโโโโโโโโโโ โ
โ โ Use architect agent to generate DDD skill document โ
โ โ Include: principles, patterns, examples, checklist โ
โ โ Store in .clean-claude/skills/ddd.md โ
โ โ
โ 3. CODEBASE ANALYSIS โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Architect analyzes code through DDD lens โ
โ โ Identifies: bounded contexts, aggregates, violations โ
โ โ Generates refactoring plan โ
โ โ
โ 4. USER APPROVAL โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ Show analysis and plan โ
โ โ User approves/modifies/rejects โ
โ โ
โ 5. REACTIVE LOOP (if approved) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Architect designs changes โ
โ โ Engineers implement โ
โ โ QA verifies โ
โ โ Loop until green โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Listing Skills
> /add-skill --list
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ACTIVE SKILLS โ
โ โ
โ ๐๏ธ CRAFT FOUNDATION (Always Active) โ
โ โข SOLID โ
โ โข Clean Architecture โ
โ โข Hexagonal โ
โ โข Explicit Errors โ
โ โข Type Safety โ
โ โข Immutability โ
โ โข Tested โ
โ โ
โ โ ADDED SKILLS โ
โ โข architect: DDD (added 2024-01-15) โ
โ โข architect: CQRS (added 2024-01-16) โ
โ โข qa-engineer: Property-Testing (added 2024-01-16) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Storage
.clean-claude/
โโโ context.json # Includes active skills
โโโ skills/
โ โโโ ddd.md # Generated skill document
โ โโโ cqrs.md # Generated skill document
โ โโโ ...
โโโ refactoring-plans/
โโโ ddd-2024-01-15.md # Refactoring plan if applied
context.json with Skills
{
"stack": { ... },
"craftFoundation": [
"SOLID",
"Clean-Architecture",
"Hexagonal",
"Explicit-Errors",
"Type-Safety",
"Immutability",
"Tested"
],
"addedSkills": [
{
"name": "DDD",
"agent": "architect",
"addedAt": "2024-01-15T10:30:00Z",
"scope": null
},
{
"name": "CQRS",
"agent": "architect",
"addedAt": "2024-01-16T09:00:00Z",
"scope": "src/features/orders"
}
]
}
Skill Injection into Agents
When agents are spawned, they receive:
- Craft Foundation โ Always (non-negotiable)
- Stack Defaults โ Generated for your exact stack
- Project Patterns โ Learned from your clean code
- Added Skills โ Custom skills you've added
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ AGENT CONTEXT = Foundation + Stack + Patterns + Skills โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ SOLID โ โ React โ โ Your โ โ DDD โ โ
โ โ Clean โ โ Query โ โ naming โ โ CQRS โ โ
โ โ Hexa โ โ patterns โ โ patterns โ โ etc. โ โ
โ โ Tested โ โ โ โ โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโ โ
โ Foundation Stack Defaults Learned Added โ
โ (Always) (Generated) (If clean) (Manual) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Implementation
Step 1: Parse Arguments
type Command =
| { type: 'add'; agent: string; skill: string; scope?: string }
| { type: 'list' };
Step 2: Validate Against Craft (for add)
Task(
subagent_type: "architect",
prompt: """
Validate if this skill is CRAFT-ALIGNED:
Skill: DDD (Domain-Driven Design)
Target Agent: architect
Check against craft foundation:
1. Does it align with SOLID?
2. Does it align with Clean Architecture?
3. Does it align with Hexagonal?
4. Does it align with Explicit Errors?
5. Does it align with Type Safety?
6. Does it align with Immutability?
7. Does it include tests?
If ANY conflict โ REJECT with explanation
If aligned โ APPROVE with alignment notes
"""
)
Step 3: Generate Skill Document (if approved)
Task(
subagent_type: "architect",
prompt: """
Generate an expert-level skill document for: DDD
Structure:
## Core Principles
## Tactical Patterns (with TypeScript examples)
## Strategic Patterns
## Integration with Craft Foundation
## Checklist for Code Review
## Anti-patterns to Avoid
IMPORTANT: All examples must use Result<T, E>, strict types, etc.
"""
)
Step 4: Analyze and Propose (if requested)
Same reactive flow as before โ analyze codebase, propose plan, loop.
Example Session
> /add-skill --list
๐๏ธ CRAFT FOUNDATION (Always Active)
โข SOLID โข Clean Architecture โข Hexagonal
โข Explicit Errors โข Type Safety โข Immutability โข Tested
โ ADDED SKILLS
(none)
> /add-skill architect DDD
โ
Validating DDD against craft principles...
โ Aligns with SOLID (aggregates = single responsibility)
โ Aligns with Clean Architecture (domain at center)
โ Aligns with Hexagonal (bounded contexts as ports)
๐ Generating DDD skill document...
โ Stored in .clean-claude/skills/ddd.md
๐ Analyzing codebase with DDD lens...
๐ Analysis Complete
## Bounded Contexts Identified
- Users (current)
- Orders (current)
- Payments (referenced)
## Violations Found
| File | Issue | Priority |
|------|-------|----------|
| UserService.ts | Anemic domain model | ๐ด High |
| Order.ts | No aggregate boundaries | ๐ด High |
## Refactoring Plan
1. **Phase 1**: Create User aggregate
2. **Phase 2**: Create Order aggregate with items
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[Approve & Implement] [Modify Scope] [Just add skill, don't refactor] [Cancel]
> Just add skill, don't refactor
โ
DDD added to architect
> /add-skill --list
๐๏ธ CRAFT FOUNDATION (Always Active)
โข SOLID โข Clean Architecture โข Hexagonal
โข Explicit Errors โข Type Safety โข Immutability โข Tested
โ ADDED SKILLS
โข architect: DDD
Tone
- Craft-first: Everything validates against craft principles
- Educational: Explain WHY a skill aligns (or doesn't)
- Additive: Skills enrich, they don't replace
- Permanent: Once added, skills stay (craft accumulates)