commit-message skill
구조, 형식, 범위(scope), 메타데이터 트레일러를 포함한 표준화된 Git 커밋 메시지 컨벤션을 강제합니다.
- GitHub 스타
- 23
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
commit-message skill은 무엇을 하나요?
commit-message은(는) agent skill입니다. 구조, 형식, 범위(scope), 메타데이터 트레일러를 포함한 표준화된 Git 커밋 메시지 컨벤션을 강제합니다.
skill의 SKILL.md에서 생성된 요약입니다.
commit-message skill 정보
이 SKILL은 개발자와 자동화된 에이전트가 표준화된 Git 커밋 히스토리를 유지할 수 있도록 지원합니다. 커밋 메시지가 변경 사항에 대한 사실적인 기록 역할을 할 수 있도록 작성, 검토, 검증 및 수정에 대한 엄격한 프레임워크를 제공합니다. 특정 구조를 강제함으로써, 모든 메시지가 diff에 이미 나타난 내용을 반복하지 않고 코드 수정의 근거를 명확하게 전달하도록 보장합니다.
에이전트는 커밋 메시지를 생성하거나 수정할 때마다 이 SKILL을 로드해야 합니다. 이 SKILL은 scope가 지정된 제목, 설명이 포함된 본문, 그리고 메타데이터 트레일러로 구성된 구조화된 텍스트를 생성합니다. 또한 환경 오류를 방지하기 위해 제목 50자 제한, 본문 72자 줄 바꿈, ASCII 기호만 사용 등의 기술적 제약 조건을 강제합니다. 아울러 하위 호환성을 위한 BREAKING: 선언 및 이슈 추적과 작성자 정보를 위한 특정 트레일러 형식과 같은 복잡한 요구 사항도 관리합니다.
agent가 수행할 수 있는 작업
- 1표준화된 커밋 메시지 생성제공된 diff를 기반으로 제목, 본문, 트레일러의 필수 구조를 따르는 커밋 메시지를 작성합니다.
- 2breaking change 선언 형식 지정breaking change를 도입하는 커밋에 필수적인 BREAKING: 접두사와 마이그레이션 경로가 포함되도록 합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
commit-message skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 commit-message skill 설치
/plugin marketplace add xobotyi/cc-foundry /plugin install git-commit@foundry
Claude Code에 commit-message skill 설치
~/.claude/skills/commit-message/SKILL.md
$ npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message ~/.claude/skills/commit-messageClaude Code (project)에 commit-message skill 설치
.claude/skills/commit-message/SKILL.md
$ npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message .claude/skills/commit-messageCodex에 commit-message skill 설치
~/.agents/skills/commit-message/SKILL.md
$ npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message ~/.agents/skills/commit-messageGemini CLI에 commit-message skill 설치
~/.gemini/skills/commit-message/SKILL.md
$ npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message ~/.gemini/skills/commit-messageClaude.ai에 commit-message skill 설치
npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message commit-message && zip -r commit-message.zip commit-message # claude.ai → Customize → Skills → + → Create skill → Upload a skill → commit-message.zip
SKILL.md
GitHub에서 보기Commit Message Format
A commit message is a factual record of one change. It tells the reader why the change happened. The reader has the diff and the docs. The message adds only what the diff and the docs cannot show.
What Makes a Good Message
Structure
[scope] subject
body
trailers
- Subject — what changed.
- Body — the reason for the change, and the procedure that verifies it.
- Trailers — structured metadata such as references and authorship.
ASCII Symbols
- No em dash and no en dash (—, –). Use
--or-. - No arrows (→, ←, ↔). Use
->,<-, and<->. - No bullet symbols (•, ▸). Use
-or*. - No fancy quotes (“”, ‘’). Use straight quotes.
- No emoji (🐛, ✅, 🚀), unless the project conventions make them necessary.
- No other decorative symbols (©, ™, §, ¶, ∞).
Some environments break these symbols, and the symbols add no information.
Subject Line
- With a scope, for a monorepo:
[scope] <verb> <description> - Without a scope, for a single-purpose repo:
<verb> <description>
Scope (Optional)
[parser]— a top-level project[core/auth]— a nested path[web/api]— a component in a project
Derive the scope from the file paths, not from the file contents. Use the common parent directory, or the most
significant component that you changed. Use one spelling for one component. [myapp/backend] and [myapp/b] in the
same log break the filtering that the scope exists for.
A path can hold a version directory such as v2. Omit the segment while one version is alive: write [core/engine],
because the reader has one candidate. Write [core/engine/v1] and [core/engine/v2] when both versions are alive,
because the segment is then the distinction that matters.
Body
- Why the change was necessary.
- What the subject cannot hold, such as a behavior change that surprises the reader.
- How a reader verifies it later, when that is not obvious. Give the steps that the reader repeats
(
run X, confirm Y). Never give the results that you produced in this session.
Wrap each body line at 72 characters. This is a hard limit. Git tools such as log, format-patch, and email expect
72-character body lines. Trailers are the only exception.
Shape
Each paragraph after the first earns its lines, or it goes. A paragraph earns its lines when it records a fact that the diff and the docs cannot show:
- A second reason that the first paragraph does not carry.
- A
BREAKING:declaration, or a step of the migration path. - A behavior change that the subject cannot predict, such as the new meaning of an absent value.
- A one-line note about the work that follows in the chain. Name that work. Do not write "more changes coming".
The reason itself depends on the kind of change:
- A bug fix — why the defect existed, not only what you corrected.
- A feature — the use case.
- A refactor — the motivation.
- A breaking change — the migration path.
The length follows the number of reasons, not the size of the diff. A refactor of 2000 lines with one reason gets one paragraph. A migration with 6 steps gets the 6 steps. A body of 20 lines is correct only when 20 lines of reasons, declarations, and steps exist. Such a body usually holds a walkthrough, or a second unit that belongs in its own commit.
More than one behavior change. One unit can change several behaviors. Give one line to each change, in one list. Do not give a paragraph to each change:
- <behavior that the caller sees, present tense>.
- <behavior that the caller sees, present tense>
<continuation of the same item, indented two spaces>.
Mark each item with -. A wrapped line then keeps its item visible in git log. Each line gives the behavior that the
caller sees, without the old behavior as a contrast. A line that names a file, a function, or a test inventories the
diff. Delete such a line.
The list does not license a longer body. Several behavior changes under one reason stay in one commit, and the reason keeps its paragraph. Two independent reasons are two commits, whatever the number of behavior changes.
Record, Not Documentation
These signs show that a body became documentation:
- A paragraph for each decision inside the artifact. That is the design doc of the artifact.
- A walkthrough of the new behavior. A paragraph that names a function, a call order, an empty case, a fallback, or a flag that gates the new code reports the procedure, and the diff shows the procedure.
- A list of the surfaces, the files, or the tests that the change touches. The diff already lists them.
- A repeat of what the updated docs say.
Two tests. Apply both to each paragraph.
- Paste the paragraph into the repo's docs. Does it stay true and useful there? Then it belongs in the repo's docs, not in the message.
- Name the item from the earns-its-lines list above that the paragraph carries. A paragraph that matches no item is a walkthrough. Delete it.
Terse Register
The diff carries the what. The message carries the why. A body can use fragments, and it can drop articles where the meaning stays clear. Identifiers, file paths, and error strings stay exact.
The tense carries the timeline. State the current behavior in the plain present tense, because the commit itself
marks the "now". The past tense belongs to the cause of the change, and to nothing else:
Empty input dereferenced nil. Returns empty token list instead.
Never include:
- "This commit does X", "This change...". The diff says what.
- "I", "we". The commit speaks for itself.
- "now", "currently", "previously". The tense already carries the timeline.
- The old behavior as a contrast: "X, where Y used to", "no longer does Y", "changed from Y to X". The diff holds the
previous code. Name the old behavior only as the cause of a fix, or as the thing that a
BREAKING:change removes. - "As requested by...". Use a
Co-Authored-By:trailer, or write nothing. - The scope repeated:
[parser] update parser codebecomes[parser] handle empty input. - Promotional adjectives without data: "great", "amazing", "improved", "better". Say what is better.
- Filler: "just", "really", "basically", "actually", "simply". Connective fluff: "however", "furthermore", "additionally".
- Session artifacts: test counts, lint status, typecheck status, build status, quality-gate status, CI results, and verification stories. Examples: "55 of 55 tests passing", "all checks pass", "verified by building X". These record your session at commit time, not the change. A future reader cannot verify them, and the next commit makes them stale. Steps that a reader repeats are correct in the body. A log of the checks that you ran is not.
Breaking Changes
BREAKING: <what is broken>
<explanation and migration path>
Write the BREAKING: prefix in capital letters. Give a short description of what breaks after it. The paragraphs that
follow explain the reason and the migration path. Write a migration path of more than one step as a numbered list under
a Migration: line.
Trailers (Footer Metadata)
Trailers are structured key-value pairs at the end of the commit message. They use the git-trailer format.
Task:— a link to the issue tracker —Task: https://tracker.example.com/PROJ-123Fixes:— the issue that this commit corrects —Fixes: #456Refs:— related issues or commits —Refs: #123, #124Closes:— the issue that closes at merge time —Closes: #789See:— related documentation —See: docs/auth.mdReviewed-By:— the code reviewer —Reviewed-By: Alice <alice@example.com>Co-Authored-By:— an additional author —Co-Authored-By: Bob <bob@example.com>
Write each trailer key in Title-Case. Keep each value on one line. For more than one value, use a comma-separated list, or repeat the trailer.
Amending Commits
An amended commit replaces the original commit and rewrites the history. The final message must describe what the commit introduces. It must not describe the sequence of revisions.
Common violation: the agent treats the amend as iterative work. It then describes the changes against the original commit: "also update the tests", "fix the edge case from the previous version", "address review feedback". The reader has no access to the original commit, and no context for "also" or "previous".
Correct approach: read the full staged diff after the amend. Then write a message that describes the complete change as one introduction. Ignore the original message and start again.
No AI Attribution
- No "Generated with Claude Code" or a similar sentence
- No "Co-Authored-By: Claude" and no other AI co-author trailer
- No emoji that marks AI generation (🤖, and similar)
- No links to claude.com, anthropic.com, or AI tools
Commits must look like regular developer commits.
- Record, not documentation — the body carries the reason for the change. Rationale, invariants, and behavior descriptions live in the artifact and travel in the diff
- Factual subjects — what changed, not how good it is
- Explain the cause — for a bug fix, say why the code was defective
- Body is essential — a message of one line is rarely acceptable. The default body is one paragraph
- No walkthrough — the body never narrates the new procedure: the call order, the empty case, the fallback, the flag that gates it. The artifact keeps such a fact
- Length follows the reasons — not the size of the diff. Each paragraph after the first earns its lines, or it goes. Two independent reasons usually mean two commits
- Terse register — the diff carries the what, the message carries the why. No "this commit", "I", or "we". The tense carries the timeline. No filler. No promotional adjectives
- No session artifacts — test counts, lint status, CI status, gate status, and verification stories record your session, not the change. "How to verify" means steps that the reader repeats
- BREAKING first — a breaking change starts the body with
BREAKING: - Amends rewrite history — an amended message describes the full change, not the difference
- ASCII symbols — no decorative Unicode. Use the ASCII equivalents
- No AI attribution — commits look like regular developer work
이 스킬의 파일
1commit-message skill 질문
Claude Code에 commit-message skill을 어떻게 설치하나요?
npx degit xobotyi/cc-foundry/plugins/git-commit/skills/commit-message ~/.claude/skills/commit-message를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
commit-message skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
커밋 메시지에서 breaking change를 어떻게 처리해야 하나요?
본문의 첫 번째 단락은 반드시 대문자로 된 'BREAKING:' 선언으로 시작해야 하며, 그 뒤에 설명과 마이그레이션 경로가 따라와야 합니다.
제목(subject line) 작성 규칙은 무엇인가요?
제목은 50자 이내(최대 72자)로 작성해야 하며, 명령형을 사용하고, scope 뒤에는 소문자로 시작하며, 끝에 마침표를 찍지 않습니다.
커밋 메시지에서 언제 scope를 사용해야 하나요?
저장소에 여러 프로젝트, 패키지 또는 서브시스템이 포함되어 있거나, 사용자가 컴포넌트별로 로그를 필터링해야 할 때 사용합니다.