skill-generator
Meta-skill for creating, refining, and managing Agent Skills. Use when needing to create new skills, improve existing skills, analyze skill performance, or teach the agent new capabilities. Enables self-improvement and knowledge capture.
When & Why to Use This Skill
The Skill Generator is a powerful meta-capability designed to automate the creation, refinement, and management of Claude Agent Skills. It empowers users to capture domain-specific expertise, encode complex multi-step workflows, and build a self-evolving library of reusable AI capabilities. By transforming repeated patterns into structured skills, it significantly enhances agent consistency, reduces token consumption, and enables the AI to adapt to specific project requirements and technical environments.
Use Cases
- Standardizing Debugging: Automatically generating specialized debug skills (e.g., debug-nextjs, debug-prisma) after identifying recurring error patterns in a project.
- Encoding Project Conventions: Creating feature-specific skills that encapsulate local coding standards, API route structures, and component patterns for consistent code generation.
- Workflow Automation: Packaging multi-step procedural knowledge, such as database migration steps or deployment sequences, into executable process skills.
- Knowledge Capture: Converting proprietary documentation or unique domain knowledge that Claude doesn't possess by default into a structured, reusable skill format.
- Continuous Improvement: Analyzing the performance of existing skills and refining their instructions or examples to improve accuracy and reliability over time.
| name | skill-generator |
|---|---|
| description | Meta-skill for creating, refining, and managing Agent Skills. Use when needing to create new skills, improve existing skills, analyze skill performance, or teach the agent new capabilities. Enables self-improvement and knowledge capture. |
| author | coachone |
| version | "1.0" |
| compatibility | Works with any VS Code Insiders with chat.useAgentSkills enabled |
🧬 Skill Generator - Self-Evolving Capabilities
This skill enables the agent to create, refine, and manage new skills autonomously, capturing learned patterns and domain expertise into reusable capabilities.
When to Create a New Skill
Create a skill when you observe:
- Repeated context provided across multiple conversations
- Domain-specific knowledge that Claude doesn't have by default
- Multi-step workflows that benefit from consistent execution
- Project-specific conventions that should be encoded
- Debugging patterns discovered during problem resolution
Skill Creation Workflow
Step 1: Identify the Need
Ask yourself:
- Is this knowledge reusable across sessions?
- Would encoding this save significant tokens in future conversations?
- Does this represent procedural knowledge Claude lacks?
Step 2: Design the Skill Structure
skill-name/
├── SKILL.md # Required: Main instructions (<500 lines)
├── scripts/ # Optional: Executable code
│ └── helper.ts
├── references/ # Optional: Detailed documentation
│ └── REFERENCE.md
└── assets/ # Optional: Templates, data
└── template.md
Step 3: Write the SKILL.md
Template:
---
name: [lowercase-hyphen-name]
description: [What it does AND when to use it. Max 1024 chars. Be specific with keywords.]
metadata:
author: [author]
version: "1.0"
---
# [Skill Title]
## Quick Reference
[Table or list of most common operations]
## Core Functionality
[Main instructions, organized by task]
## Examples
[Concrete input/output examples]
## Guidelines
[Rules and constraints]
Step 4: Validate the Skill
Checklist before saving:
- Name is lowercase with hyphens only
- Description includes WHAT and WHEN
- SKILL.md body < 500 lines
- No time-sensitive information
- Consistent terminology
- Clear examples provided
- File references are one level deep
Skill Categories for This Project
Debug Skills (.github/skills/debug-*)
For capturing debugging patterns:
debug-nextjs- Next.js specific debuggingdebug-prisma- Database debuggingdebug-react-query- State management debugging
Feature Skills (.github/skills/feature-*)
For feature development patterns:
feature-api-routes- API route conventionsfeature-components- Component patterns
Process Skills (.github/skills/process-*)
For workflow automation:
process-deploy- Deployment proceduresprocess-migration- Database migrations
Auto-Generation from Debug Sessions
When a debug session reveals new patterns, create a skill:
## Pattern Discovered: [Name]
**Problem Type**: [category]
**Root Cause**: [description]
**Solution Pattern**: [reusable fix]
**Prevention Strategy**: [how to avoid]
→ Suggest: Create skill `debug-[category]` capturing this pattern
Skill Evolution
Improving Existing Skills
When a skill proves insufficient:
- Identify the gap
- Propose enhancement
- Add to appropriate section (or new reference file)
- Update version in metadata
Deprecating Skills
When a skill becomes obsolete:
- Add deprecation notice at top of SKILL.md
- Point to replacement skill
- Remove after migration period
Example: Creating a Debug Skill
After discovering a recurring Next.js hydration issue pattern:
---
name: debug-hydration
description: Diagnose and fix React hydration mismatches in Next.js. Use when seeing hydration errors, content flickering, or server/client mismatches.
metadata:
author: coachone
version: "1.0"
---
# Hydration Debugging
## Quick Diagnosis
1. Check browser console for specific hydration error
2. Identify the component mentioned in error
3. Compare server-rendered HTML with client-rendered output
## Common Causes
| Symptom | Cause | Fix |
|---------|-------|-----|
| Date/time mismatch | Server/client timezone | Use `suppressHydrationWarning` or standardize timezone |
| Random IDs | useId() not used | Replace Math.random() with React.useId() |
| Browser APIs | window/document access | Check typeof window !== 'undefined' |
| Extension interference | Browser extensions | Test in incognito mode |
## Fix Patterns
### Pattern 1: Deferred Client Rendering
\`\`\`tsx
const [mounted, setMounted] = useState(false);
useEffect(() => setMounted(true), []);
if (!mounted) return <Skeleton />;
return <DynamicContent />;
\`\`\`
### Pattern 2: Suppress Warning (use sparingly)
\`\`\`tsx
<time suppressHydrationWarning>{new Date().toLocaleString()}</time>
\`\`\`
Skill Discovery Tips
Skills are activated when their description matches user intent. Write descriptions that:
- Use specific keywords users might mention
- Cover synonyms and alternative phrasings
- Describe both the capability AND the trigger context
Good: "Debug and fix React hydration errors, content mismatches between server and client rendering, SSR issues" Bad: "Helps with React problems"
File Locations
Skills for this project should be created in:
.github/skills/[skill-name]/
├── SKILL.md
└── [optional resources]