Creating and optimizing Claude Code Skills including activation patterns, content structure, and development workflows. Use when creating new skills, converting memory files to skills, debugging skill activation, or understanding skill architecture and best practices.
npx claudepluginhub bendrucker/claudeThis skill is limited to using the following tools:
package.jsonreferences/patterns.mdreferences/troubleshooting.mdscripts/check-lint.test.tsscripts/check-lint.tsscripts/check-namespace.test.tsscripts/check-namespace.tsscripts/check-structure.test.tsscripts/check-structure.tsscripts/skill-lint/index.tsscripts/skill-lint/parse.tsscripts/skill-lint/rules/body.tsscripts/skill-lint/rules/frontmatter.tsscripts/skill-lint/rules/index.tsscripts/skill-lint/rules/references.tsscripts/skill-lint/rules/tokens.tsscripts/skill-lint/test/fixtures/with-references/references/language.mdscripts/skill-lint/test/rules.test.tsscripts/skill-lint/types.tsReference for developing effective skills. The context window is a public good - only include information Claude doesn't already possess.
SKILL.md under 500 lines. Use progressive disclosure.---
name: plugin-name:skill-name
description: Third-person capability description with trigger terms
allowed-tools: [Read, Grep, Glob] # Optional: tool restrictions
model: claude-sonnet-4-20250514 # Optional: override model
context: fork # Optional: run in isolated subagent
agent: Explore # Optional: agent type for fork
user-invocable: false # Optional: hide from slash menu
hooks: # Optional: skill-scoped hooks
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/validate.sh"
once: true
---
Required Fields:
name: Lowercase letters, numbers, hyphens only (max 64 chars). Plugin skills use plugin-name:skill-name prefix for disambiguation. Skip the prefix when name equals plugin name.description: Third-person, includes trigger terms and use cases (max 1024 chars).Optional Fields:
allowed-tools: Tools Claude can use without permission when skill is activemodel: Override the conversation's modelcontext: Set to fork to run in isolated subagent contextagent: Agent type when context: fork (Explore, Plan, general-purpose, or custom)user-invocable: Hide from slash menu when false (default: true)disable-model-invocation: Block programmatic invocation via Skill toolhooks: Skill-scoped hooks (PreToolUse, PostToolUse, Stop)Naming: Plugin skills use plugin-name:skill-name with a colon namespace (e.g., gitlab:ci, things:inbox). The part after the colon should not repeat the plugin name. For standalone skills, use gerund form (verb + -ing): processing-pdfs, analyzing-data. Avoid vague names like helper, utils.
Storage: ~/.claude/skills/ (personal), .claude/skills/ (project), plugins (bundled)
| Variable | Description |
|---|---|
$ARGUMENTS | All arguments passed when invoking the skill. Appended automatically if absent. |
$ARGUMENTS[N] / $N | Access a specific argument by 0-based index. |
${CLAUDE_SESSION_ID} | Current session ID. |
${CLAUDE_SKILL_ROOT} | Absolute path to the skill's directory. Works in hooks and allowed-tools, but NOT in ! context. |
The bang-backtick syntax runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder — Claude only sees the final result, not the command. This is preprocessing, not something Claude executes. Use this to inject live data (git state, CLI output, file contents) so the application harness extracts and runs the commands without waiting on the model.
See references/patterns.md for syntax, examples, and gotchas.
Skills follow the Agent Skills directory convention. Only SKILL.md is required; all directories are optional.
skill-name/
├── SKILL.md # Required: instructions and frontmatter
├── scripts/ # Executable code agents can run
├── references/ # Documentation loaded on demand
└── assets/ # Static resources (templates, images, data files)
A PostToolUse hook validates writes to skill directories against this structure.
scripts/Executable code that agents run. Scripts should be self-contained, document dependencies, and include error messages.
references/Additional documentation loaded when needed. Keep files focused — smaller files mean less context usage. Use descriptive names matching the domain (finance.md, api.md).
assets/Static resources: templates, images, diagrams, lookup tables, schemas.
Reserve ALL CAPS for files with special meaning (SKILL.md, README.md). Use lowercase for all other files. Keep references one level deep. For files >100 lines, include a table of contents.
Use the skill-creator skill for interactive skill creation workflows — it drives the full lifecycle of drafting, testing with parallel subagents, benchmarking, and iterating. This skill provides the plugin-specific constraints (namespacing, structure, validation) that skill-creator applies during creation.
A skill-scoped PostToolUse hook runs skill-lint automatically when SKILL.md files are edited. For manual checks, run bun run skill-lint path/to/skill/ from the project root.
Load detailed guides as needed:
Common Patterns: Read-only ([Read, Grep, Glob]), Script-based ([Read, Bash, Write]), Template-based ([Read, Write, Edit])
Content Features: $ARGUMENTS / $N for arguments, bang-backtick for dynamic context injection
Anti-Patterns: Windows paths, too many options, vague descriptions, nested references, scripts that punt errors
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.