commit · rohitg00 — Claude Code command: what it does, how to install
Runs project checks, reviews staged changes, and creates a focused git commit. Use it when a change is ready to be recorded.
MIT ★ 2,966 updated 2026-09-29
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowWhat commit does
The command inspects repository status and diff size, then runs npm run lint, npm run typecheck, and tests limited to changed files. It also reviews staged content for debug statements, untracked TODO-style comments, embedded secrets, and leftover test code.
It drafts a Conventional Commits-style message from the staged diff, with a type, optional scope, short summary, and a reason-focused body. Specific files are staged with git add, then the command reports the commit hash and summary. Options include --no-verify, --amend, and --push.
Projects without the lint, typecheck, or test npm scripts will fail the matching checks. Skipping the quality gates is reserved for an explicit flag or a direct user instruction.
What it helps with
- inspect repository status before committing
- run lint, type checks, and changed-file tests
- spot secrets and debug code in staged changes
- draft a Conventional Commits message
- stage selected files and report the commit hash
Example prompts for the agent
/commit/commit --amendto update the previous commit/commit --no-verifyto skip the quality gates
How to install commit
1Plugin marketplace
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflow2Manually: put the files in place
.claude/commands/commit.mdCall it with /commit. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/commit.mdCall it with /prompts:commit. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/commit.prompt.mdManually: put the files in place
.gemini/commands/commit.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about commit
How do I install commit in Claude Code?
Add the marketplace with /plugin marketplace add rohitg00/pro-workflow, then install the plugin with /plugin install pro-workflow@pro-workflow.
What does commit do?
It checks repository state, runs quality gates, reviews staged changes for common issues, drafts a focused message, and creates the commit after confirmation.
Which checks does commit run?
It runs npm run lint, npm run typecheck, and npm test -- --changed --passWithNoTests. The --no-verify option skips these gates.
Source text
commit.md · MIT
---
description: Create a focused git commit after running quality checks.
---
# /commit - Smart Commit with Quality Gates
Create a well-crafted commit after running pro-workflow quality checks.
## Process
### 1. Pre-Commit Checks
```bash
git status
git diff --stat
```
- Any unstaged changes to include?
- Any files that shouldn't be committed (.env, credentials, large binaries)?
### 2. Quality Gates
```bash
npm run lint 2>&1 | tail -5
npm run typecheck 2>&1 | tail -5
npm test -- --changed --passWithNoTests 2>&1 | tail -10
```
- All checks passing? If not, fix before committing.
- Skip only if user explicitly says to.
### 3. Code Review
Scan staged changes for:
- `console.log` / `debugger` statements
- TODO/FIXME/HACK comments without tickets
- Hardcoded secrets or API keys
- Leftover test-only code
Flag any issues before proceeding.
### 4. Commit Message
Draft a commit message based on the staged diff:
```
<type>(<scope>): <short summary>
<body - what changed and why>
```
**Types:** feat, fix, refactor, test, docs, chore, perf, ci, style
**Rules:**
- Summary under 72 characters
- Body explains *why*, not *what*
- Reference issue numbers when applicable
- No generic messages ("fix bug", "update code")
### 5. Stage and Commit
```bash
git add <specific files>
git commit -m "<message>"
```
- Stage specific files, not `git add -A`
- Show the commit hash and summary after
### 6. Learning Check
After committing, ask:
- Any learnings from this change to capture?
- Any patterns worth adding to LEARNED?
## Usage
```
/commit
/commit --no-verify
/commit --amend
```
## Options
- **--no-verify**: Skip quality gates (use sparingly)
- **--amend**: Amend the previous commit instead of creating new
- **--push**: Push to remote after commit
## Example Flow
```
> /commit
Pre-commit checks:
Lint: PASS
Types: PASS
Tests: 12/12 PASS
Staged changes:
src/auth/login.ts (+45 -12)
src/auth/session.ts (+8 -3)
Suggested commit:
feat(auth): add rate limiting to login endpoint
Limit login attempts to 5 per IP per 15 minutes using
Redis-backed sliding window. Returns 429 with Retry-After
header when exceeded.
Closes #142
Commit? (y/n)
```
## Related Commands
- `/wrap-up` - Full end-of-session checklist
- `/learn-rule` - Capture a learning after committing
---
**Trigger:** Use when user says "commit", "save changes", "commit this", or is ready to commit after making changes.
© Rohit Ghumare · MIT · rohitg00/pro-workflow
Similar slash commands
All slash commands for Git and GitHub →commit by other authors comes first.