Skill Generator
A meta-skill that instructs the agent when and how to create new project-specific skills. As a project evolves — new modules, recurring patterns, adopted libraries — this skill guides the generation of tailored SKILL.md files that capture those conventions.
When to Activate
- After implementing a significant new module or feature that introduces conventions not covered by existing skills
- When the agent notices recurring patterns across multiple files that aren't captured by any current skill
- When a new integration, library, or framework is adopted into the project
- When explicitly asked to generate or create a new skill
Core Concepts
- Project-specific skills live in
.ai/skills/project/ — separated from vendored generic skills so make ai re-vendoring won't overwrite them
- Skills are instructional, not executable — they guide agent behavior through clear prose, not runnable code
- Minimum complexity threshold — don't create a skill for a one-off pattern; wait until it recurs across at least 2-3 files or modules
- Skills should be composable — reference existing skills rather than duplicating their content
Detailed Guidance
Trigger Detection
Before generating a skill, verify one of these conditions holds:
- New module or feature: A distinct area of the codebase was created (e.g., a new API layer, a new UI component system, a queue worker) with its own conventions.
- Recurring pattern: The same pattern has appeared in 2+ places and is likely to appear again (e.g., a specific error handling approach, a data transformation pipeline).
- New dependency: A library or service was integrated that requires specific usage patterns (e.g., an ORM, a message broker, a third-party SDK).
Analysis Phase
Before writing the skill file:
- Scan relevant code — read the files where the pattern exists. Identify the conventions: naming, structure, error handling, testing approach.
- Check existing skills — search
.ai/skills/ for overlap. If an existing skill covers 80%+ of the pattern, extend it instead of creating a new one.
- Extract concrete examples — pull real code snippets from the project to use as examples in the skill.
- Identify the audience — the skill is read by an AI agent, not a human developer. Write for clarity and precision.
Generation
Create the skill file at .ai/skills/project/{domain}/SKILL.md using the canonical template from .ai/template/SKILL.md.
Naming convention:
- Use the domain name as the directory:
.ai/skills/project/{domain}/SKILL.md
- Domain names should be lowercase, hyphenated, and descriptive:
api-layer, queue-workers, auth-flow
Required sections:
- Frontmatter with
name, version, description, triggers
When to Activate — specific to the project context
Core Concepts — 3-5 key conventions
Detailed Guidance — the main content with project-specific patterns
Examples — real code from the project (not hypothetical)
Guidelines — numbered, verifiable rules
Integration — references to related generic and project skills
Validation Checklist
Before finalizing the new skill:
- No duplication — the skill doesn't restate what an existing skill already covers
- Has real examples — includes at least one code example from the actual project
- Proper frontmatter —
name, version (start at 1.0.0), description, triggers are all present
- Actionable guidelines — each guideline is something an agent can verify against code
- Correct output path — file is in
.ai/skills/project/, not in the vendored .ai/skills/ root
Update vs Create
- Update an existing project skill when the pattern it describes has evolved (new edge cases, changed conventions, additional examples).
- Create a new skill when the pattern is clearly distinct from all existing skills.
- Detect staleness — if a skill references files, functions, or patterns that no longer exist in the codebase, update or retire it.
Examples
Trigger: A new event-driven module was added using a custom event bus.
Generated skill at .ai/skills/project/event-bus/SKILL.md:
---
name: event-bus
version: 1.0.0
description: Conventions for the project's custom event bus — event naming, handler structure, and testing.
triggers: [event, event-bus, handler, listener, dispatch]
---
# Event Bus Conventions
## When to Activate
- Creating a new event or event handler
- Modifying existing event dispatching logic
- Writing tests for event-driven flows
## Core Concepts
- Events are named as past-tense domain actions: `OrderPlaced`, `UserRegistered`
- Handlers are single-responsibility: one handler per side-effect
- All handlers must be idempotent
## Detailed Guidance
...
## Examples
// Real code from src/events/OrderPlaced.ts
...
Guidelines
- Only generate a skill when a pattern recurs across 2+ files or a significant new module is introduced
- Always check existing skills for overlap before creating a new one
- Place project-specific skills in
.ai/skills/project/, never in the vendored skills root
- Include at least one real code example from the project
- Use the canonical template structure from
.ai/template/SKILL.md
- Start version at
1.0.0 and increment on updates
- Keep skills focused — one domain per skill, not a catch-all
Integration
- Depends on:
recursive-exploration (for codebase scanning during analysis phase)
- Related:
project-bootstrap (generates the initial project skill; skill-generator handles ongoing evolution)
- Template:
.ai/template/SKILL.md (canonical structure for all generated skills)
Skill Metadata
- Created: 2025-07-01
- Last Updated: 2025-07-01
- Author: didacrios
- Version: 1.0.0
1---2name: skill-generator3description: Meta-skill for creating new project-specific skills as the codebase evolves.4---56# Skill Generator78A meta-skill that instructs the agent when and how to create new project-specific skills. As a project evolves — new modules, recurring patterns, adopted libraries — this skill guides the generation of tailored SKILL.md files that capture those conventions.910## When to Activate11- After implementing a significant new module or feature that introduces conventions not covered by existing skills12- When the agent notices recurring patterns across multiple files that aren't captured by any current skill13- When a new integration, library, or framework is adopted into the project14- When explicitly asked to generate or create a new skill1516## Core Concepts17- **Project-specific skills live in `.ai/skills/project/`** — separated from vendored generic skills so `make ai` re-vendoring won't overwrite them18- **Skills are instructional, not executable** — they guide agent behavior through clear prose, not runnable code19- **Minimum complexity threshold** — don't create a skill for a one-off pattern; wait until it recurs across at least 2-3 files or modules20- **Skills should be composable** — reference existing skills rather than duplicating their content2122## Detailed Guidance2324### Trigger Detection2526Before generating a skill, verify one of these conditions holds:27281. **New module or feature:** A distinct area of the codebase was created (e.g., a new API layer, a new UI component system, a queue worker) with its own conventions.292. **Recurring pattern:** The same pattern has appeared in 2+ places and is likely to appear again (e.g., a specific error handling approach, a data transformation pipeline).303. **New dependency:** A library or service was integrated that requires specific usage patterns (e.g., an ORM, a message broker, a third-party SDK).3132### Analysis Phase3334Before writing the skill file:35361. **Scan relevant code** — read the files where the pattern exists. Identify the conventions: naming, structure, error handling, testing approach.372. **Check existing skills** — search `.ai/skills/` for overlap. If an existing skill covers 80%+ of the pattern, extend it instead of creating a new one.383. **Extract concrete examples** — pull real code snippets from the project to use as examples in the skill.394. **Identify the audience** — the skill is read by an AI agent, not a human developer. Write for clarity and precision.4041### Generation4243Create the skill file at `.ai/skills/project/{domain}/SKILL.md` using the canonical template from `.ai/template/SKILL.md`.4445**Naming convention:**46- Use the domain name as the directory: `.ai/skills/project/{domain}/SKILL.md`47- Domain names should be lowercase, hyphenated, and descriptive: `api-layer`, `queue-workers`, `auth-flow`4849**Required sections:**50- Frontmatter with `name`, `version`, `description`, `triggers`51- `When to Activate` — specific to the project context52- `Core Concepts` — 3-5 key conventions53- `Detailed Guidance` — the main content with project-specific patterns54- `Examples` — real code from the project (not hypothetical)55- `Guidelines` — numbered, verifiable rules56- `Integration` — references to related generic and project skills5758### Validation Checklist5960Before finalizing the new skill:61621. **No duplication** — the skill doesn't restate what an existing skill already covers632. **Has real examples** — includes at least one code example from the actual project643. **Proper frontmatter** — `name`, `version` (start at `1.0.0`), `description`, `triggers` are all present654. **Actionable guidelines** — each guideline is something an agent can verify against code665. **Correct output path** — file is in `.ai/skills/project/`, not in the vendored `.ai/skills/` root6768### Update vs Create6970- **Update** an existing project skill when the pattern it describes has evolved (new edge cases, changed conventions, additional examples).71- **Create** a new skill when the pattern is clearly distinct from all existing skills.72- **Detect staleness** — if a skill references files, functions, or patterns that no longer exist in the codebase, update or retire it.7374## Examples7576**Trigger:** A new event-driven module was added using a custom event bus.7778**Generated skill at `.ai/skills/project/event-bus/SKILL.md`:**7980```markdown81---82name: event-bus83version: 1.0.084description: Conventions for the project's custom event bus — event naming, handler structure, and testing.85triggers: [event, event-bus, handler, listener, dispatch]86---8788# Event Bus Conventions8990## When to Activate91- Creating a new event or event handler92- Modifying existing event dispatching logic93- Writing tests for event-driven flows9495## Core Concepts96- Events are named as past-tense domain actions: `OrderPlaced`, `UserRegistered`97- Handlers are single-responsibility: one handler per side-effect98- All handlers must be idempotent99100## Detailed Guidance101...102103## Examples104// Real code from src/events/OrderPlaced.ts105...106```107108## Guidelines1091. Only generate a skill when a pattern recurs across 2+ files or a significant new module is introduced1102. Always check existing skills for overlap before creating a new one1113. Place project-specific skills in `.ai/skills/project/`, never in the vendored skills root1124. Include at least one real code example from the project1135. Use the canonical template structure from `.ai/template/SKILL.md`1146. Start version at `1.0.0` and increment on updates1157. Keep skills focused — one domain per skill, not a catch-all116117## Integration118- Depends on: `recursive-exploration` (for codebase scanning during analysis phase)119- Related: `project-bootstrap` (generates the initial project skill; skill-generator handles ongoing evolution)120- Template: `.ai/template/SKILL.md` (canonical structure for all generated skills)121122## Skill Metadata123- Created: 2025-07-01124- Last Updated: 2025-07-01125- Author: didacrios126- Version: 1.0.0