Smart commit

From rohitg00/pro-workflow · View interactive version

Smart commit is an AI agent skill from the GitHub repository rohitg00/pro-workflow. 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.

How to use this skill

Skill file

Smart Commit

Trigger

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

Workflow

  1. Check current state and identify what to commit.
  2. Run quality gates (lint, typecheck, tests on affected files).
  3. Scan staged changes for issues.
  4. Draft a conventional commit message from the diff.
  5. Stage specific files, create the commit.
  6. 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:

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

Output

Review Suppressions

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.