Agent Skillsrohitg00/pro-workflow › smart-commit

smart-commit

GitHub

自动执行代码质量门禁、审查暂存区问题并生成规范的 Conventional Commit 信息。支持 lint、类型检查和测试,严格检查生产代码缺陷,禁止全量添加文件,确保提交消息符合规范并附带变更原因说明。

skills/smart-commit/SKILL.md rohitg00/pro-workflow

Trigger Scenarios

用户说 commit 用户说 git commit 用户说 save my changes 完成修改后准备提交

Install

npx skills add rohitg00/pro-workflow --skill smart-commit -g -y
More Options

Use without installing

npx skills use rohitg00/pro-workflow@smart-commit

指定 Agent (Claude Code)

npx skills add rohitg00/pro-workflow --skill smart-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add rohitg00/pro-workflow --all -g -y

预览 repo 内 skill

npx skills add rohitg00/pro-workflow --list

SKILL.md

Frontmatter
{
    "name": "smart-commit",
    "description": "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.",
    "user-invocable": true
}

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:

  • 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

Version History

  • 7f7209d Current 2026-07-24 11:41

Same Skill Collection

skills/agent-teams/SKILL.md
skills/auto-setup/SKILL.md
skills/batch-orchestration/SKILL.md
skills/bug-capture/SKILL.md
skills/compact-guard/SKILL.md
skills/context-engineering/SKILL.md
skills/context-optimizer/SKILL.md
skills/cost-tracker/SKILL.md
skills/design-engineering/SKILL.md
skills/deslop/SKILL.md
skills/domain-modeling/SKILL.md
skills/file-watcher/SKILL.md
skills/improve-architecture/SKILL.md
skills/insights/SKILL.md
skills/learn-rule/SKILL.md
skills/llm-council/SKILL.md
skills/llm-gate/SKILL.md
skills/mcp-audit/SKILL.md
skills/orchestrate/SKILL.md
skills/parallel-worktrees/SKILL.md
skills/permission-tuner/SKILL.md
skills/plan-interrogate/SKILL.md
skills/replay-learnings/SKILL.md
skills/safe-mode/SKILL.md
skills/session-handoff/SKILL.md
skills/skill-router/SKILL.md
skills/sprint-status/SKILL.md
skills/tdd/SKILL.md
skills/thoroughness-scoring/SKILL.md
skills/token-efficiency/SKILL.md
skills/wiki-builder/SKILL.md
skills/wiki-query/SKILL.md
skills/wiki-research-loop/SKILL.md
skills/wiki-viewer/SKILL.md
skills/wrap-up/SKILL.md
skills/writing-guidelines/SKILL.md
skills/pro-workflow/SKILL.md
skills/skill-optimizer/SKILL.md
skills/survey-generator/SKILL.md

Metadata

Files
0
Version
7f7209d
Hash
00542e4a
Indexed
2026-07-24 11:41

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 07:53
浙ICP备14020137号-1 $방문자$