code-commit skill
conventionalcommits.org の仕様に従って、git commit メッセージの生成と検証を行います。
- GitHubスター
- 51
- ファイル
- 1
- 最終コミット
- 2026年11月7日
- ライセンス
- MIT
- 許可されたツール
- —
code-commit skillは何をしますか
code-commitはAgent Skillsです。 conventionalcommits.org の仕様に従って、git commit メッセージの生成と検証を行います。.
skillのSKILL.mdから生成された要約。
code-commit skill について
この SKILL は、conventionalcommits.org の仕様に準拠した、標準化された git commit メッセージの作成を開発者に提供します。ワークツリーの検査、変更内容の分析、そして特定の type、scope、命令形のタイトルを含むメッセージのドラフト作成プロセスを自動化します。ユーザーがコードのコミットに言及したり、コミットの作成を依頼したり、既存のメッセージのフォーマットを確認する必要がある場合に、エージェントはこのツールをロードする必要があります。
正確性を期すため、この SKILL は git status、git diff、git log などのコマンドを使用して変更のコンテキストを理解し、リポジトリに確立されたパターンに合わせます。feat、fix、refactor といった適切な type を識別し、規定の構文を使用して破壊的変更を処理します。プロセスには安全レイヤーが含まれており、エージェントは git add や git commit を実行する前に、特定のファイルとメッセージを提案して承認を求めます。また、リポジトリの commit hook を尊重し、プルリクエストの作成を他の専門的なツールに委ねることも可能です。
エージェントができること
- 1新しいコミットの生成エージェントが現在のワークツリーを検査し、ユーザーが承認するためのフォーマット済みコミットメッセージを提案します。
- 2メッセージ構文の検証特定のコミットメッセージが conventional commits 標準に準拠しているかを確認できます。
- 3破壊的変更の特定特定のフッターや記号を使用して、破壊的変更を明確に示すようにメッセージをフォーマットできます。
- 4ステージングされた変更のレビューdiff を分析して、コミットメッセージが実際のコード変更を正確に記述しているかを確認します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
code-commit skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにcode-commit skillをインストールする
/plugin marketplace add martinffx/atelier /plugin install atelier@atelier
Claude Codeにcode-commit skillをインストールする
~/.claude/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.claude/skills/code-commitClaude Code (project)にcode-commit skillをインストールする
.claude/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit .claude/skills/code-commitCodexにcode-commit skillをインストールする
~/.agents/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.agents/skills/code-commitGemini CLIにcode-commit skillをインストールする
~/.gemini/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.gemini/skills/code-commitClaude.aiにcode-commit skillをインストールする
npx degit martinffx/atelier/skills/code-commit code-commit && zip -r code-commit.zip code-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → code-commit.zip
SKILL.md
GitHubで表示Conventional Commit Skill
Create coherent, reviewable commits that follow the Conventional Commits specification. Message syntax matters, but the selected changes must tell one clear story too.
Message Format
Every generated commit has a title and body:
<type>(<scope>): <imperative title>
<1-5 lines describing the change and, when useful, its reason or effect>
Use a lowercase scope that identifies the affected component. The title is concise, imperative, lowercase, and has no trailing period. The body is concrete: explain the behavior, motivation, or important implementation decision rather than restating the title.
| Type | Use for |
|---|---|
feat |
New user-facing capability |
fix |
Corrected behavior |
docs |
Documentation only |
style |
Formatting only |
refactor |
Restructuring without behavior change |
test |
Tests only |
chore |
Maintenance or tooling |
perf |
Performance improvement |
ci |
Continuous integration configuration |
build |
Build system or dependencies |
revert |
Reverting a prior commit |
Breaking changes may use ! after the type or scope, a BREAKING CHANGE: footer, or both.
Include issue footers such as Closes #123 only when the issue is known.
Create a Commit
When the user asks to commit, first inspect the complete worktree:
- Run
git status --short. - Read both
git diff --cachedandgit diffso pre-staged work is not mistaken for the entire change. - List untracked files with
git ls-files --others --exclude-standardand inspect relevant ones. - Read recent subjects with
git log --oneline -10to match established scopes and wording. - Flag likely secrets, credentials, local configuration, or generated output. Do not stage them without explicit direction.
Decide Whether to Split
Default to one commit containing all intended, related changes. Look for an obvious file-level split only when changes are independent and each group can stand alone.
Keep these together:
- Implementation and its tests.
- Documentation that describes the same change.
- Dependency manifests and their lockfiles.
Do not invent a split for adjacent work, use hunk-level staging, or force the user to reorganize a coherent change. If an obvious split exists, propose each commit with its files and full message, then ask once for approval. If not, propose one commit.
Approve, Stage, Commit
Before making any write, show:
- The files in each proposed commit.
- The full title and 1-5 line body for each commit.
- Any excluded files and why they are excluded.
Ask for approval unless the user explicitly authorizes committing immediately. After
approval, stage only the files for the approved commit with git add -- <paths> and
inspect git diff --cached --name-status and git diff --cached again. If the staged snapshot
contains any unapproved file, stop and ask how to handle it. Then commit with the proposed title
and body. Do not amend, rebase, push, or include unapproved files.
Repository commit hooks are the final message validation when configured. Never bypass a failing hook. Report the commit hash on success; report the error and leave changes intact on failure.
Validate a Commit Message
When the user asks to validate a message, check:
- It follows
type(scope): imperative title. - The type is listed above and the scope is lowercase.
- The title is lowercase, imperative, concise, and has no trailing period.
- A body follows after a blank line and contains 1-5 meaningful lines.
- Breaking changes use both
!and aBREAKING CHANGE:footer.
Return specific corrections and a revised message. When the repository configures commitlint, use it as the authoritative validation rule.
Delegated: Pull Request Creation
If the user wants to create a PR after committing, invoke the
code-pull-request skill. It detects the platform
(GitHub/GitLab), finds a template, generates the body, and opens the PR via gh
or glab.
Input Methods
| Input | Action |
|---|---|
| User says "commit" or "git commit" | Inspect the worktree, propose coherent commit(s), then commit after approval |
| User says "validate commit" | Check the commit message format |
| User pastes commit message | Validate the provided message |
Error Handling
- If there are no changes: report that there is nothing to commit.
- If Git is not initialized: report it; do not initialize a repository unless asked.
- If a commit fails: show the error, preserve the worktree, and do not bypass hooks.
Examples
Input: "I fixed the login bug" Output:
fix(auth): resolve login timeout issue
Correct token expiry calculation so active users are not logged out after five minutes.
Input: "I added a new API endpoint for users" Output:
feat(api): add user profile endpoint
Expose name, email, and avatar URL from `GET /users/:id`.
Closes #89
Input: "I changed the auth API, this breaks old clients" Output:
feat(auth)!: change token validation endpoint
Require a Bearer token on `/auth/verify` instead of a query parameter.
BREAKING CHANGE: Clients must update to send
Authorization header with Bearer token.
このスキルのファイル
1code-commit skillに関する質問
Claude Codeにcode-commit skillをインストールするには
npx degit martinffx/atelier/skills/code-commit ~/.claude/skills/code-commitを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
code-commit skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
conventional commit メッセージの必須フォーマットは何ですか?
フォーマットは、type とオプションの scope、それに続く命令形のタイトル、および 1〜5 行のオプションの body で構成されます。
破壊的変更(breaking changes)は commit メッセージ内でどのように示すべきですか?
type または scope の後に感嘆符(!)を付ける、'BREAKING CHANGE:' フッターを含める、あるいはその両方を用いることで示すことができます。
エージェントはコードをコミットする前にどのような手順を踏みますか?
エージェントは git status を使用してワークツリーを検査し、diff を読み取り、未追跡ファイルをリストアップし、最近のログを確認して、機密情報が含まれていないかをチェックします。