/nav-skill-creator
Analyze codebase patterns and create custom skills for repetitive workflows. Use when project needs automation or pattern enforcement. Auto-invoke when user says "create a skill for...", "automate this workflow", or "we keep doing X manually".
$ npx -y skills add alekspetrov/navigator --skill nav-skill-creator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/nav-skill-creator
Context preview
The summary Claude sees to decide when to auto-load this skill.
Analyze codebase patterns and create custom skills for repetitive workflows. Use when project needs automation or pattern enforcement. Auto-invoke when user says "create a skill for...", "automate this workflow", or "we keep doing X manually".
SKILL.md
nav-skill-creator.SKILL.mdname: nav-skill-creator
description: Analyze codebase patterns and create custom skills for repetitive workflows. Use when project needs automation or pattern enforcement. Auto-invoke when user says "create a skill for...", "automate this workflow", or "we keep doing X manually".
allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Task
version: 1.0.0
Navigator Skill Creator
Create project-specific skills by analyzing codebase patterns and automating repetitive workflows.
When to Invoke
Auto-invoke when user mentions:
- "Create a skill for [pattern]"
- "Automate this workflow"
- "We keep doing X manually"
- "Enforce this pattern"
- "Generate boilerplate for [feature type]"
- "We need consistency for [task type]"
What This Does
1. Analyzes codebase to understand project patterns 2. Identifies best practices from existing code 3. Generates skill with:
- Auto-invocation triggers
- Predefined functions
- Templates
- Examples
4. Tests the generated skill 5. Documents the new skill
Execution Steps
Step 1: Understand Skill Request
Ask clarifying questions:
- What pattern/workflow to automate?
- What triggers should invoke this skill?
- What output format is expected?
- Are there existing examples in the codebase?
**Example dialogue**:
User: "Create a skill for adding React components"
Assistant: "I'll analyze your codebase to understand React component patterns.
- What directory are components in?
- Do you use TypeScript or JavaScript?
- Do you want tests generated automatically?
- Are there style files (CSS/SCSS) per component?"
Step 2: Analyze Codebase Patterns
**Use Task agent to explore** (saves 60-80% tokens):
Use Task agent with subagent_type=Explore:
"Find existing [pattern type] in codebase:
- Locate all [files matching pattern]
- Identify common structure
- Extract best practices
- Find configuration files
- Return summary of findings"
**What to look for**:
- File naming conventions (kebab-case, PascalCase, etc.)
- Directory structure patterns
- Import/export patterns
- Testing patterns
- Configuration patterns
- Documentation patterns
**Example for React components**:
Task agent finds:
- Components in src/components/
- PascalCase naming (UserProfile.tsx)
- Co-located tests (UserProfile.test.tsx)
- Props interfaces defined above component
- Export default at bottom
Step 3: Design Skill Structure
**Determine skill metadata**:
name: [project]-[pattern-type]
description: [When to auto-invoke + what it does]
allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, Task]
version: 1.0.0
**Plan directory structure**:
skills/[skill-name]/
├── SKILL.md # Main instructions
├── functions/ # Python helper scripts
│ └── [generator].py
├── examples/ # Reference implementations
│ └── [example].[ext]
└── templates/ # Output format templates
└── [template].[ext]**Design predefined functions**:
- What repetitive logic can be automated?
- What validation should be enforced?
- What formatting ensures consistency?
**Example functions for frontend-component skill**:
- `component_generator.py` - Generate component boilerplate
- `test_generator.py` - Generate test file
- `style_generator.py` - Generate style file
- `name_validator.py` - Validate component naming
Step 4: Generate Skill Files
**4.1 Create SKILL.md**
---
name: [skill-name]
description: [Auto-invocation triggers + purpose]
allowed-tools: [List of tools]
version: 1.0.0
---
# [Skill Title]
[Brief description of what this skill does]
## When to Invoke
Auto-invoke when user says:
- "[trigger phrase 1]"
- "[trigger phrase 2]"
- "[trigger phrase 3]"
## What This Does
1. [Step 1 overview]
2. [Step 2 overview]
3. [Step 3 overview]
## Execution Steps
### Step 1: [Step Name]
[Detailed instructions for this step]
**Use predefined function**: `functions/[function-name].py`
**4.2 Create Predefined Functions**
# functions/[generator].py
def generate_[output](name, config):
"""
Generate [output type] based on project patterns.
Args:
name: [Description]
config: [Description]
Returns:
[output]: [Description]
"""
# Implementation based on codebase analysis
pass**4.3 Create Examples**
examples/
└── [reference-implementation].[ext]
- Real example from codebase (best practice)
- Shows expected structure
- Demonstrates conventions**4.4 Create Templates**
templates/
└── [output-template].[ext]
- Skeleton structure with placeholders
- ${VAR_NAME} for substitution
- Comments explaining sectionsStep 5: Test Generated Skill
**5.1 Verify skill loads**:
# In project root
grep -r "name: [skill-name]" skills/
**5.2 Test auto-invocation**:
In Claude Code conversation:
"[Use one of the auto-invoke trigger phrases]"
Expected: Skill should be detected and loaded
**5.3 Test execution**:
- Run through skill steps
- Verify functions work correctly
- Check output matches template
- Validate generated code follows patterns
**5.4 Iterate if needed**:
- Fix function bugs
- Improve templates
- Add missing examples
- Clarify instructions
Step 6: Document New Skill
**Update project documentation**:
1. **CLAUDE.md** - Add to skills section:
#### [Skill Name]
**Auto-invoke**: "[trigger phrase]"
**Purpose**: [What it does]
**Generates**: [Output type]
2. **README.md** - Add to skills list:
- **[skill-name]**: [Brief description]
3. **.agent/system/plugin-patterns.md** - Add to skill registry:
### [Skill Name]
**Created**: [Date]
**Pattern**: [What pattern it enforces]
**Functions**: [List of predefined functions]
**Register in plugin.json** (if applicable):
{
"skills": [
{
"name": "[skill-name]",
"path": "skills/[skill-name]/SKILL.md"
}
]
}---
Example Workflo
Read more
name: nav-skill-creator description: Analyze codebase patterns and create custom skills for repetitive workflows. Use when project needs automation or pattern enforcement. Auto-invoke when user says "create a skill for...", "automate this workflow", or "we keep doing X manually". allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Task version: 1.0.0
Navigator Skill Creator
Create project-specific skills by analyzing codebase patterns and automating repetitive workflows.
When to Invoke
Auto-invoke when user mentions:
- "Create a skill for [pattern]"
- "Automate this workflow"
- "We keep doing X manually"
- "Enforce this pattern"
- "Generate boilerplate for [feature type]"
- "We need consistency for [task type]"
What This Does
1. Analyzes codebase to understand project patterns 2. Identifies best practices from existing code 3. Generates skill with:
- Auto-invocation triggers
- Predefined functions
- Templates
- Examples
4. Tests the generated skill 5. Documents the new skill
Execution Steps
Step 1: Understand Skill Request
Ask clarifying questions:
- What pattern/workflow to automate?
- What triggers should invoke this skill?
- What output format is expected?
- Are there existing examples in the codebase?
**Example dialogue**:
User: "Create a skill for adding React components" Assistant: "I'll analyze your codebase to understand React component patterns. - What directory are components in? - Do you use TypeScript or JavaScript? - Do you want tests generated automatically? - Are there style files (CSS/SCSS) per component?"
Step 2: Analyze Codebase Patterns
**Use Task agent to explore** (saves 60-80% tokens):
Use Task agent with subagent_type=Explore: "Find existing [pattern type] in codebase: - Locate all [files matching pattern] - Identify common structure - Extract best practices - Find configuration files - Return summary of findings"
**What to look for**:
- File naming conventions (kebab-case, PascalCase, etc.)
- Directory structure patterns
- Import/export patterns
- Testing patterns
- Configuration patterns
- Documentation patterns
**Example for React components**:
Task agent finds: - Components in src/components/ - PascalCase naming (UserProfile.tsx) - Co-located tests (UserProfile.test.tsx) - Props interfaces defined above component - Export default at bottom
Step 3: Design Skill Structure
**Determine skill metadata**:
name: [project]-[pattern-type] description: [When to auto-invoke + what it does] allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, Task] version: 1.0.0
**Plan directory structure**:
skills/[skill-name]/
├── SKILL.md # Main instructions
├── functions/ # Python helper scripts
│ └── [generator].py
├── examples/ # Reference implementations
│ └── [example].[ext]
└── templates/ # Output format templates
└── [template].[ext]**Design predefined functions**:
- What repetitive logic can be automated?
- What validation should be enforced?
- What formatting ensures consistency?
**Example functions for frontend-component skill**:
- `component_generator.py` - Generate component boilerplate
- `test_generator.py` - Generate test file
- `style_generator.py` - Generate style file
- `name_validator.py` - Validate component naming
Step 4: Generate Skill Files
**4.1 Create SKILL.md**
--- name: [skill-name] description: [Auto-invocation triggers + purpose] allowed-tools: [List of tools] version: 1.0.0 --- # [Skill Title] [Brief description of what this skill does] ## When to Invoke Auto-invoke when user says: - "[trigger phrase 1]" - "[trigger phrase 2]" - "[trigger phrase 3]" ## What This Does 1. [Step 1 overview] 2. [Step 2 overview] 3. [Step 3 overview] ## Execution Steps ### Step 1: [Step Name] [Detailed instructions for this step] **Use predefined function**: `functions/[function-name].py`
**4.2 Create Predefined Functions**
# functions/[generator].py
def generate_[output](name, config):
"""
Generate [output type] based on project patterns.
Args:
name: [Description]
config: [Description]
Returns:
[output]: [Description]
"""
# Implementation based on codebase analysis
pass**4.3 Create Examples**
examples/
└── [reference-implementation].[ext]
- Real example from codebase (best practice)
- Shows expected structure
- Demonstrates conventions**4.4 Create Templates**
templates/
└── [output-template].[ext]
- Skeleton structure with placeholders
- ${VAR_NAME} for substitution
- Comments explaining sectionsStep 5: Test Generated Skill
**5.1 Verify skill loads**:
# In project root grep -r "name: [skill-name]" skills/
**5.2 Test auto-invocation**:
In Claude Code conversation: "[Use one of the auto-invoke trigger phrases]" Expected: Skill should be detected and loaded
**5.3 Test execution**:
- Run through skill steps
- Verify functions work correctly
- Check output matches template
- Validate generated code follows patterns
**5.4 Iterate if needed**:
- Fix function bugs
- Improve templates
- Add missing examples
- Clarify instructions
Step 6: Document New Skill
**Update project documentation**:
1. **CLAUDE.md** - Add to skills section:
#### [Skill Name] **Auto-invoke**: "[trigger phrase]" **Purpose**: [What it does] **Generates**: [Output type]
2. **README.md** - Add to skills list:
- **[skill-name]**: [Brief description]
3. **.agent/system/plugin-patterns.md** - Add to skill registry:
### [Skill Name] **Created**: [Date] **Pattern**: [What pattern it enforces] **Functions**: [List of predefined functions]
**Register in plugin.json** (if applicable):
{
"skills": [
{
"name": "[skill-name]",
"path": "skills/[skill-name]/SKILL.md"
}
]
}---
Example Workflo
Finish What You Start Sessions that last. AI that learns. Features that ship.
Repo: alekspetrov/navigator
Other skills on navigator.
- /backend-endpoint
Create REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create API", "new route", or "add route".
Open skill - /backend-test
Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".
Open skill - /database-migration
Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database".
Open skill - /frontend-component
Create React/Vue component with TypeScript, tests, and styles. Auto-invoke when user says "create component", "add component", "new component", or "build component".
Open skill - /frontend-test
Generate frontend component tests (React Testing Library, Vue Test Utils, snapshot) for existing components. Auto-invoke when user says "test this component", "write component test", or "add component test".
Open skill - /nav-brief
Render a one-screen intent brief (Goal/Scope/Approach/Limits/Verify/Won't-do) before implementing ambiguous task-shaped prompts, triggered by the nav_brief.py UserPromptSubmit hook. Confirms scope with max 2 open questions before touching files; detects brief drift mid-task.
Open skill

