agentleFS
5hseok5hseok/hanipman-gate/skills/commit-msg/SKILL.md

commit-msg

Skill0 starsChanged 2 months agoMITView on GitHub

Compose a commit message from the actual diff, following the project's own git rules first and a conventional-commit fallback second. Two modes — normal (draft the message, the user commits) and --checkpoint (slice checkpoint commit inside an authorized /impl-pipeline batch run). Never pushes, never amends someone else's commit, never adds AI trailers. Use when: 커밋 메시지 작성, commit message, 체크포인트 커밋, staging a slice.

  • Deletes or force-pushes
  • Commits and pushes

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement, research and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Read the real change — git diff --stat, git diff (staged and unstaged), git log --oneline -10 for tone.

    line 58
  2. Distinctive:

    If the diff carries more than one purpose, do not write one message.

    line 60
  3. Distinctive:

    Stop: Do not stage, do not commit.

    line 64
  4. Distinctive:

    Only legal when all of these hold.

    line 70
  5. Distinctive:

    Only the slice's own files.

    line 81
  6. Distinctive:

    If staging leaves the working tree dirty with unrelated pre-existing edits, that is fine — they were never yours.

    line 92
  7. Very specific:

    If diagnostics are not clean, do not commit.

    line 127
  8. Very specific:

    Never: commit .claude/review/ artifacts, or anything the repo's .gitignore misses that is obviously an artifact (*.log, coverage output, …

    line 151
  9. Distinctive:

    Never: add AI attribution trailers to the commit message.

    line 153

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Commit Message

Writes the message from what the diff actually did, not from what the plan said it would do.

Two modes:

ModeWho commitsWhen
normal (default)the user, after approving the draftany commit
--checkpoint S-nthis skill, only inside an authorized /impl-pipeline batch runslice boundary

Rule source order

  1. The project's own git rules — .claude/rules/git*.md, CONTRIBUTING.md, docs/**/commit*.md, or an obvious convention in git log --oneline -30. If the repo has a convention, it wins.
  2. Conventional-commit fallback — 저장소가 아무 규칙도 안 밝힐 때만. 강요가 아니라 기본값이다:
PartRule
prefixfeat: 기능 · fix: 버그 · refactor: · chore: 설정·빌드·잡무
제목한 줄 요약. 무엇을 왜 했는지는 본문
본문이 변경이 무엇을 바꾸는지. 제목에 이미 있으면 생략
언어저장소 로그의 지배적 언어를 따른다

저장소가 다른 규칙(Angular, gitmoji, 자유 형식)을 쓰면 그쪽이 이긴다. 이 표를 근거로 저장소 관행을 바꾸려 들지 마라.

  1. No tool trailers by default. Co-Authored-By: …, Session:, 🤖 Generated with … 같은 자동 트레일러를 넣지 않는다. 저장소가 요구하면 그때 넣는다. (PR 본문은 이 규칙의 대상이 아니다.)

Normal mode

/commit-msg [--files <glob...>]
  1. Read the real change — git diff --stat, git diff (staged and unstaged), git log --oneline -10 for tone.
  2. If the diff carries more than one purpose, do not write one message. Propose a purpose-based phase split (phase 1 = …, phase 2 = …) with the files in each, and let the user pick. Mixing purposes is the thing this skill exists to prevent.
  3. Emit the draft(s). Tell the user the exact git add + git commit commands.
  4. Stop. Do not stage, do not commit.

Checkpoint mode (--checkpoint S-n)

Only legal when all of these hold. Verify them; if any fails, fall back to normal mode and say why.

  • .claude/review/{branch-slug}/run.json exists and has "commit_authorized": true — the user approved slice checkpoint commits for this run at the pipeline's Run Contract step.
  • The current branch is not the base branch (run.json.base_branch, minus origin/) and not main/master. On a base branch: abort, tell the user, never commit.
  • The slice passed its gate (S-n-gate.json → .verdict == "GREEN"), or the pipeline explicitly passed --allow-red because the slice is being parked (see below).

What gets staged

Only the slice's own files. Never git add -A, never git add ..

SLUG=$(git branch --show-current | tr '/' '-')
# 1) 이 슬라이스가 실제로 건드린 파일 = 게이트가 기록한 changed_files (글롭이 아니라 실측)
jq -r '.changed_files[].path' ".claude/review/$SLUG/S-{n}-gate.json"
  • Stage exactly those paths, minus anything under .claude/review/ (산출물은 절대 커밋하지 않는다).
  • A path that is untracked and outside the slice's target globs → do not stage it silently. List it in the run report as unstaged_out_of_scope and leave it in the working tree.
  • If staging leaves the working tree dirty with unrelated pre-existing edits, that is fine — they were never yours. Never stash them.

Message shape

<prefix>(<scope>): <슬라이스 제목>

- <주요 변경 1 — 파일이 아니라 동작 기준>
- <주요 변경 2>

Slice: S-{n}  ·  Decisions: D-1, D-3
Gate: GREEN (fix 1회)  ·  Agent-review: BLOCKING 0 / 이월 2
  • <scope> = the layer or module the slice actually lands in, taken from the changed paths. Omit it if the slice spans too many to name honestly.
  • The trailing Slice: / Gate: lines are the batch run's audit trail — they make a later git log --oneline legible as a slice ledger. Drop them in normal mode.
  • 커밋 메시지 안에 리뷰어에게 보내는 변명·TODO를 쓰지 않는다. 이월 항목은 fix-queue가 들고 있다.

After committing

git rev-parse --short HEAD      # → run.json 의 해당 슬라이스 commit_sha 로 기록

Report: S-{n} 체크포인트 커밋 <sha> — <제목>. One line. Do not print the whole diff.

Parked slice (--allow-red)

A slice that failed and is being parked is committed only if its code is in a non-breaking state — the gate's diagnostics check (check 1) has no errors. It failed on convention or on an unresolved BLOCKING review finding, which the user will judge at the review desk.

If diagnostics are not clean, do not commit. Say so and hand it back: the pipeline stashes the slice (B5) rather than leaving a broken tree for the next slice. A broken checkpoint commit is worse than none — it makes every later slice's diff unbisectable.

The message keeps the normal prefix (the convention has no wip:) and says it is parked in the title:

<prefix>(<scope>): <슬라이스 제목> — 보류(미완)

- <어디까지 됐는지>

Slice: S-{n}  ·  Decisions: D-4
Gate: RED (미해결: <항목>)  ·  검수 데스크에서 판단 필요

Hard constraints

  • Never git push. Ever. In any mode.
  • Never git commit --amend on a commit the user made, and never on a commit that is already pushed.
  • Never git add -A / git add . — always explicit paths.
  • Never commit in normal mode. Never commit in checkpoint mode without run.json.commit_authorized.
  • Never git stash, never git reset --hard, never touch other people's uncommitted work.
  • Never commit .claude/review/** artifacts, or anything the repo's .gitignore misses that is obviously an artifact (*.log, coverage output, node_modules).
  • Never add AI attribution trailers to the commit message.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.