一键导入
commit
Draft, validate, and execute a git commit using the project's approval workflow. Use when the user wants to commit staged or specific changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Draft, validate, and execute a git commit using the project's approval workflow. Use when the user wants to commit staged or specific changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | commit |
| description | Draft, validate, and execute a git commit using the project's approval workflow. Use when the user wants to commit staged or specific changes. |
No short codes in subject. Pattern [A-Z]+-[0-9]+ is banned from the subject line.
story: advance META-029 to Readystory: add commit skill for convention enforcementfix(BUG-042): annotation orderfix(nav): annotation order in section viewCloses: META-029, never the subject.Subject ≤ 72 chars. Count before proposing.
Subject must start with a valid type:
feat | fix | refactor | perf | chore | docs | test | style | plan | story | wf
1-2 lines max. Details go in documentation, not commit messages.
Type semantics:
feat/fix/refactor — code changes (appear in CHANGELOG)chore/docs/test/style/perf — infra (hidden from CHANGELOG)plan: — scope files, test contracts, ADRsstory: — story lifecycle (create, update, close, archive)wf: — workflow tooling (hooks, scripts, skills)git diff --cached --name-only
git diff --cached --stat
If nothing is staged, check git status and ask the user what to stage.
git diff --cached
For large diffs, read git diff --cached --stat and sample key files.
Write the subject. Then before writing anything else, verify against the rules above:
[A-Z]+-[0-9]+? If yes, rewrite.Only proceed once the draft passes all three checks.
printf 'APPROVED: %s\n\nMESSAGE:\n%s\n\nFILES:\n%s\n' \
"$(date -Iseconds)" \
"<subject line here>" \
"$(git diff --cached --name-only | sed 's/^/- /')" \
> .commit-approval
Show exactly:
Ready to commit:
<subject line>
Files:
- path/to/file1
- path/to/file2
Approve?
Wait for user confirmation. If they request changes, update both the draft and .commit-approval.
Only after explicit approval:
git commit -m "<subject line>"
The pre-commit hook will validate .commit-approval and auto-delete it on success.
git status, identify what the user likely wants staged, ask before staging..git/COMMIT_EDITMSG before retrying.