Create, repair, maintain, and consolidate skills...
This skill provides comprehensive skill lifecycle management: creation, repair, and maintenance.
Skills are modular, self-contained packages that extend Claude's capabilities by providing specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific domains or tasksβthey transform Claude from a general-purpose agent into a specialized agent equipped with procedural knowledge that no model can fully possess.
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
βββ SKILL.md (required)
β βββ YAML frontmatter metadata (required)
β β βββ name: (required)
β β βββ description: (required)
β βββ Markdown instructions (required)
βββ Bundled Resources (optional)
βββ scripts/ - Executable code (Python/Bash/etc.)
βββ references/ - Documentation intended to be loaded into context as needed
βββ assets/ - Files used in output (templates, icons, fonts, etc.)
Metadata Quality: The name and description in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
scripts/)Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
scripts/rotate_pdf.py for PDF rotation tasksreferences/)Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
references/finance.md for financial schemas, references/mnda.md for company NDA template, references/policies.md for company policies, references/api_docs.md for API specificationsassets/)Files not intended to be loaded into context, but rather used within the output Claude produces.
assets/logo.png for brand assets, assets/slides.pptx for PowerPoint templates, assets/frontend-template/ for HTML/React boilerplate, assets/font.ttf for typographySkills use a three-level loading system to manage context efficiently:
*Unlimited because scripts can be executed without reading into context window.
To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
For example, when building an image-editor skill, relevant questions include:
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
Conclude this step when there is a clear sense of the functionality the skill should support.
To turn concrete examples into an effective skill, analyze each example by:
Example: When building a pdf-editor skill to handle queries like "Help me rotate this PDF," the analysis shows:
scripts/rotate_pdf.py script would be helpful to store in the skillExample: When designing a frontend-webapp-builder skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
assets/hello-world/ template containing the boilerplate HTML/React project files would be helpful to store in the skillExample: When building a big-query skill to handle queries like "How many users have logged in today?" the analysis shows:
references/schema.md file documenting the table schemas would be helpful to store in the skillTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
When creating a new skill from scratch, always run the init_skill.py script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
Usage:
scripts/init_skill.py <skill-name> --path <output-directory>
The script:
scripts/, references/, and assets/After initialization, customize or remove the generated SKILL.md and example files as needed.
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
To begin implementation, start with the reusable resources identified above: scripts/, references/, and assets/ files. Note that this step may require user input. For example, when implementing a brand-guidelines skill, the user may need to provide brand assets or templates to store in assets/, or documentation to store in references/.
Also, delete any example files and directories not needed for the skill. The initialization script creates example files in scripts/, references/, and assets/ to demonstrate structure, but most skills won't need all of them.
Writing Style: Write the entire skill using imperative/infinitive form (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.
To complete SKILL.md, answer the following questions:
Once the skill is ready, it should be packaged into a distributable zip file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
scripts/package_skill.py <path/to/skill-folder>
Optional output directory specification:
scripts/package_skill.py <path/to/skill-folder> ./dist
The packaging script will:
Validate the skill automatically, checking:
Package the skill if validation passes, creating a zip file named after the skill (e.g., my-skill.zip) that includes all files and maintains the proper directory structure for distribution.
If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
Iteration workflow:
Skills can fail to load due to various issues. Common symptoms include:
Use the built-in repair functionality to automatically diagnose and fix common issues:
# Repair a specific skill
scripts/repair_skill.py <skill-name>
# Diagnose without repairing
scripts/repair_skill.py --diagnose <skill-name>
# List all skills with issues
scripts/repair_skill.py --list-issues
Problem: "Error: Unknown skill: my-skill-name" Solution: The repair script automatically adds missing skills to the skills.json registry with proper metadata extracted from SKILL.md.
Problem: YAML parsing errors or missing required fields Solution: The repair script fixes frontmatter format, adds missing required fields (name, description), and ensures proper YAML structure.
Problem: Missing SKILL.md or required directories Solution: The repair script identifies structural issues and provides guidance for fixing them.
Problem: Skill references undefined category in registry Solution: The repair script adds missing category definitions to skills.json.
For advanced users, skills.json can be manually edited:
{
"skills": {
"my-skill": {
"name": "My Skill Display Name",
"category": "create",
"triggers": ["using my skill", "activate my skill"],
"keywords": ["my", "skill", "automation"],
"activation_count": 0,
"last_used": null,
"related_skills": ["skill-creator-doctor"],
"description": "Skill description for discovery"
}
},
"categories": {
"create": {
"description": "Skills for building new components and features",
"color": "#45B7D1"
}
}
}
Regular maintenance ensures skills remain functional:
# Validate a single skill
python scripts/quick_validate.py <path/to/skill>
# Comprehensive system health check
scripts/repair_skill.py --list-issues
The ts-foundation-restorer skill was successfully repaired using this system:
Issue: Skill existed in filesystem but wasn't discoverable Root Cause: Missing registry entry in skills.json Solution: Added proper registry entry with metadata extracted from SKILL.md Result: Skill became discoverable and functional
This demonstrates how the repair system can quickly resolve skill loading failures without manual intervention.
Claude Code uses a declarative, prompt-based system for skill discovery. The system scans skills from multiple locations and loads metadata into the system prompt. Claude decides when to invoke skills based on textual descriptionsβthere's no algorithmic matching at the code level.
The most common cause of "Unknown skill" errors is YAML frontmatter validation failures.
Required Fields:
name: Must use lowercase letters, numbers, and hyphens only (kebab-case), max 64 charactersdescription: Brief description (max 1024 characters)Correct Format:
---
name: my-skill-name
description: Brief description of what the skill does and when to use it
---
Common Validation Failures:
β Title Case: name: My Skill Name
β snake_case: name: my_skill_name
β camelCase: name: mySkillName
β Underscores: name: my_skill_name
β XML tags: <name>my-skill</name>
β Reserved words: Names containing "anthropic", "claude"
Check for common issues:
# View the frontmatter
cat .claude/skills/my-skill/SKILL.md | head -n 15
# Common issues to look for:
# - Missing opening or closing ---
# - Tabs instead of spaces (use spaces only)
# - Unquoted strings with special characters
# - Extra spaces or hidden characters
Even if YAML looks correct, hidden characters can cause parsing failures:
# Check for hidden characters
cat -A .claude/skills/my-skill/SKILL.md | head -n 15
# Verify UTF-8 encoding
file .claude/skills/my-skill/SKILL.md
Ensure the directory structure is correct:
.claude/skills/my-skill/
βββ SKILL.md (required, exact capitalization)
The file must be named SKILL.md (all caps).
Claude Code maintains caches that may not refresh after skill modifications:
# Option 1: Use /clear command (may not fully clear skill cache)
# In Claude Code session, type:
/clear
# Option 2: Completely restart Claude Code (recommended)
# Exit current session and restart:
claude
For persistent cache issues:
~/Library/Caches/Claude/Create a test skill to isolate the issue:
mkdir -p .claude/skills/test-skill
cat > .claude/skills/test-skill/SKILL.md << 'EOF'
---
name: test-skill
description: Simple test skill for validation
---
# Test Skill
This is a test skill.
EOF
Restart Claude Code and test if the minimal skill works.
Skills may not load correctly when using the Claude Agent SDK compared to the standalone CLI. If you're using the SDK, this is a known issue where skills are not auto-discovered despite correct configuration.
/clear command may not fully clear skill-related cachesThe frontmatter parser is extremely strict and may reject files that appear valid. The parser specifically checks for:
Since some skills work correctly, compare their frontmatter format exactly:
# View working skill
cat .claude/skills/working-skill/SKILL.md | head -n 15
# View broken skill
cat .claude/skills/broken-skill/SKILL.md | head -n 15
# Look for differences in:
# - Spacing (tabs vs spaces)
# - Line endings (CRLF vs LF)
# - Character encoding
# - YAML structure
View logs to see specific skill loading errors:
~/Library/Logs/Claude/--verbose flagBased on troubleshooting experience, follow these steps in order:
Recreate the SKILL.md file with guaranteed-clean formatting:
Verify the exact name format:
---
name: my-skill-name
description: Your description here
---
Completely restart Claude Code:
claudeTest skill recognition:
If still failing, try renaming the skill:
my-skill or skill-fixThe inconsistency you're experiencing (some skills load, others don't with identical formats) suggests:
The fact that renaming doesn't help suggests the issue is likely in the file content itself (encoding, hidden characters, or YAML structure) rather than the name.
Manage growing skill collections by identifying duplicates, resolving conflicts, merging similar skills, and archiving obsolete skills. This ensures your skill ecosystem remains efficient, maintainable, and free of redundancy.
Build comprehensive inventory of all skills with usage statistics and metadata.
# Generate skill inventory
python scripts/scan_skills.py --output skill_inventory.json
What it does:
Output includes:
Identify merge candidates, trigger conflicts, and obsolete skills.
# Analyze for consolidation opportunities
python scripts/analyze_similarity.py --inventory skill_inventory.json --threshold 0.65
# Custom threshold
python scripts/analyze_similarity.py --inventory skill_inventory.json --threshold 0.80
Similarity Detection Methods:
Keyword/Trigger Overlap (Jaccard Similarity)
Content Similarity
Category Matching
Usage Statistics
Outputs:
skill_consolidation_report.md (human-readable recommendations)skill_analysis.json (detailed analysis data)Analyze the generated report and make informed decisions.
# Open the generated report
cat skill_consolidation_report.md
# Key sections to review:
# - High Priority Merge Candidates (>80% similarity)
# - Trigger Conflicts (ambiguous activations)
# - Obsolete Skills (unused or outdated)
# - Medium Priority Candidates (65-80% similarity)
Decision Criteria:
Merge When:
Archive When:
Safely merge similar skills while preserving functionality.
Natural Language Commands:
"Merge task-creator and task-manager based on the consolidation report"
"Combine these duplicate Vue debugging skills"
"Merge skill-a into skill-b, keep skill-b as primary"
Merge Process:
Registry Updates:
{
"merged_from": ["task-creator", "task-editor"],
"activation_count": 37, // Sum of both skills
"triggers": ["create task", "edit task", "manage tasks", "task operations"],
"last_used": "2025-11-13" // Most recent date
}
Clean up unused or outdated skills safely.
Natural Language Commands:
"Archive old-mongodb-helper skill, we migrated to PostgreSQL"
"Remove unused-experimental-skill, it was never activated"
"Archive all skills related to deprecated feature X"
Archive Process:
skills/archive/[skill-name]archived[date]/ARCHIVED.md Template:
# Archived: [skill-name]
**Archive Date:** 2025-11-13
**Reason:** [Archive reason]
**Original Description:** [Skill description]
## Archive Reason
[Detailed explanation of why skill was archived]
## Restoration Instructions
To restore this skill:
1. Move directory from `archive/` back to `skills/`
2. Add entry to `config/skills.json`
3. Update any related_skills references
4. Test skill loading
## Related Skills
[List of skills that referenced this skill]
Use consolidation features through natural conversation:
Analysis Commands:
Action Commands:
User: "I created task-creator and later task-manager. Are they duplicates?"
Claude analyzes:
- task-creator: "Create new tasks" (triggers: ["create task", "new task"], activations: 25)
- task-manager: "Create, edit, delete tasks" (triggers: ["manage tasks", "create task"], activations: 12)
Finding: 87% similar (overlapping triggers, similar purpose)
Recommendation: Merge into task-manager (more used, broader scope)
Execution:
- Merges both skills into task-manager
- Archives task-creator
- Updates registry with merged_from field
- Reports completion with consolidated triggers
User: "We migrated from MongoDB to PostgreSQL. Which skills should I clean up?"
Claude:
- Scans all skills
- Finds: mongodb-helper, mongo-query-builder, mongodb-schema
- Recommends: Archive all three, update database-helper to focus on PostgreSQL
Execution:
- Archives MongoDB skills with proper documentation
- Updates database-helper with PostgreSQL-specific content
- Removes MongoDB skills from registry
- Updates related_skills references
User: "Check for trigger conflicts"
Claude finds:
- "create task" used by: task-creator, task-manager, project-tasks
Recommendation:
- task-creator: Change to "create new task", "add task"
- task-manager: Keep "manage tasks", "organize tasks"
- project-tasks: Change to "create project task", "add to project"
Execution:
- Updates triggers in each skill's registry entry
- Validates no conflicts remain
- Reports updated trigger mappings
task-creator + task-editor β task-manager[domain]-[action]Scans skills directory and extracts comprehensive inventory including metadata, usage statistics, bundled resources analysis, and emoji assignments.
Analyzes skill inventory using multiple similarity detection methods to identify merge candidates, trigger conflicts, and obsolete skills. Generates detailed consolidation reports with emoji-enhanced displays.
Comprehensive emoji management utility for skills. Supports custom emoji assignment, conflict detection, category-based defaults, and batch operations. Integrates with both registry and SKILL.md frontmatter.
references/skill-consolidation-guide.md - Quick start guide with examplesskill_consolidation_report.md - Generated analysis reportskill_analysis.json - Detailed analysis dataManage visual identification of skills through custom emoji assignment. Emojis appear during skill activation and execution, providing instant recognition of active skills and better user experience.
Natural Language Commands:
"Assign π¨ emoji to ui-design skill"
"Set custom emoji for vue-debugging to π"
"Give the database-helper skill the ποΈ emoji"
Script Execution:
# Assign specific emoji to skill
python scripts/assign_emoji.py --skill vue-debugging --emoji "π"
# The system will:
# 1. Validate emoji character
# 2. Check for conflicts with other skills
# 3. Update skills.json registry
# 4. Update SKILL.md frontmatter
# 5. Report success or conflicts
Natural Language Commands:
"Assign π emoji to all debug skills"
"Set β‘ emoji for create category skills"
"Apply default emojis to all skills in fix category"
Script Execution:
# Assign emoji to entire category
python scripts/assign_emoji.py --category debug --emoji "π"
# System will:
# 1. Find all skills in the category
# 2. Check for emoji conflicts
# 3. Update all skills in category
# 4. Handle conflicts with user confirmation
Natural Language Commands:
"Auto-assign default emojis to all skills"
"Apply category-based emojis to skills without custom assignments"
"Set up emoji defaults for my entire skill collection"
Script Execution:
# Auto-assign based on categories
python scripts/assign_emoji.py --auto-assign
# System will:
# 1. Identify skills without emojis
# 2. Apply category default emojis
# 3. Handle conflicts intelligently
# 4. Report assignments and any conflicts
Natural Language Commands:
"Check for emoji conflicts in my skills"
"Show me which skills have duplicate emojis"
"Suggest alternative emojis for conflicting skills"
Script Execution:
# List all emoji assignments and conflicts
python scripts/assign_emoji.py --list
# The system will:
# 1. Show all emoji assignments
# 2. Highlight conflicts (multiple skills with same emoji)
# 3. List skills without emojis
# 4. Provide suggestions for resolution
Natural Language Commands:
"Suggest emojis for my new skill"
"What emoji would work best for api-integration skill?"
"Recommend emojis based on my skill description"
Script Execution:
# Get emoji suggestions for a skill
python scripts/assign_emoji.py --suggest skill-name
# System will:
# 1. Analyze skill name, category, and description
# 2. Suggest relevant emojis based on keywords
# 3. Check for conflicts with existing assignments
# 4. Provide context for each suggestion
The system includes built-in emoji defaults for common skill categories:
{
"emoji_defaults": {
"debug": "π", // Bug fixing and troubleshooting
"create": "β‘", // Building and creating
"fix": "π§", // Maintenance and repair
"optimize": "π", // Performance and optimization
"test": "π§ͺ", // Testing and validation
"analyze": "π", // Analysis and reporting
"implement": "π οΈ", // Implementation and development
"specialized": "β", // Specialized functionality
"meta": "π―", // Meta-skills and management
"emergency": "π¨", // Emergency and critical issues
"default": "βοΈ" // Generic fallback
}
}
Use the skill-folder-emoji-updater skill to synchronize folder names with registry assignments:
Natural Language Commands:
"Update all skill folders to match their registry emojis"
"Add π emoji to all debug skill folders"
"Make sure my skill folders have emoji prefixes"
Script Execution:
# Update all folders to match registry
python ../skill-folder-emoji-updater/scripts/update_folder_emojis.py --all
# Update specific category folders
python ../skill-folder-emoji-updater/scripts/update_folder_emojis.py --category debug
# Dry run to see what would change
python ../skill-folder-emoji-updater/scripts/update_folder_emojis.py --all --dry-run
Emoji Assignment:
Category Management:
Conflict Resolution:
Folder Integration:
Discovery and Analysis:
User: "Assign π¨ emoji to ui-design skill"
System:
β
Assigned emoji π¨ to skill: ui-design
β
Updated skills.json registry
β
Updated SKILL.md frontmatter
β
Updated display name: π¨ UI Design
Natural Language Usage:
- "π¨ Using ui-design skill for component styling"
- "π¨ UI Design skill activated for layout fixes"
User: "Assign π emoji to all debug skills"
System:
β οΈ Emoji conflicts detected for π:
- component-debugger (existing)
- vue-debugger (existing)
Continue anyway? (y/N): y
β
Assigned emoji π to 5 skills in category 'debug'
- api-debugger β π API Debugger
- performance-debug β π Performance Debug
- state-debugger β π State Debugger
- render-debug β π Render Debug
- memory-debug β π Memory Debug
User: "Update all skill folders to match their registry emojis"
System:
π Would rename 8 skill folders:
π vue-debugging (from: vue-debugging)
β‘ task-creator (from: task-creator)
π§ pinia-fixer (from: pinia-fixer)
π analytics (from: analytics)
...
Apply changes? (y/N): y
β
Updated 8 skill folders with emojis
{
"skills": {
"vue-debugging": {
"name": "Vue Debugging",
"emoji": "π",
"display_name": "π Vue Debugging",
"category": "debug"
}
}
}
---
name: vue-debugging
emoji: "π"
description: Debug Vue.js applications
---
Works With:
Enhanced Features:
CRITICAL: Before claiming ANY issue, bug, or problem is "fixed", "resolved", "working", or "complete", the following verification protocol is MANDATORY:
REQUIRED: Use the AskUserQuestion tool to explicitly ask the user to verify the fix:
"I've implemented [description of fix]. Before I mark this as complete, please verify:
1. [Specific thing to check #1]
2. [Specific thing to check #2]
3. Does this fix the issue you were experiencing?
Please confirm the fix works as expected, or let me know what's still not working."
Remember: The user is the final authority on whether something is fixed. No exceptions.