Track lessons
Claude Code & Terminal Agents
0 of 4 completed
- Create and Test a Custom Claude Code Skill
- Share Claude Code Skills Across Repositories with Symlinks
- Structure CLAUDE.md So Claude Code Gets the Right Context
- Configure Specialized Subagents in Claude Code
Other tracks
Create and Test a Custom Claude Code Skill
A useful review prompt becomes tedious and inconsistent when you paste it into every session. A skill turns that repeated workflow into a named command that lives with the project or follows you across projects.
When to use
- Standardize a review, release or debugging workflow.
- Give teammates the same reusable instructions through Git.
- Restrict a sensitive workflow to a small, explicit tool set.
Example
Your team runs the same diff review before every PR. Store it as review-diff so anyone can invoke the same checks and output format.
TL;DR
A skill is a folder with a SKILL.md. Put it in .claude/skills/<name>/ and call /<name>.
mkdir -p .claude/skills/review-diff
$EDITOR .claude/skills/review-diff/SKILL.mdSteps
- 1
Write SKILL.md
Create the file with a precise name and description, then define the exact review and output you want. The description helps Claude decide when the skill is relevant.
.claude/skills/review-diff/SKILL.md--- name: review-diff description: Review the current git diff for bugs, security issues and missing tests. disable-model-invocation: true allowed-tools: Bash(git diff:*), Read, Grep --- Review the output of `git diff main...HEAD`. For each issue report: file, line, severity (Critical, Required, Optional, Nit), problem, suggested fix. End with a verdict: Approve or Request changes. - 2
Choose the scope
Project skills are shared through git. Personal skills work in every repo.
paths.claude/skills/<name>/SKILL.md # this project ~/.claude/skills/<name>/SKILL.md # all your projects - 3
Run it
Invoke the skill by its name from Claude Code after your branch contains the changes you want reviewed.
Claude Code/review-diff - 4
Iterate
Edit SKILL.md and run it again on the same diff until the output is stable.
Gotchas
- disable-model-invocation: true means only you trigger it; remove it to let Claude pick it automatically.
- Keep SKILL.md short; move long references into extra files in the same folder and link them.
- A vague description means Claude never selects the skill.
- Restrict allowed-tools for review skills so they stay read-only.
Cheat sheet
| .claude/skills/<name>/SKILL.md | Project skill |
| ~/.claude/skills/<name>/SKILL.md | Personal skill |
| /<name> [args] | Run a skill |
| disable-model-invocation: true | Manual only |
| allowed-tools: | Limit tools |
Related
Sources
Reviewing agent output? CodeCrab reviews pull requests locally with your own AI tools.
