From enhance
Analyzes SKILL.md files for frontmatter validation, trigger quality, directory structure, and discoverability. Reports issues and applies auto-fixes with --fix flag.
npx claudepluginhub agent-sh/enhance --plugin enhanceThis skill uses the workspace's default tool permissions.
Analyze skill definitions for trigger quality, structure, and discoverability.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Analyze skill definitions for trigger quality, structure, and discoverability.
| 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 |
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:
~/.claude/skills/<name>/SKILL.md.claude/skills/<name>/SKILL.mdManual 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.
---
Description should include trigger context for auto-discovery:
Good: "Use when user asks to 'review code', 'check PR', or 'code review'"
Bad: "Reviews code" (no trigger context)
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:
! followed by backtick-wrapped command| Variable | Description |
|---|---|
$ARGUMENTS | All arguments passed when invoking |
${CLAUDE_SESSION_ID} | Current session ID |
/context commandSLASH_COMMAND_TOOL_CHAR_BUDGET=30000When 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 |
---
name: secure-operations
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/security-check.sh"
---
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/ |
Required:
--- delimitersname field (lowercase, max 64 chars)description field (max 1024 chars)Recommended:
version field for trackingargument-hint for skills accepting inputallowed-tools for securitymodel when specific model requiredFlag:
Check: Description includes trigger phrase Trigger patterns: "Use when", "Invoke when", "Use when user asks"
Flag:
Check: Side-effect skills are protected
Flag:
disable-model-invocation not setCheck: Tools are appropriately scoped
Flag:
Bash (should be Bash(git:*) or similar)Guidelines:
references/ subdirectoryFlag:
!backtick`` injectionsRecommended Sections:
Check: Context settings are appropriate
Flag:
context: fork without agent typeagent type without context: forkargument-hint for skills that clearly need input---
name: skill-name
description: "Use when..."
version: 4.2.0
---
Add "Use when user asks..." prefix to description
Replace Bash with Bash(git:*) or appropriate scope
## 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 |
| 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 |
<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>
<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>
<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>
<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>
<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>