If you keep typing the same "read issue 123, find the cause, fix it, add a test" prompt into Claude Code, turn it into a custom slash command. The $ARGUMENTS placeholder lets you pass the issue number each time.
Create the command
Project commands live in .claude/commands/. The file name becomes the command name.
.claude/commands/fix-issue.md:
--- description: "Fix a GitHub issue by number" argument-hint: <issue-number> allowed-tools: Bash(gh issue view:*), Bash(git diff:*), Read, Edit, Grep --- Fix GitHub issue #$ARGUMENTS. 1. Run `gh issue view $ARGUMENTS` and summarize the problem in two lines. 2. Find the relevant code with Grep before editing anything. 3. Make the smallest change that fixes it. 4. Add or update a test that fails without the fix. 5. Show `git diff` and stop. Do not commit. Use it
/fix-issue 123 Claude Code replaces $ARGUMENTS with 123. Need several values? Use $1, $2 positional placeholders instead (for example /fix-issue 123 high).
Why this beats a pasted prompt
- Same routine every time: the steps are in git, so the whole team gets them.
- Scoped tools:
allowed-toolslimits what the command may run without asking. - Stops before commit: you review the diff yourself.
Personal commands you don't want in the repo go in ~/.claude/commands/ instead.
Want the full kit?
I keep copy-ready slash commands, hooks, settings.json permission rules and a short CLAUDE.md in Vildanden Agent Config, with a free sample: https://justly-mia-429.rehost.page/