Agent skills inject full skill content into agent context at startup. Use this to give agents domain-specific knowledge, project patterns, or procedural expertise without manual context loading.
Now when the planner agent creates plans, it knows to:- Place endpoints in `src/routes/`- Extract business logic to `src/services/`- Use custom error classes- Follow project structure### Implementation with API Conventions```yaml---name: implementertools: ["Read", "Edit", "Bash"]skills: ["api-conventions", "error-handling"]---# ImplementerImplement features following API conventions and error handling patterns.
Skills:
---name: api-conventionsdescription: REST API design patterns---# API Conventions- Use camelCase for JSON properties- Use snake_case for database columns- Bearer token auth on all protected routes- Rate limiting: 100 req/min per IP- Pagination: ?page=1&limit=20 (default limit: 10, max: 100)- Error format: RFC 7807 (application/problem+json)
---name: naming-conventions---# Naming Conventions- camelCase for variables- PascalCase for classes- UPPER_SNAKE_CASE for constants- kebab-case for file names
Cost: ~50 tokens Impact: Minimal
Medium Skills (500-2000 tokens)
---name: api-conventions---# API Conventions[Detailed patterns, examples, error handling]
Cost: ~200-500 tokens Impact: Moderate (acceptable for frequently-used patterns)
Large Skills (>2000 tokens)
---name: complete-architecture-guide---# Complete Architecture Guide[Extensive documentation with many examples]
Cost: >500 tokens Impact: High (consider splitting or using on-demand)
Remove fluff. Be direct.Bad: “When you are implementing an API endpoint, it is important to remember that you should always validate user input before processing it.”Good: “Validate input before processing.”
2
Examples over prose
Code examples are more token-efficient than long explanations.
3
Split large skills
Instead of one large skill, create multiple focused skills:
api-conventions-routes
api-conventions-auth
api-conventions-errors
4
Use on-demand for heavy content
Large reference guides should be on-demand skills, not preloaded.
---name: project-patternsdescription: Common patterns in this project---# Project Patterns## Directory Structure[Explain structure]## Common Patterns### Pattern 1[Description]```typescript[Example]
</Accordion><Accordion title="API Conventions">```markdown---name: api-conventionsdescription: REST API design patterns---# API Conventions## Naming- Endpoints: plural nouns (`/users`, not `/user`)- Properties: camelCase- HTTP methods: GET, POST, PUT, DELETE## Authentication[Auth pattern with example]## Error Responses[Error format with example]## Pagination[Pagination pattern with example]