オプション

conventional-git

samber/cc-skills samber/cc-skills

GitHubおよびGitLabプロジェクト向けの、従来のコミット v1.0.0 におけるブランチ命名規則、ワークツリー命名規則、およびコミットメッセージの標準。ブランチの作成、ワークツリーの命名、コミットの記述、コミットメッセージの生成、ブランチ規約の確認、または変更履歴の自動生成の設定を行う際に利用してください。 プロジェクトで、一貫性のあるGit履歴、SemVerに基づくリリース、解析可能な変更履歴の生成、またはイシューの自動クローズが必要な場合に適用してください。ユーザーがワークツリーの命名方法、Gitワークツリーの作成方法、または整理方法について質問した際に適用してください。

...すべて拡張します
15
更新された時間 2026年8月26日

概要conventional-git

GitHubおよびGitLabプロジェクトにおけるブランチ名、Gitワークツリー名、およびコミットメッセージに関する「Conventional Commits v1.0.0」の標準を定義します。これにより、ツールが変更履歴を自動生成したり、SemVerに基づくバージョンアップを強制したり、関心事ごとに履歴をフィルタリングしたりできるようになります。 ブランチの作成、ワークツリーの命名、コミットメッセージの作成または自動生成、ブランチ規約のレビュー、変更履歴の自動化設定を行う際、あるいはプロジェクトで一貫性のあるGit履歴、SemVerに基づくリリース、解析可能な変更履歴、イシューの自動クローズが必要な場合は、本仕様を適用してください。本仕様はClaude Codeや類似のAIコーディングエージェント向けに設計されており、gitが必要です。

ブランチ名は「/[issue-] 」という形式に従い、すべて小文字でハイフンのみを使用します。イシュー番号が存在する場合はその番号を接頭辞として付け、GitHub や GitLab が自動的にリンクできるようにし、50 文字以内に収めます。 ワークツリーは、リモートには決して反映されないローカルのチェックアウトディレクトリとして扱われます。これらは `.claude/worktrees/` 配下に配置され、ブランチ名と一致しますが、スラッシュがハイフンに置き換えられています。また、ブランチ名に「worktree」という文字列が含まれてはならないことが明示されています。 新しいワークツリーを作成する前に 'git worktree list' を実行し、ワークツリーの範囲を単一のブランチに限定し、ブランチがマージされたら 'git worktree remove' および 'git worktree prune' コマンドを使用して削除することを推奨しています。

コミットメッセージは、標準的な「[オプションのスコープ]: 」というヘッダーを使用し、本文やフッターは任意です。タイプテーブルでは、各タイプ(feat、fix、docs、style、refactor、perf、test、build、ci、chore、revert)を、SemVerへの影響と意図された用途にマッピングしています。 ルールでは、件名を72文字以内とし、命令形を用い、大文字や末尾のピリオドを使用せず、本文の前に空行を入れ、'!' または 'BREAKING CHANGE:' というフッターを用いて変更が互換性を破ることを明示的に示すことが求められます。 特に、いかなるAIエージェントについても、Claudeの署名、AIエージェントのクレジット表記、または「Co-authored-by」という末尾の表記を追加してはならないと指示されています。 また、デフォルトブランチでのイシューのクローズ(close/fix/resolveのバリエーション)に関するフッターキーワードの使用方法(リポジトリをまたぐ場合や複数のイシューをまとめてクローズする場合を含む)を記載しており、スクワッシュマージではプルリクエストのタイトルがコミットメッセージとして使用されるため、タイトルは規約に従う必要があると警告しています。

FAQ

ブランチ名はどのような形式に従うべきですか?

'/[issue-]' 小文字で、ハイフンのみを使用してください。例:feat/42-user-authentication。問題番号がある場合は、その番号を接頭辞として付け、説明は 50 文字以内に収めてください。

Gitワークツリーはどこに配置し、どのように命名すればよいですか?

.claude/worktrees/ 配下に配置し、ブランチ名と同じ名前で、スラッシュをハイフンに置き換えて命名します。ワークツリーはローカルチェックアウトの仕組みであるため、ブランチ名に「worktree」という単語を含めてはいけません。

このスキルは、AIエージェントに対して「Co-authored-by」トレーラーを追加しますか?

いいえ。このスキルは、コミットに対して、Claudeの署名、AIエージェントの帰属表示、あるいはClaudeやその他のAIエージェントに関する「Co-authored-by」トレーラーを絶対に追加しないよう明示的に指示しています。

コミットで互換性を破る変更をどのようにマークすればよいですか?

タイプまたはスコープの後に「!」を付けるか、「BREAKING CHANGE:」というフッターを追加してください。これにより、メジャーバージョンがアップします。本文のみで記述された互換性破りの変更は、変更履歴ツールには認識されません。

コミットでイシューを自動的にクローズするにはどうすればよいですか?

フッターに「Closes」、「Fixes」、「Resolves」などのキーワードとイシュー参照を記述すると、デフォルトブランチにマージされた際に自動的にイシューがクローズされます。「Closes owner/repo#42」のような、リポジトリをまたぐ形式や複数のイシューを指定する形式もサポートされています。

すべてのファイル

2ファイルevals/evals.json12.1KB表示SKILL.md7.2 KB表示
GitHubで見る

Follow Conventional Commits v1.0.0 for both branch names and commit messages — consistent naming lets tools auto-generate changelogs, enforce SemVer bumps, and filter history by concern.

Branch Naming

