From skills-toolkit
Refines and validates existing Claude Code skills for clarity, efficiency, and production readiness. Use for improving structure, best practices, token reduction, and production checks.
npx claudepluginhub full-stack-biz/claude-skills-toolkit --plugin skills-toolkitThis skill is limited to using the following tools:
Systematically improve and validate Claude Code skills while preserving functionality and following established patterns.
references/80-percent-rule.mdreferences/advanced-patterns.mdreferences/allowed-tools.mdreferences/ask-user-question-patterns.mdreferences/content-guidelines.mdreferences/movement-pattern.mdreferences/preservation-rules.mdreferences/production-patterns.mdreferences/refinement-guardrails.mdreferences/refinement-workflow.mdreferences/validation-checklist.mdGuides creation, modification, validation, and troubleshooting of Claude Code skills: YAML frontmatter standards, progressive disclosure patterns, structural types (workflow, task, reference), trigger optimization, and best practices.
Audits Claude Code skills for violations, gaps, and improvements in frontmatter, structure, and quality across 7 dimensions. Outputs structured repair plans with severities.
Creates, updates, validates, and canonicalizes Claude Code skills. Use for new skill creation, modifications, structure checks, format fixes, or legacy migrations.
Share bugs, ideas, or general feedback.
Systematically improve and validate Claude Code skills while preserving functionality and following established patterns.
Step 0: Detect Predating Context (Escape Hatch)
Check conversation history:
IF PREDATING CONTEXT EXISTS → Offer escape hatch immediately:
questions: [
{
question: "I've reviewed the skill and context you provided. How would you like to proceed?",
header: "Interview Style",
options: [
{
label: "Infer from context",
description: "I'll infer refinement needs from what you shared. Skip detailed interview (faster)"
},
{
label: "Define explicitly",
description: "I'll ask you to explicitly define improvement areas and goals (full interview)"
}
],
multiSelect: false
}
]
Then route:
IF NO PREDATING CONTEXT → Continue to Step 1
Step 1: Use AskUserQuestion to ask: "What skill do you want to work on?" (open-form text input)
Step 2: Use AskUserQuestion with predefined options to ask:
questions: [
{
question: "What would you like to do with this skill?",
header: "Action",
options: [
{
label: "Refine",
description: "Improve clarity, structure, efficiency, token usage, or organization"
},
{
label: "Validate",
description: "Check if it's production-ready (tool scoping, completeness, error handling, trigger phrases)"
}
],
multiSelect: false
}
]
Step 3: Route based on their selection:
When user requests refinement:
skills/skill-name/, .claude/skills/skill-name/~/.claude/skills/skill-name/~/.claude/plugins/cache/) → REFUSE: "That's an installed copy (read-only)"After locating the skill, interview to gather what they want improved using AskUserQuestion with proper options.
🔴 BATCH 1: Refinement Focus (Progressive AskUserQuestion - ask one at a time):
questions: [
{
question: "What aspects need improvement?",
header: "Focus Areas",
options: [
{ label: "Clarity", description: "Make instructions clearer, remove jargon, improve examples" },
{ label: "Efficiency", description: "Reduce token usage, consolidate references, optimize content" },
{ label: "Structure", description: "Reorganize sections, improve flow, better grouping" },
{ label: "User Interaction UX", description: "Convert free-form interactions to AskUserQuestion patterns, improve workflows" }
],
multiSelect: true
}
]
questions: [
{
question: "What specific problems are you seeing?",
header: "Key Issues"
}
]
(Examples: "Instructions are hard to follow", "References scattered and redundant", "Too many nested sections")
questions: [
{
question: "What would success look like?",
header: "Success Metric"
}
]
(Examples: "Clearer workflow", "Fewer token costs", "Production-ready with error handling")
questions: [
{
question: "Any areas to exclude or preserve as-is?",
header: "Scope Limits"
}
]
(Examples: "Keep the validation gates", "Don't change tool scoping")
After gathering ALL responses, document approved scope and proceed to BATCH 2.
🟢 BATCH 2: Implementation Details (Use AskUserQuestion with predefined options)
ROUTING NOTE:
questions: [
{
question: "Should we consolidate related reference files to reduce scattered content?",
header: "References",
options: [
{ label: "Yes", description: "Merge related files for clarity" },
{ label: "No", description: "Keep current structure" }
],
multiSelect: false
},
{
question: "Should we also validate against production standards?",
header: "Production Validation",
options: [
{ label: "Yes", description: "Check error handling, tool scoping, security" },
{ label: "No", description: "Skip production validation" }
],
multiSelect: false
},
{
question: "Should we add testing & validation patterns (evaluation framework, test patterns, quality gates)?",
header: "Testing & Validation",
options: [
{ label: "Yes", description: "Add evaluation framework and quality gates" },
{ label: "No", description: "Skip testing patterns" }
],
multiSelect: false
}
]
After gathering ALL responses, document approved scope and proceed.
Load workflow reference
references/refinement-workflow.md for the complete refinement workflow with all preservation gates and validation phasesIdentify consolidation opportunities (BEFORE changes)
references/ directory with line countsApply preservation gates (CRITICAL - four gates, in order)
Make changes (following movement pattern)
Validate result (seven phases)
When user requests validation:
Locate the skill (same as refinement step 1)
Run validation phases (seven phases, systematic)
name, descriptionallowed-tools against actual tool usage. Principle of least privilege applied?Generate validation report
SEQUENCE (never violate order):
1. CREATE/UPDATE destination file(s) with merged content
2. LINK - Update SKILL.md pointers to new destination(s)
3. DELETE old source (only after links verified and tested)
NEVER: DELETE → LINK → CREATE (creates broken links and lost content)
Visual flow:
❌ WRONG ✅ CORRECT
DELETE old source CREATE destination
│ │
▼ ▼
LINK to new location LINK pointers
│ │
▼ ▼
CREATE destination DELETE old source
(broken links!) (safe, links verified)
references/80-percent-rule.md for full decision framework.✅ PREFERRED - Project paths (search first):
skills/skill-name/ in plugin projects.claude/skills/skill-name/ in any project⚠️ CONDITIONAL - User-space (only if not in project):
~/.claude/skills/skill-name/ - WARN: "Affects all projects"❌ FORBIDDEN - Never edit (REFUSE IMMEDIATELY):
~/.claude/plugins/cache/* (installed plugins - read-only)/cache/ (always read-only)Remove jargon, improve examples, restructure for flow
→ references/ask-user-question-patterns.md for interaction patterns
→ references/content-guidelines.md for description improvement
→ references/anti-patterns.md for what NOT to do
Apply 80% rule, consolidate references, optimize content
→ references/80-percent-rule.md for content distribution decisions
→ references/skill-workflow.md for detailed framework
→ references/movement-pattern.md for safe migration procedure
Reorganize sections, improve grouping, better information flow
→ references/refinement-workflow.md for unified workflow with gates
→ references/movement-pattern.md for safe content relocation
→ references/advanced-patterns.md for archetype structures
Never break existing behavior, never delete without knowing where content goes
→ references/preservation-rules.md for what NEVER gets cut
→ references/refinement-guardrails.md for safe patterns
→ references/movement-pattern.md for CREATE → LINK → DELETE sequence
Check production readiness, tool scoping, completeness
→ references/validation-checklist.md for comprehensive assessment
→ references/production-patterns.md for error handling and team patterns
→ references/allowed-tools.md for tool scoping validation
Complete workflow with all phases and preservation gates
→ references/refinement-workflow.md
Finding skills efficiently:
skills/ or .claude/skills/ (search project first)~/.claude/skills/ (only if not in project)Glob pattern: **/SKILL.md to find all skills in projectWizard pattern (progressive disclosure):
Production patterns:
Preservation principle:
Scenario 1: "Simplify this skill" → Focus on clarity: restructure sections, improve examples, simplify language → Identify redundancy in references, suggest consolidation → Verify 80% rule for SKILL.md body content
Scenario 2: "Reduce token usage"
→ Apply 80% rule: identify supplementary content used in <20% of cases (e.g., error handling for rare failure modes) that can move to references
→ Keep core content (80%+ usage) in SKILL.md (e.g., standard error handling patterns)
→ Consolidate related reference files
→ Verify activation doesn't suffer from moved content
→ See references/80-percent-rule.md for decision examples
Scenario 3: "Improve user interaction UX"
→ Audit all AskUserQuestion calls (max 4 options, progressive disclosure)
→ Convert free-form instructions to predefined AskUserQuestion options where applicable
→ Ensure questions follow wizard pattern (ask → wait → ask, not forms)
→ Verify descriptions are clear and help users make good choices
→ Check for >4 options violations (split into multiple AskUserQuestion batches)
→ See references/ask-user-question-patterns.md for patterns and decision trees
Scenario 3.5: "Improve reference quality"
→ Audit every reference link: does it provide context about what agents will find?
→ Pattern check: [Core knowledge] + See references/file.md for [edge cases/depth]
→ Flag orphaned links (bare links with no context): "This reference might not get loaded because agents don't know what's in it"
→ Offer: "Let's add context snippets so agents load references intentionally, not out of uncertainty"
→ Improves token efficiency: references only load when truly needed
Scenario 4: "Check if this skill is production-ready"
→ Run full validation phases (all 7 phases)
→ Check: error handling, tool scoping, clear trigger phrases, comprehensive testing
→ Flag missing production patterns (error handling, validation scripts, security review). See references/production-patterns.md for team patterns.
→ Generate detailed report with findings and recommendations
Scenario 5: "Offer to help during skill work" → Detect user is working with skills (reading SKILL.md, editing references, etc.) → Offer: "I can help refine this skill (clarity, efficiency) or validate it. Want me to?" → If yes, use appropriate workflow above
Token efficiency: Skill-refiner itself should stay <500 lines (this body content). Reference files contain detailed workflows—loaded on-demand only.
Auto-activation signals: Watch for user requests containing: "refine", "improve", "make clearer", "reduce tokens", "validate", "check if ready", "is this production-ready", or when user is actively modifying skill files.
Error handling: If skill files can't be located, are malformed, or have structural issues, report specific problems and suggest solutions rather than failing silently.
Version tracking: Track changes made to skills during refinement (which files modified, what changed). Helps users understand impact of refinements.