Skip to main content
command CX Codex

commit · cloudai-x — Claude Code command: what it does, how to install

Inspects staged Git changes and creates a conventional commit with an automated message.

MIT ★ 1,424 updated 2026-10-06

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/commit.md
Open on GitHub

What commit does

The command inspects your staging area using git diff --cached and checks git status --short. It also reads the last 5 commits from git log to match existing project conventions.

It selects the commit type among feat, fix, docs, style, refactor, perf, test, or chore. If nothing is staged, the tool stops and asks you to add files first. Running it requires shell permissions for git status, git diff, git add, and git commit.

What it helps with

  • generate a conventional commit message from staged changes
  • match commit style with recent repository history
  • commit staged files without manually drafting diff notes

Example prompts for the agent

  • /commit
  • /commit auth
  • /commit fix typos in parser

How to install commit

Manually: put the files in place

.claude/commands/commit.md

Call it with /commit. For all projects use ~/.claude/commands/

Questions about commit

How to install commit in Claude Code?

Place the command file at .claude/commands/commit.md inside your project root.

What does the commit command do?

It reads the staged Git diff, constructs a type(scope): description message, and runs git commit.

What happens if no files are staged?

The command detects the empty index and asks you to stage modified files before committing.

Source text

commit.md · MIT
---
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*)
description: Create a conventional commit with auto-generated message
argument-hint: "[optional scope or message hint]"
---

## Context

- Current branch: !`git branch --show-current`
- Git status: !`git status --short`
- Staged changes: !`git diff --cached --stat`
- Staged diff: !`git diff --cached`
- Recent commits (for style reference): !`git log --oneline -5 2>/dev/null || echo "No commits yet"`

## Task

Based on the staged changes above, create a single git commit:

1. Analyze the staged diff to understand what changed
2. Generate a conventional commit message following the format:
   - `type(scope): description`
   - Types: feat, fix, docs, style, refactor, perf, test, chore
3. If no changes are staged, inform the user and suggest staging files
4. Execute the commit

$ARGUMENTS

© CloudAI-X · MIT · CloudAI-X/claude-workflow-v2

Similar slash commands

All slash commands for Git and GitHub →

commit by other authors comes first.

commit official Anthropic Creates a git commit based on current branch changes. Helps stage and commit diffs in Claude Code without typing commit messages. CX Codex +1 4,121installs commit Rohit Ghumare Runs project checks, reviews staged changes, and creates a focused git commit. Use it when a change is ready to be recorded. CX Codex +1 ★ 2,966repo stars commit evmts A slash command that builds your git commit: stages files, writes a conventional-commit message with an emoji, and runs the project's checks first. CX Codex +1 ★ 2,003repo stars commit qdhenry Generates task-aligned Conventional Commits, tracks status transitions, and validates changed files against task scopes. CX Codex +1 ★ 1,357repo stars commit carlrannaberg Builds a git commit that matches your project's conventions: scans the diff, updates docs, writes the message. CX Codex +1 ★ 763repo stars caveman-commit JuliusBrussee caveman-commit generates terse Conventional Commits messages focused strictly on intent. Ideal for keeping git history clean without boilerplate or AI signatures. CX Codex +1 441,600installs git-commit official github A GitHub Copilot skill that turns a working diff into a commit: it reads the changes, stages the related files, writes a Conventional Commits message and runs git commit. CX Codex +1 47,165installs conventional-commit official github A GitHub Copilot skill that builds commit messages in the Conventional Commits format. After you change files, it checks the diff and commits with a message assembled from an XML template. CX Codex +1 17,103installs git-commit-helper davila7 Reads git diff --staged and drafts a commit message following Conventional Commits. It fires after every Bash tool call and appends a line to ~/.claude/git-commit-helper.log. CX Codex +1 7,093installs ce-commit EveryInc ce-commit is a Claude Code skill that automatically creates git commits with meaningful messages. It splits staged or unstaged changes into logical groups without pushing. CX Codex +1 3,600installs conventional-commit-message dangreen conventional-commit-message generates changelog-ready commit messages following Conventional Commits 1.0.0 and conventional-changelog presets. It guides AI agents on type selection and breaking changes. CX Codex +1 1,100installs

From the same set46

The whole set →
quick-fix quick-fix — a command that fixes lint errors, type errors, and simple bugs. Finds the issue, applies a minimal fix, and verifies the result. CX Codex +1 ★ 1,424repo stars sync-branch sync-branch fetches origin, then rebases or merges the default branch into your current one, stashing uncommitted work first. Useful right before a push or a pull request. CX Codex +1 ★ 1,424repo stars lint-fix lint-fix detects repository linters, runs formatting and auto-fixes, then reports unresolved issues. CX Codex +1 ★ 1,424repo stars add-tests The add-tests command adds tests for a chosen file or function, or targets recently changed code when no argument is given. It runs the tests afterward. CX Codex +1 ★ 1,424repo stars metrics Turns the log kept by the track-metrics hook into a short report: how many turns ran, which files changed, what got committed. CX Codex +1 ★ 1,424repo stars commit-push-pr commit-push-pr prepares a conventional commit from staged diffs, pushes the branch, and opens a GitHub pull request. Prevents accidental commits to the default branch. CX Codex +1 ★ 1,424repo stars summarize-changes summarize-changes reads Git history and changed files to prepare standup notes, reports, or a PR description. Use it when a recent change summary needs a clear structure. CX Codex +1 ★ 1,424repo stars rapid rapid puts Claude into a speed-first development mode: code right away, planning and docs kept short. Built for prototypes and MVPs. CX Codex +1 ★ 1,424repo stars

Project sponsors

Companies that keep this analytics open