The Power of Skill Composition
A single skill is useful. Multiple skills combined intelligently are exponentially more powerful. But beware: a poor combination can create conflicts, contradictions, and confusion.
Composition Principles
1. The Single Responsibility Principle
Each skill should have one clearly defined responsibility:
typescript-strict.md: TypeScript rulestesting-strategy.md: Testing strategyapi-conventions.md: API conventionssecurity-rules.md: Security rules
Bad practice: A mega-skill of 500 lines covering everything.
2. The Non-Contradiction Principle
Verify your skills do not contradict each other:
Conflict:
- Skill A: "Always use classes for services"
- Skill B: "Always use pure functions"
Solution: Define a clear hierarchy. The higher-level skill takes priority.
3. The Complementarity Principle
The best skill sets complement each other without overlap:
@base-conventions.md → Style and naming
@architecture-rules.md → Structure and patterns
@testing-standards.md → Tests and coverage
@security-policies.md → Security
@documentation-rules.md → Documentation
Each covers a distinct domain.
Common Composition Patterns
The Full Stack
For a full-stack web project:
# Full-Stack Composition
## Foundation
@company-standards.md
## Backend
@node-fastify.md
@prisma-database.md
@api-rest-conventions.md
## Frontend
@react-nextjs.md
@tailwind-styling.md
@accessibility.md
## Quality
@testing-vitest.md
@security-owasp.md
@documentation-jsdoc.md
The Specialist
For a specific in-depth domain:
# API Security Specialist
@api-design.md
@authentication-jwt.md
@rate-limiting.md
@input-validation.md
@cors-policy.md
@error-handling.md
The Workflow
For a complete work process:
# Development Workflow
@git-conventions.md
@branch-strategy.md
@code-review-process.md
@ci-cd-pipeline.md
@deployment-checklist.md
Managing Skill Conflicts
Detecting Conflicts
Signs of a skill conflict:
- Claude hesitates between two approaches
- Generated code is inconsistent
- Linting/type errors appear
Resolving Conflicts
Method 1: Explicit Priority
Add in your main CLAUDE.md:
## Rule Priority
In case of conflict between skills:
1. security-rules.md always takes priority
2. company-standards.md next
3. Project skills last
Method 2: Merging
If two skills overlap, create a merged skill that resolves ambiguities:
# Unified Style (replaces style-backend.md and style-frontend.md)
## Code style
- camelCase for variables (backend AND frontend)
- PascalCase for classes and components
- kebab-case for files
Method 3: Scoping
Limit each skill to a specific context:
## Application Context
- api-conventions.md applies ONLY to files in /src/api
- component-rules.md applies ONLY to files in /src/components
Optimizing Combined Skills Performance
Size Matters
Each skill consumes context. The more you combine, the more context is used. Optimize:
- Remove redundancies between skills
- Condense instructions without losing clarity
- Remove skills not relevant to current work
The Relevance Test
For each skill in your combination, ask yourself: "If I remove this skill, does the quality of generated code change?" If not, remove it.
The Right Balance
In practice, 5 to 8 skills is the sweet spot for most projects. Beyond that, returns diminish.
Creating Skill Presets
To simplify management, create presets by work type:
# preset-api.md
@base.md
@api-design.md
@database.md
@security.md
@testing.md
# preset-frontend.md
@base.md
@react.md
@tailwind.md
@accessibility.md
@testing.md
# preset-devops.md
@base.md
@docker.md
@ci-cd.md
@monitoring.md
Each developer activates the preset corresponding to their current task.
Conclusion
Skill composition is an art that improves with practice. Start simple with 2-3 skills, progressively add more, and watch for conflicts. The goal is not to have the maximum number of skills, but the right combination for your context.
Browse our skills library to find compatible skills and our practical guides for advanced techniques.