git-commit

GitHub

自动执行原子化Git提交,通过检查差异确定范围,智能分割无关变更,遵循约定式提交规范生成消息,并处理Issue链接。

.agents/skills/git-commit/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

用户要求提交代码变更 需要清理或整理未暂存的更改

Install

npx skills add Terry-Mao/AICodingFlow --skill git-commit -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/git-commit -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@git-commit

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill git-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

SKILL.md

Frontmatter
{
    "name": "git-commit",
    "description": "Create clean, repo-aware commits from real diffs with focused inspection, selective staging, and minimal tool calls."
}

git-commit

Commit current repo changes atomically, with accurate messages and no unrelated files.

Inspect

Use one tool call for the common inspection:

git status --short
git diff --stat
git diff
git diff --cached --stat
git diff --cached

If staged output is empty, ignore it. Check repo message conventions only when unknown: prefer existing context, then obvious files such as .gitmessage, CONTRIBUTING.md, or commit config. Use recent history only when style is still unclear.

Commit Boundaries

Split only for real separate concerns: behavior vs refactor, dependency churn vs code, generated output without source, formatting-only churn, or unrelated docs/tests. Keep directly related tests with the fix/feature.

Stage only intended paths:

git add <specific-files>

Use git add -p only when file-level staging would mix unrelated changes.

Approval

If the user asked to commit a clear current change, proceed after inspection. Ask first only when included files, boundaries, risky content, or issue semantics are ambiguous. Keep questions short: included files, excluded files, proposed message, and the ambiguity.

Message

Default format unless repo conventions say otherwise:

type(scope): summary

Types: feat, fix, refactor, perf, docs, test, build, ci, chore. Use a scope when obvious. Avoid update, changes, misc, and wip.

Issue links:

  • Detect explicit user issue IDs first, then branch patterns like <type>/<desc>-123, issue-123, gh-123, or #123.
  • Use Fixes #123 only for explicit closing intent or a clearly complete narrow issue.
  • Use Refs #123 for partial, preparatory, docs-only, cleanup-only, or ambiguous work.
  • Do not invent issue IDs.

Commit

Use normal Git so hooks run:

git commit -m "<subject>"

If hooks fail, stop and report. Do not use --no-verify, push, rewrite history, or force anything unless explicitly asked.

Report the final commit hash and whether hooks/checks ran.

Version History

  • e53c5ac Current 2026-07-24 11:35

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-branch/SKILL.md
.agents/skills/git-push/SKILL.md
.agents/skills/git-worktree/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
e53c5ac
Hash
b35e65de
Indexed
2026-07-24 11:35

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-06 19:35
浙ICP备14020137号-1 $Гость$