원클릭으로
write-skill
Use when creating a new skill or improving an existing one — applies best practices for structure, dynamic context, and safety
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when creating a new skill or improving an existing one — applies best practices for structure, dynamic context, and safety
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when the user wants to do a QA session or report multiple bugs — interactive session where bugs are reported conversationally and agents fix them in parallel
Use when executing implementation plans with independent tasks — orchestration pattern for worktree isolation, TDD discipline, and two-stage review. Referenced by execute-plan, fixit, and bugbash.
Use when the user reports a bug or issue that can be fixed without blocking their current work — backgrounds an agent in a worktree to fix and merge back without breaking stride
Use after implementing changes in an OpenSpec project to review implementation against the active change's deltas — auto-fixes confident issues, parks questions for the user
Install the anutron (claude-skills) kit into the current project — symlinks or copies skills, registers hooks, compiles CLAUDE.md from snippets.
Uninstall the anutron (claude-skills) kit from the current project — reverses everything /anutron-install did.
| name | write-skill |
| description | Use when creating a new skill or improving an existing one — applies best practices for structure, dynamic context, and safety |
| tags | ["personal"] |
Create or improve Claude Code skills (slash commands) following established patterns and avoiding known pitfalls.
$ARGUMENTS - What the skill should do, or the name of an existing skill to improvefind .claude/skills -maxdepth 2 -name "SKILL.md" 2>/dev/null | head -30find . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml \) 2>/dev/null | head -3Determine whether the user wants to:
If creating, ask the user what the skill should do if $ARGUMENTS is vague.
Plan the skill structure:
--- fences)Write the file to .claude/skills/<name>/SKILL.md.
Follow all rules below carefully.
All fields are optional. Only description is strongly recommended.
---
name: skill-name
description: Use when <trigger situation> -- <what the skill does>
allowed-tools: Bash(git *), Bash(npm test)
---
| Field | Purpose |
|---|---|
name | Skill name, used for /name invocation. |
description | Drives auto-activation and / menu. MUST start with "Use when..." or "You MUST use this before/after..." to tell Claude's router when to fire. Noun-phrase descriptions ("Multi-agent debugging") will never auto-trigger. Max 1024 chars. |
allowed-tools | Tools Claude can use without asking permission. Glob patterns supported. |
context | Set to fork to run in an isolated subagent (no conversation history). |
agent | Subagent type when context: fork (e.g., Explore, Plan). |
model | Override model (e.g., sonnet for cheaper tasks). |
disable-model-invocation | true to prevent auto-loading (manual /name only). Use for destructive skills. |
user-invocable | false to hide from / menu (background knowledge only). |
Inject live data by writing an exclamation mark followed by a command wrapped in backticks. The command runs locally and its output replaces the placeholder before Claude sees the prompt.
In the examples below, !{command} represents the actual syntax (exclamation mark + backtick + command + backtick). Curly braces are used here to prevent this skill file from executing its own examples.
## Context
- Current branch: !{git branch --show-current}
- Git status: !{git status --short}
- Project type: !{ls -1 go.mod package.json Cargo.toml 2>/dev/null | head -3}
$() Command SubstitutionClaude Code blocks $() inside dynamic context expressions for security reasons. This is the single most common authoring mistake.
# BROKEN -- $() is blocked
- Branch commits: !{DEFAULT=$(git symbolic-ref ...) && git log origin/$DEFAULT..HEAD}
# FIXED -- single commands with error suppression
- Branch commits: !{git log origin/HEAD..HEAD --oneline 2>/dev/null | head -50}
Alternatives to $():
command1 | command2 | command3command 2>/dev/null (empty output on failure is fine)origin/HEAD: resolves to whatever the remote default branch isAlways bound output to avoid blowing up the context window:
# GOOD -- bounded output
- Files: !{find . -maxdepth 3 -name "*.go" 2>/dev/null | head -20}
- Commits: !{git log --oneline -10}
# BAD -- unbounded, could be massive
- Files: !{find . -name "*.go"}
- Log: !{git log}
Use 2>/dev/null to suppress stderr, but it does not fix exit codes. When a command fails, the skill loader sees the non-zero exit code and treats the whole init expression as failed, the skill never loads, and the user sees Shell command failed for pattern .... Bare 2>/dev/null is not enough.
Pick one of two safe patterns:
Pattern A: pipe through | head -N -- silent fallback. In a pipeline the exit code is the last command's, so empty upstream output yields exit 0.
# BAD -- 2>/dev/null suppresses stderr but exit code is still non-zero
- Tag: !{git describe --tags --abbrev=0 2>/dev/null}
# GOOD -- pipe neutralizes exit code, empty output on failure is fine
- Tag: !{git describe --tags --abbrev=0 2>/dev/null | head -1}
Pattern B: || echo '<sentinel>' -- produces a readable placeholder so Claude knows the command failed, not just that the output is empty. Useful when the difference between "no value" and "command failed" matters semantically.
- Branch: !{git branch --show-current 2>/dev/null || echo '(not in a git repo)'}
- Repo root: !{git rev-parse --show-toplevel 2>/dev/null || echo '(not in a git repo)'}
|| and && are fine inside skill init expressions. They are sometimes flagged in Bash tool calls Claude makes later (a separate concern in the global Bash style rules), but the skill loader does not block them.
Skills are increasingly invoked from sandboxed sessions or scratch directories where the CWD is not a git work tree. Every standalone git call in skill init MUST tolerate that case -- otherwise the skill fails to load entirely.
git ... | head, git ... | awk, etc.) -- already safe because the pipe absorbs the upstream exit code. Stderr will still leak unless you add 2>/dev/null to the git stage; do that.git X && git Y) -- && propagates failure. Either rewrite as two separate context lines or wrap with Pattern B at the end of the chain.The classic failure mode: !{git branch --show-current} outside a git repo emits fatal: not a git repository ... to stderr AND exits non-zero. The skill never loads. Patterns A and B both fix this.
| Variable | Description |
|---|---|
$ARGUMENTS | All arguments the user passed after /skill-name |
$ARGUMENTS[0], $1 | First argument (0-indexed) |
disable-model-invocation: true for skills with side effects (deploy, merge, send).All skills live in .claude/skills/<name>/SKILL.md inside the project. Never put skills in global ~/.claude/skills/.
After writing, check the skill for:
$() in any dynamic context linegit call uses Pattern A (2>/dev/null | head -N) or Pattern B (2>/dev/null || echo '<sentinel>') so it survives a non-repo CWD2>/dev/null left dangling without a pipe or || fallbackgit stages still have 2>/dev/null to avoid stderr leaksX && Y) end with a Pattern B fallback or are split into separate context linesdisable-model-invocation: trueReport the validation results and the file path of the new/updated skill.