Files
git/skills/commit/SKILL.md
T
jiantw83andClaude Opus 5 4c9c9421c6 fix(git): 補齊稽核缺失並修掉護欄失效
What:依 jsc-meta:skill-check 的稽核結果修正技能與工具——補上每個步驟的可檢核完成條件、
把留在內文的標準輸入輸出流程下放 tools/、修正查表與退碼路由造成的誤判。

Why:稽核發現這些缺失會讓技能在實際執行時走錯分支或靜默通過。
完成條件缺漏是最常被違反的一項;退碼誤判與查表錯誤則會讓良性狀況被當成失敗。

How:逐項對照 references/guidelines.md 的審核檢查清單修正,新增的工具都有
documented exit codes,並以真實執行驗證每條路徑。

Who:jsc-meta:skill-check 例行稽核(2026-08-25)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 14:58:54 +08:00

2.0 KiB


name: commit description: Group all pending file changes by conventional type and feature, then commit each group as {type}({scope}): {message}. Message style is full (What/Why/How/Who), brief (one line from git diff), or custom, chosen via decision tree. Use whenever changes must be committed; not for push or PR creation.

commit — group and commit file changes

Steps

  1. Track every file change: inspect all changes with git status --porcelain first, then git add group by group. git add -A followed by one bulk commit is forbidden. Done when every path listed by git status --porcelain is assigned to exactly one group, before the first commit runs.
  2. Group the changes by same type plus same requirement or feature. One group is one commit. Done when each group carries one type and one requirement or feature, and no path sits in two groups.
  3. Commit each group with the format {type}({requirement or feature}): {message}. Done when git status --porcelain returns empty; report done only then.

Type table

Type Purpose
feat add or change a feature
fix fix a bug
docs documentation
style formatting; no change to how the code runs
refactor code change that neither adds a feature nor fixes a bug
perf improve performance
test add tests
chore build process or tooling change
revert revert an earlier commit

Message format (pick one of three)

Ask the user per the jsc-ask:ask rules. Skip the question when the question record or this session already holds a convention.

  1. Full: covers What, Why, How, and Who (which feature).
  2. Brief: one sentence summarized from git diff.
  3. Custom: the user types the message.

Rules

  1. The grouping and message drafting details MUST run as a sub agent. The main agent only confirms the grouping and runs the commits.
  2. Write messages in UTF-8 Traditional Chinese (the type and scope stay in English), per the STE100 output rule.
  3. Never push. Push and PR belong to jsc-git:pr.