mcpbeat

Smart Commit

rohitg00/smart-commit

Run quality gates, review staged changes for issues, and create a well-crafted conventional commit. Use when saying "commit", "git commit", "save my changes", or ready to commit after making changes.

603 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2755
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/rohitg00/pro-workflow --skill smart-commit

The instruction itself

9 sections, as written by the author

Smart Commit

Trigger

Use when saying "commit", "save changes", or ready to commit after making changes.

Workflow

  • Check current state and identify what to commit.
  • Run quality gates (lint, typecheck, tests on affected files).
  • Scan staged changes for issues.
  • Draft a conventional commit message from the diff.
  • Stage specific files, create the commit.
  • Prompt for learnings from this change.

Commands

git status
git diff --stat

npm run lint 2>&1 | tail -5
npm run typecheck 2>&1 | tail -5
npm test -- --changed --passWithNoTests 2>&1 | tail -10

git add <specific files>
git commit -m "<type>(<scope>): <summary>"

Code Review Scan

Before committing, check staged changes in production code (not test files) for:

  • console.log / debugger statements (suppressed in test files — see Review Suppressions)
  • TODO/FIXME/HACK comments without ticket references (e.g., TODO(JIRA-123) is fine)
  • Hardcoded secrets or API keys
  • Leftover test-only code

Flag any issues before proceeding.

Commit Message Format

<type>(<scope>): <short summary>

<body - what changed and why>

Types: feat, fix, refactor, test, docs, chore, perf, ci, style

Guardrails

  • Never skip quality gates unless user explicitly says to.
  • Stage specific files by name. Never git add -A or git add ..
  • Summary under 72 characters. Body explains *why*, not *what*.
  • No generic messages ("fix bug", "update code").
  • Reference issue numbers when applicable.

Output

  • Quality gate results (pass/fail)
  • Issues found in staged changes
  • Suggested commit message
  • Commit hash after committing
  • Prompt: any learnings to capture?

Review Suppressions

Do NOT flag these during the pre-commit scan. They add noise without catching real bugs:

  • Threshold, config value, or feature flag changes (limits, timeouts, retry counts)
  • Import reordering that does not change runtime behavior
  • Whitespace-only or formatting-only changes
  • Adding or removing console.log in test files
  • TODO/FIXME comments (tracked separately in issue trackers)
  • Variable or parameter renames that do not change behavior

How to use it

Copy the folder

Take rohitg00/smart-commit from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.