Skip to content

devlog/agent-loops/claude-code-slash-commands-for-the-daily-git-loop-269.md

Claude Code Slash Commands for the Daily Git Loop

Build Claude Code commands around repeated decisions

The best slash commands save you from retyping judgment, not just instructions. In a normal terminal session, I repeatedly need the same things: understand a change, find its risks, verify its behavior, and package it cleanly. Those are better command boundaries than a giant /ship command that edits files, runs tests, and commits before I have inspected anything.

For simple project-local prompts, Claude Code supports Markdown command files under .claude/commands/. A file named review.md exposes /review. Skills are the newer, more capable mechanism, but command files remain useful for straightforward prompt shortcuts. Commit shared prompts alongside the code so teammates can review changes to the workflow.

/plan compared with /fix: understand before editing

These commands belong next to each other, but they should not have the same permissions or stopping point. Planning is cheap insurance when a request crosses unfamiliar modules. Fixing is appropriate once the failure and intended behavior are concrete.

  • Use /plan to identify relevant files, constraints, risks, and verification steps without changing repository contents.
  • Use /fix to reproduce one reported failure, make the smallest justified change, and run focused checks.

Put this instruction in plan.md: “Investigate $ARGUMENTS. Read the relevant implementation and tests. Return a short plan naming likely files, assumptions, and verification commands. Do not edit files.” Then /plan expired session handling becomes a bounded investigation rather than an invitation to rewrite authentication.

In fix.md, ask for a reproduction first and an explanation when reproduction is impossible. Verdict: /plan is the safer default for ambiguous work; /fix wins for a narrow, observable bug.

/review compared with /explain: findings or understanding

An explanation tells you what code does. A review asks whether the change is safe. Mixing them often produces a pleasant summary that misses the broken edge case.

  • Use /review to examine the diff for correctness, security, regressions, and missing tests, prioritizing actionable findings.
  • Use /explain to trace a specific execution path and identify important invariants without proposing unnecessary edits.

For review.md, start with: “Inspect the working-tree diff, including staged changes, and check for relevant untracked files. Read surrounding code where necessary. Report concrete issues with file locations, failure scenarios, and severity. Separate confirmed problems from uncertain risks. Do not modify files.” Avoid requiring a fixed number of findings; that rewards invented problems.

Verdict: add /review first. It creates a useful pause before committing. Add /explain when unfamiliar services or confusing call chains regularly interrupt your day.

/test compared with /commit: evidence before packaging

Tests and commits sit at the end of a change, but combining them hides an important boundary: running checks produces evidence; committing records a decision.

  • Use /test to select focused checks, execute permitted commands, and report exactly what passed or failed.
  • Use /commit to inspect staged changes and draft a message without staging files or creating commits.

In test.md, require the command to distinguish an assertion failure from an environment failure. “Could not connect to the test database” is not evidence that the patch is correct. Ask it to report checks it skipped, too.

Keep commit.md deliberately boring: “Read the staged diff and draft a concise commit message matching repository conventions. Flag unrelated changes. Do not stage, commit, or push.” Prompt boundaries are not security controls, so retain Claude Code permission checks. Verdict: /test earns a daily shortcut; /commit is optional convenience.

Fluxo routing keeps the command library portable

Keep these prompts independent of a particular model. Fluxo provides one key and one base URL, https://api.fluxorelay.com, for Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok, and more. It works with Claude Code, Codex, Gemini CLI, and any OpenAI SDK. You could compare Claude Sonnet 5.5 and Claude Haiku 4.5 on the same bounded review task rather than assuming equivalent results.

Fluxo bills per real token, including cache reads and writes, with no monthly fee. Users also earn a referral share when people they invite pay. If that setup fits your terminal workflow, consider creating a Fluxo account.

The daily shortlist: /plan, /review, and /test

My verdict: start with these three commands. They separate intent, inspection, and evidence without surrendering control of Git. Add /fix for repeatable bugs, /explain for unfamiliar code, and /commit only when message drafting becomes genuine friction. A small command library you trust beats a sprawling menu you must audit every morning.

Next in the buffer

Sign up in a minute and get credit to try every model mentioned here. Sign up →