enhance-skills
Review and optimize agent skill documentation.
Install
mkdir -p .claude/skills/enhance-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3675" && unzip -o skill.zip -d .claude/skills/enhance-skills && rm skill.zipInstalls to .claude/skills/enhance-skills
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when reviewing SKILL.md files for structure and trigger quality.Key capabilities
- →Analyze SKILL.md files for frontmatter compliance
- →Validate trigger phrase quality
- →Check tool restriction patterns
- →Verify context and agent configuration
- →Apply auto-fixes for common issues
How it works
It parses the skill definition against a set of structural and quality patterns to identify deviations from best practices.
Inputs & outputs
When to use enhance-skills
- →Improving skill documentation
- →Refining trigger phrases
- →Checking skill structure
About this skill
enhance-skills
Analyze skill definitions for trigger quality, structure, and discoverability.
Workflow
- Discover - Find all SKILL.md files
- Parse - Extract frontmatter and content
- Check - Run all pattern checks against knowledge below
- Filter - Apply certainty filtering
- Report - Generate markdown output
- Fix - Apply auto-fixes if --fix flag present
Skill Knowledge Reference
Frontmatter Fields (Complete Reference)
| Field | Required | Description | Validation |
|---|---|---|---|
name | No | Display name, defaults to directory name | lowercase, max 64 chars |
description | Recommended | What skill does and when to use | max 1024 chars, should include trigger |
argument-hint | No | Autocomplete hint, e.g., [file-path] | keep under 30 chars |
disable-model-invocation | No | true = manual only (for side effects) | boolean, default false |
user-invocable | No | false = hidden from / menu (auto-only) | boolean, default true |
allowed-tools | No | Tools Claude can use without permission | comma-separated list |
model | No | Specific model when skill is active | opus, sonnet, haiku |
context | No | fork = run in isolated subagent context | fork or omit |
agent | No | Subagent type for execution | Explore, Plan, general-purpose |
hooks | No | Skill-scoped lifecycle hooks | PreToolUse, PostToolUse |
Directory Structure
skills/my-skill/
├── SKILL.md # Required - core definition (under 500 lines)
├── reference.md # Optional - detailed documentation
├── examples.md # Optional - usage examples
└── scripts/ # Optional - helper scripts
└── helper.py
Storage Locations:
- Enterprise: Managed settings
- Personal:
~/.claude/skills/<name>/SKILL.md - Project:
.claude/skills/<name>/SKILL.md
Invocation Control Patterns
Manual Only (for skills with side effects):
---
name: deploy
description: Deploy to production
disable-model-invocation: true
---
Background Knowledge (auto-only, hidden from menu):
---
name: legacy-context
description: How the legacy payment system works
user-invocable: false
---
Full Access (default - both auto and manual):
---
name: review
description: Use when user asks to review code. Checks quality and security.
---
Trigger Phrases
Description should include trigger context for auto-discovery:
- "Use when user asks..."
- "Use when..."
- "Invoke when..."
Good: "Use when user asks to 'review code', 'check PR', or 'code review'"
Bad: "Reviews code" (no trigger context)
Dynamic Context Injection
Skills can inject dynamic content using backtick syntax:
---
name: pr-summary
description: Summarize PR changes
context: fork
agent: Explore
allowed-tools: Bash(gh:*)
---
## Pull request context
- PR diff: !`gh pr diff`
- PR comments: !`gh pr view --comments`
- Changed files: !`gh pr diff --name-only`
Rules:
- Use
!followed by backtick-wrapped command - Limit to 3 injections per skill
- Each injection adds to context budget
String Substitutions
| Variable | Description |
|---|---|
$ARGUMENTS | All arguments passed when invoking |
${CLAUDE_SESSION_ID} | Current session ID |
Context Budget
- Skill descriptions have ~15,000 character default limit
- Content beyond limit is truncated
- Check with
/contextcommand - Increase via:
SLASH_COMMAND_TOOL_CHAR_BUDGET=30000
Subagent Execution
When using context: fork:
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob
---
Research $ARGUMENTS thoroughly:
1. Find relevant files
2. Analyze the code
3. Summarize findings
Agent Types:
| Agent | Purpose | Tool Access |
|---|---|---|
Explore | Read-only codebase exploration | Read, Grep, Glob only |
Plan | Planning-focused reasoning | Read, analysis tools |
general-purpose | Full capabilities | All tools |
Skill-Scoped Hooks
---
name: secure-operations
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/security-check.sh"
---
Tool Restrictions
Use scoped tool patterns for security:
| Pattern | Meaning |
|---|---|
Bash(git:*) | Only git commands |
Bash(npm:*) | Only npm commands |
Bash(gh:*) | Only GitHub CLI |
Read(src/**) | Only files in src/ |
Detection Patterns
1. Frontmatter Validation (HIGH Certainty)
Required:
- YAML frontmatter with
---delimiters namefield (lowercase, max 64 chars)descriptionfield (max 1024 chars)
Recommended:
versionfield for trackingargument-hintfor skills accepting inputallowed-toolsfor securitymodelwhen specific model required
Flag:
- Missing frontmatter delimiters
- Invalid field values (uppercase name, description >1024 chars)
2. Trigger Quality (HIGH Certainty)
Check: Description includes trigger phrase Trigger patterns: "Use when", "Invoke when", "Use when user asks"
Flag:
- Description without trigger context
- Vague descriptions like "Useful tool" or "Does stuff"
3. Invocation Control (HIGH Certainty)
Check: Side-effect skills are protected
Flag:
- Skills with deploy/ship/publish in name but
disable-model-invocationnot set - Dangerous auto-invocable skills (can accidentally trigger)
4. Tool Restrictions (HIGH Certainty)
Check: Tools are appropriately scoped
Flag:
- Unrestricted
Bash(should beBash(git:*)or similar) - Read-only skills with Write/Edit
- Research skills with Task tool
5. Content Scope (MEDIUM Certainty)
Guidelines:
- SKILL.md under 500 lines
- Large content in
references/subdirectory - Max 3 dynamic injections
Flag:
- SKILL.md over 500 lines
- More than 3
!backtick`` injections - Embedded large examples (move to examples.md)
6. Structure Quality (MEDIUM Certainty)
Recommended Sections:
- Purpose/overview
- Required checks or workflow steps
- Output format
- Examples (if complex)
7. Context Configuration (MEDIUM Certainty)
Check: Context settings are appropriate
Flag:
context: forkwithoutagenttypeagenttype withoutcontext: fork- Mismatch between agent type and allowed-tools
8. Anti-Patterns (LOW Certainty)
- Vague descriptions without specific triggers
- Too many responsibilities (should split into multiple skills)
- Missing
argument-hintfor skills that clearly need input - Redundant chain-of-thought instructions (modern models don't need "think step by step")
Auto-Fix Implementations
1. Missing frontmatter
---
name: skill-name
description: "Use when..."
version: 4.2.0
---
2. Missing trigger phrase
Add "Use when user asks..." prefix to description
3. Unrestricted Bash
Replace Bash with Bash(git:*) or appropriate scope
Output Format
## Skill Analysis: {skill-name}
**File**: {path}
### Summary
- HIGH: {count} issues
- MEDIUM: {count} issues
### Frontmatter Issues ({n})
| Issue | Fix | Certainty |
### Trigger Issues ({n})
| Issue | Fix | Certainty |
### Invocation Issues ({n})
| Issue | Fix | Certainty |
### Tool Issues ({n})
| Issue | Fix | Certainty |
### Scope Issues ({n})
| Issue | Fix | Certainty |
Pattern Statistics
| Category | Patterns | Auto-Fixable |
|---|---|---|
| Frontmatter | 5 | 2 |
| Trigger | 2 | 1 |
| Invocation | 3 | 1 |
| Tool | 3 | 1 |
| Scope | 3 | 0 |
| Structure | 2 | 0 |
| Context | 3 | 0 |
| Anti-Pattern | 4 | 0 |
| Total | 25 | 5 |
<examples> ### Example: Missing Trigger Phrase
<bad_example>
name: code-review
description: "Reviews code for issues"
Why it's bad: No trigger context for auto-discovery. </bad_example>
<good_example>
name: code-review
description: "Use when user asks to 'review code', 'check this PR'. Reviews code for issues."
Why it's good: Clear trigger phrases enable auto-discovery. </good_example>
Example: Dangerous Auto-Invocation
<bad_example>
name: deploy
description: "Deploys code to production"
Why it's bad: Side-effect skill could be auto-invoked accidentally. </bad_example>
<good_example>
name: deploy
description: "Deploy to production environment"
disable-model-invocation: true
Why it's good: Manual-only prevents accidental deployments. </good_example>
Example: Unrestricted Tools
<bad_example>
name: git-helper
allowed-tools: Bash
Why it's bad: Unrestricted Bash allows any command. </bad_example>
<good_example>
name: git-helper
allowed-tools: Bash(git:*)
Why it's good: Scoped to only git commands. </good_example>
Example: Oversized Skill
<bad_example>
# Complex Analysis
[800 lines of detailed instructions]
Why it's bad: Large skills consume context budget (15K char limit). </bad_example>
<good_example>
# Complex Analysis
Core instructions here (under 500 lines).
For details, see `references/detailed-guide.md`.
Why it's good: Core skill is concise; details in separate files. </good_example>
Example: Context/Agent Mismatch
<bad_example>
name: researcher
context: fork
# Missing agent type
Why it's bad: Fork context without specifying agent type. </bad_example>
<good_example>
name: researcher
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob
Why it's good: Agent type matches allowed tools (Explore = read-only). </good_example> </examples>
Constraints
- Only apply auto-fixes for HIGH certainty issues
- Consider skill context when evaluating trigger quality
- Never remove content, only suggest improvements
- Validate against embedded knowledge refere
Content truncated.
When not to use it
- →Reviewing non-skill documentation
- →Analyzing general markdown files
Prerequisites
Limitations
- →Limited to predefined skill patterns
- →Auto-fixes only available for high-certainty issues
How it compares
It provides automated, framework-aware validation specifically for skill definitions, rather than generic markdown linting.
Compared to similar skills
enhance-skills side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| enhance-skills (this skill) | 1 | 5mo | Review | Intermediate |
| deepwiki-rs | 25 | 9mo | Review | Intermediate |
| python-code-style | 9 | 6mo | Review | Intermediate |
| code-review-excellence | 19 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by avifenesh
View all by avifenesh →You might also like
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
python-code-style
wshobson
Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.
code-review-excellence
wshobson
Master effective code review practices to provide constructive feedback, catch bugs early, and foster knowledge sharing while maintaining team morale. Use when reviewing pull requests, establishing review standards, or mentoring developers.
code-walk-thru
pchalasani
Use this when user wants you to walk through (code or text) files in a EDITOR to either explain how some code works, or to show the user what changes you made, etc. You would typically use this repeatedly to show the user your changes or code files one by one, sometimes with specific line-numbers. This way the user is easily able to follow along in their favorite EDITOR as you point at various files possibly at specific line numbers within those files.
cookbook-audit
anthropics
Audit an Anthropic Cookbook notebook based on a rubric. Use whenever a notebook review or audit is requested.
schema-markup
davila7
When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," or "breadcrumb schema." For broader SEO issues, see seo-audit.