Skip to content

Git commit workflow that blocks secrets, merge markers, and large binaries before every push.

CCM score
57 of 100
version
1.4.0
GitHub stars
25
View on GitHub

Own this plugin? Claim it

What it does

  • Adds /commit, /pr, /push, /rebase, and /save commands for guarded git operations
  • Runs a haiku agent that scans changed files for secrets, credentials, and merge conflict markers
  • Splits larger changes into logical commits using a type(scope): subject format
  • Warns on debug code, new TODO and FIXME lines, and commented-out blocks unless you intend them

Smart git commits with security and quality review

Add marketplace

/plugin marketplace add CaptainCrouton89/crouton-kit

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install git-smart@crouton-kit

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Stage and commit changes into logical commits.

Args: $ARGUMENTS

Parse flags from args:

  • --push → push to remote after committing
  • --all → commit ALL uncommitted changes (not just conversation-relevant ones)
  • --pr → after committing, run the /git-smart:pr command to open a PR
  • Remaining positional text → scope filter

Context

Git repo: !git rev-parse --is-inside-work-tree 2>/dev/null || echo "NOT_A_GIT_REPO"

If "NOT_A_GIT_REPO": check for git repos in immediate subdirectories. If found, commit changes in each repo that has uncommitted work. If none found, inform the user and stop.

Status:

!`git status --short 2>/dev/null || true`

Recent commits (style reference):

!`git log --oneline -n 8 2>/dev/null || true`

Process

1. Determine change set

  • Default (no --all): Only stage files relevant to what was discussed or worked on in this conversation. Ignore unrelated dirty files.
  • --all: Stage everything. For files that shouldn't be committed (build artifacts, secrets, temp files), either add them to .gitignore or git checkout/delete them so working tree is clean when done. Ask the user before deleting or reverting any files.
  • Scope provided: Further filter to files matching the scope.

2. Stage & analyze

Stage the determined files. Review staged diff for logical groupings.

3. Commit

Create commits. Small changes (<3 files, single concern) = single commit. Large changes = group into logical commits.

Format: type(scope): subject

  • Match style from recent commits
  • Types: feat, fix, docs, style, refactor, test, chore

4. Push (if --push)

Run git push. If no upstream, use git push -u origin HEAD.

5. Clean up (if --all)

Verify git status --short is empty. If not, resolve remaining files (gitignore or remove) until status is clean.

6. Create PR (if --pr)

Invoke the /git-smart:pr command via the SlashCommand tool. It handles pushing the branch, creating the PR, and monitoring CI. Forward any args the user provided that /pr understands (target branch, --merge/--rebase, -a).

Output

List commits created with their messages. If pushed, include remote and branch. If --pr, include the PR URL.

Readme

git-smart

Safe git commits with automated security and quality review.

Command: /commit [scope]

Four-phase workflow that scans, validates, commits, and pushes changes.

Phase 1: Security & Quality Review

Spawns a haiku agent to scan all changed files.

Blockers (halts commit):

  • Secrets: API keys, tokens, passwords, private keys, .env file values
  • Credentials: AWS keys, database URLs with passwords, auth tokens
  • Merge conflicts: Unresolved <<<<<<<, =======, >>>>>>> markers
  • Large binaries: Files >1MB, node_modules, build artifacts

Warnings (remove unless intentional):

  • Debug code: console.log, debugger, print(), var_dump, dd() (unless codebase standard)
  • TODO/FIXME: New additions in diff (not existing code)
  • Commented code: Large blocks of commented-out code

Rules violations: Checks changed files against .claude/rules/*.md patterns. Only flags clear violations.

Agent reports BLOCK: <reason> or PASS. Halts on block until user responds.

Phase 2: Prep

  • Updates .gitignore if needed (node_modules, build dirs, .env)
  • Stages appropriate files

Phase 3: Commit Strategy

Small changes (<3 files, single concern): Single commit Large changes (3+ files, multiple concerns): Multiple logical commits grouped by concern

Format: type(scope): subject Types: feat, fix, docs, style, refactor, test, chore Style: Matches recent commit history from repo

Phase 4: Push

Branch safety check:

  • On main/master with other branches present: Warns, suggests feature branch
  • On feature branch or only branch: Pushes normally

Runs git push origin <branch>

Output

Lists all commits created with messages and final push status.

Examples

/commit                    # Review and commit all changes
/commit auth               # Commit with "auth" scope context

Flow

git status → haiku scan → PASS/BLOCK → stage files → create commits → push
                              ↓
                           BLOCK: reports issues, waits for user

Details

Marketplace
CaptainCrouton89/crouton-kit
Source
plugins/git-smart
Category
Community
Keywords
git, commits, workflow
Listed since
Apr 7, 2026

Questions

What does the git-smart plugin's /commit command do?

The /commit command runs a four-phase workflow that scans, validates, commits and pushes your changes. It starts with a haiku agent that checks changed files for secrets, credentials, merge conflict markers and large binaries, and it halts the commit on a blocker until you respond.

How do I install git-smart in Claude Code?

Run /plugin marketplace add CaptainCrouton89/crouton-kit first, then run /plugin install git-smart@crouton-kit. Once installed, the plugin adds the /commit command, which takes an optional scope argument such as /commit auth.

Which git-smart checks stop a commit and which only warn?

Secrets, credentials, unresolved merge conflict markers and large binaries such as files over 1MB halt the commit. Debug code, new TODO or FIXME lines and large commented-out blocks only produce warnings that you can remove unless they are intentional.

Where does git-smart rank in the Git & Releases category?

git-smart sits in the Git & Releases category on Claude Marketplaces, alongside commit-commands, ruflo-jujutsu, changelog-generator and agentic-bundle-oss-maintainer. Its distinguishing feature is the automated security and quality review that runs before each commit.

More from CaptainCrouton89/crouton-kit

All 19

Similar to git-smart

More Git & Releases