一键导入
skills-authoring
Guide to writing SKILL.md files for Claude Code. Use when creating skills that provide on-demand reference, methodology, or workflow guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide to writing SKILL.md files for Claude Code. Use when creating skills that provide on-demand reference, methodology, or workflow guidance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Structure Claude prompts for clarity and better results using roles, explicit instructions, context, positive framing, and strategic organization. Use when crafting prompts for complex tasks, long documents, tool workflows, or code generation.
Pause agent execution to have the human validate decisions, choose between options, answer freetext, or comment on a document — via the `hl` CLI. Every interaction is a kickoff that returns a job handle immediately; collect the human's answer later with `hl job result`. Use for material design decisions, approval gates, picks between meaningful alternatives, and markdown doc review. Not for trivial yes/no confirmations the agent should decide itself.
Validate technical designs against requirements for coverage, feasibility, and architectural soundness. Use after creating a design.
Validate implementation plans against requirements and design. Use after creating a plan to ensure full coverage and no ambiguities.
Validate requirements documents for EARS compliance, completeness, and consistency. Use after creating requirements.
Design CLIs for humans and LLM agents — subcommand shape, output streams, exit codes, JSON modes, TTY-aware color, structured errors, mutation safety. Use when building or refactoring a CLI, adding machine-readable output, writing --help, deciding stdout vs stderr, or making a tool agent-friendly.
| name | skills-authoring |
| description | Guide to writing SKILL.md files for Claude Code. Use when creating skills that provide on-demand reference, methodology, or workflow guidance. |
| user-invocable | true |
| paths | ["**/SKILL.md","**/skills/**/*.md"] |
Skills are on-demand reference material Claude loads when relevant — not every session. They're ideal for methodology, domain knowledge, and complex workflows that would bloat CLAUDE.md.
Commands are now skills. .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both produce /deploy and use the same frontmatter. Existing commands/ files keep working, but new work should go in skills/ — skills can bundle supporting files, scripts, and per-skill hooks that commands cannot.
skill-name/
├── SKILL.md # Required: overview and navigation
├── reference.md # Optional: detailed docs
├── examples.md # Optional: usage examples
└── scripts/ # Optional: bundled utilities
└── validate.py
---
name: skill-name
description: What it does. Specific capabilities. Use when [trigger scenarios].
---
The description field drives automatic discovery. Include keywords users would naturally say. Front-load the key use case — descriptions longer than 250 characters get truncated in the skill listing.
Bad: Helps with documents
Good: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDFs, forms, or document extraction.
| Field | Purpose |
|---|---|
argument-hint | Autocomplete hint for expected args: [issue-number] |
allowed-tools | Restrict available tools (space-separated or YAML list) |
model | Override model (opus/sonnet/haiku) |
effort | Override effort level: low, medium, high, max (Opus 4.6 only) |
context: fork | Run in isolated subagent context |
agent | Agent type when forked: Explore, Plan, general-purpose, or custom |
user-invocable: false | Hide from slash menu (agent-only) |
disable-model-invocation: true | Prevent autonomous invocation (user-only) |
paths | Glob patterns — only activate when working with matching files |
hooks | Skill-scoped hooks (same format as hooks.json, nested in frontmatter) |
shell | bash (default) or powershell for inline shell execution |
Default: both user and Claude can invoke. Two fields restrict this:
disable-model-invocation: true — user-only. Description is not loaded into context. Use for actions with side effects (/commit, /deploy).user-invocable: false — agent-only. Description stays in context so Claude can find it. Use for background reference that isn't a meaningful user action.---
name: fix-issue
description: Fix a GitHub issue
argument-hint: [issue-number]
---
Fix GitHub issue $ARGUMENTS following our coding standards.
Substitutions:
$ARGUMENTS — all args as a single string$ARGUMENTS[N] or $N — positional arg by 0-based index ($0 is first)${CLAUDE_SESSION_ID} — current session ID${CLAUDE_SKILL_DIR} — directory containing this SKILL.md (use for bundled scripts)Indexed args use shell-style quoting: /migrate "hello world" second → $0 = hello world, $1 = second. If the skill doesn't include $ARGUMENTS, Claude Code appends ARGUMENTS: <value> to the end.
Shell commands run before the skill is sent to Claude — Claude sees the output, not the command. The syntax is a ! immediately followed by a backtick-wrapped command (e.g. the bang-prefix form around gh pr diff). The literal pattern is intentionally not shown verbatim in this file because the preprocessor evaluates it on raw text including inside fenced code blocks, which would run the example at skill-load time.
For multi-line commands, open a fenced code block whose opener is three backticks immediately followed by !, and close it with a normal triple-backtick fence. Each line inside runs as a separate shell command, and Claude sees the combined output.
This is preprocessing, not tool use — bundled and managed skills aren't affected by disableSkillShellExecution, but user/project/plugin skills are.
The litmus test: does this teach judgment or describe an API?
A skill helps someone who doesn't know what to do — it provides decision frameworks, heuristics, and principles they can reason from. A reference manual helps someone who already knows what to do but forgot how — it provides API surfaces, tables, and exhaustive listings.
If your SKILL.md reads like a man page, you've written a reference doc wearing a skill's clothes. Extract the reference material to reference.md and rewrite SKILL.md around the decisions.
Skill markers:
Reference markers:
Most skills need both — SKILL.md for the judgment layer, reference.md for the lookup layer. The mistake is combining them.
LLM reasoning degrades as context grows — research shows meaningful accuracy drops around 3k tokens. Every line in a skill competes for attention with the rest of the agent's context.
Budget ~150 lines for SKILL.md. This forces density.
reference.md.The test: Can someone reading your SKILL.md for 30 seconds make a better decision than they would without it? If they have to read the whole thing to get value, you've buried the judgment.
Keep SKILL.md under 500 lines. Put detailed reference in supporting files:
For detailed patterns, see [patterns.md](patterns.md)
For examples, see [examples.md](examples.md)
Claude reads additional files only when needed — this keeps context lean.
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---
Research $ARGUMENTS thoroughly: find files, read code, summarize findings.
With context: fork, SKILL.md content becomes the task prompt for a fresh subagent. Only meaningful for skills with explicit instructions — reference-only skills will return empty. The inverse pattern (custom subagent that preloads skills as reference) lives in the subagent definition, not here.
Include the word ultrathink anywhere in the skill content to enable extended thinking when the skill runs.
name fieldscripts/ and invoke via ${CLAUDE_SKILL_DIR}/scripts/foo.shcontext: fork for skills that should run in isolationpaths to scope activation — avoids polluting unrelated work