Format: <type>/[issue-]<description> — lowercase, hyphens only, no special chars except /.

feat/user-authenticationfeat/42-user-authenticationfix/login-race-conditionfix/87-login-race-conditiondocs/api-reference-updaterefactor/payment-module

Prefix with the issue number when one exists — GitHub and GitLab auto-link it and it makes git log immediately traceable to the tracker. Keep the description under 50 characters — most git UIs truncate branch names in lists around that length. Match the type to the work you're doing — this is the contract readers use to understand the branch purpose at a glance.

NEVER include worktree in a branch name — git worktrees are a local checkout mechanism, not a branch concept; the name would leak implementation details into the remote and confuse other contributors.

Worktree Naming

Worktrees are local checkout directories — they never appear in the remote. Place them under .claude/worktrees/ and name them by replacing the branch / separator with -.

git worktree add .claude/worktrees/feat-user-authentication feat/user-authenticationgit worktree add .claude/worktrees/fix-87-login-race-condition fix/87-login-race-condition

The directory name mirrors the branch name so git worktree list stays readable and each worktree is immediately traceable to its branch without inspecting the checkout. Run git worktree list before creating a new one — reuse an existing worktree if it already covers the same branch.

Keep worktrees scoped to a single branch. Doing unrelated work inside someone else's worktree obscures which changes belong where and makes cleanup error-prone.

Remove the worktree once its branch is merged — either after a local merge or after the pull/merge request is closed on the remote. Stale worktrees accumulate and make git worktree list unreadable.

git worktree remove .claude/worktrees/feat-user-authentication   # branch merged locallygit worktree prune                                                # remove refs to already-deleted directories

Commit Message Format

<type>[optional scope]: <description>[optional body][optional footer(s)]

Types:

TypeSemVerWhen
featMINORNew feature
fixPATCHBug fix
docsDocs only
styleFormatting, no logic change
refactorRestructure, no feature/fix
perfPerformance improvement
testAdd/fix tests
buildBuild system, deps
ciCI config
choreAnything else (not src/test)
revertReverts a previous commit

Rules:

  • Subject line ≤ 72 characters — git log and GitHub/GitLab UIs silently truncate longer subjects
  • Imperative mood: "add" not "added" — reads as an instruction, not a history log
  • No capital letter, no trailing period — enforces uniform parsing by changelog tools
  • Body separated by blank line — parsers split header/body at the first blank line
  • Breaking changes: use ! after type/scope, or add BREAKING CHANGE: footer (triggers MAJOR bump) — body-only descriptions are invisible to changelog tools
  • revert commits SHOULD include This reverts commit <hash>. in the body — git revert generates this automatically; don't strip it
  • NEVER add a Claude signature, AI agent attribution, or Co-authored-by trailer for Claude or any other AI agent to commits

Examples:

feat(auth): add JWT token refresh
fix: prevent race condition on concurrent requestsIntroduce request ID and reference to latest request.Dismiss responses from stale requests.
refactor!: drop support for Go 1.18BREAKING CHANGE: Go 1.18 no longer supported; uses stdlib APIs from 1.21+

Closing Issues via Commit Messages

Both GitHub and GitLab detect keywords in commit messages and automatically close the referenced issue when the commit lands on the default branch. Place the reference in the footer (preferred — keeps the subject line clean).

Keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved — case-insensitive.

GitHub:

fix(auth): prevent token expiry race conditionCloses #42Closes owner/repo#99
  • Triggers when merged into the default branch (usually main)
  • Cross-repo: Closes owner/repo#42
  • Close multiple: Closes #42, closes #43
  • Works in PR descriptions too

GitLab:

feat: add dark mode supportResolves #101Closes group/project#42
  • Triggers when merged into the default branch (configurable per project)
  • Cross-project: Closes group/project#42
  • Close multiple: Closes #101, closes #102
  • Works in MR descriptions too

Tip: Pair with the commit type — fix: closing a bug issue, feat: closing a feature request — keeps the changelog semantically coherent.

Common Mistakes

MistakeFix
feat: Added login pagefeat: add login page — imperative, no capital
fix: fix bug.fix: fix bug — no trailing period
Subject over 72 charsShorten; move detail to body
Breaking change only in bodyAdd ! or BREAKING CHANGE: footer — tools won't detect body-only
feat(adding-auth): ...feat(auth): ... — scope is a noun, not a verb
Closes #42 in subject lineMove to footer — keeps subject clean and parseable

Best Practices

  • Align branch type and commit type — feat/auth-* branch → feat(auth): commits
  • One concern per branch — mixing fixes into feature branches obscures the changelog
  • Use scope consistently within a branch — feat(auth): throughout, not feat(user): mid-way
  • Squash merge: when squash-merging a PR/MR, the branch commits are collapsed into one — the PR/MR title becomes the commit message. If the title doesn't follow conventional commits format, changelog generation breaks silently. Always set the PR title before squashing.

すべてのファイル

0件のファイル

conventional-gitをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/samber/cc-skills/blob/main/skills/conventional-git/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: スキルフォルダを .claude/skills/ にコピーしてください。Claude が自動的にスキルを検出して使用します。
リポジトリ samber/cc-skills

関連スキル

github-project-management
更新された時間 2026年6月29日
using-git-worktrees
更新された時間 2026年6月29日
readme-blueprint-generator
更新された時間 2026年7月5日
finishing-a-development-branch
更新された時間 2026年6月29日
OR