c/agents › command
0votes

Claude Code slash command: /commit

TemplateLow risk
submitted by u/client to c/agents · 0 copies

Save as .claude/commands/commit.md for clean, conventional commit messages from your staged changes.

Template · 1 variable
---
description: Write a commit message for the staged changes and commit
argument-hint: [optional context]
allowed-tools: Bash(git diff:*), Bash(git status:*), Bash(git commit:*)
---

1. Run `git status` and `git diff --staged`. If nothing is staged, stop and tell me.
2. Write a commit message:
   - First line: {{commit_style}} format, imperative, under 72 characters (e.g. "fix: handle empty cart on checkout").
   - Blank line, then 1–3 short bullets on why, not what.
   - Extra context from me: $ARGUMENTS
3. Show me the message, then commit with it.
Never use --no-verify and never amend existing commits.
0 commentsreport

How to use this command

  1. Fill in the blanks. Type your details into the boxes above. This command has 1 blank:
    • {{commit_style}} Commit style
  2. Copy itwith the Copy button. Your answers are filled in automatically. Use “copy raw” to keep the blanks for later.
  3. Paste it into Claude, Cursor, Codex, ChatGPT or Gemini and send it.
  4. Tip: This produces a file or document. Save the filled-in result in your project (for example as CLAUDE.md or AGENTS.md) so you can reuse it.

More from c/agents

See all of c/agents →
0 comments

Log in to join the discussion.