git-commit skill
diffを分析し、セマンティックな仕様に従って変更をステージングすることで、標準化されたconventional commitsを生成します。
- GitHubスター
- 7
- ファイル
- 1
- 最終コミット
- 2026年11月6日
- ライセンス
- MIT
- 許可されたツール
- 1
git-commit skillは何をしますか
git-commitはAgent Skillsです。 diffを分析し、セマンティックな仕様に従って変更をステージングすることで、標準化されたconventional commitsを生成します。.
skillのSKILL.mdから生成された要約。
git-commit skill について
このSKILLは、コードの変更を分析して、標準化されたgit commitの作成を自動化します。開発者はこれを利用して、生のdiffを、feat、fix、refactorなどの特定のtypeを含むConventional Commits仕様に準拠したセマンティックなメッセージに変換できます。エージェントに変更のコミットを依頼するか、/commitコマンドを受け取ると、このSKILLをロードしてbashコマンドを使用してワーキングツリーやステージング済みのファイルを検査します。
プロセスでは、diffを分析して適切なtype、scope、および命令形のdescriptionを決定します。最終的なcommitを実行する前に、git addを使用して特定のファイルやパターンをステージングすることも可能です。このSKILLは、descriptionを72文字以内に収めることや、how(どのように)ではなくwhy(なぜ)にのみ焦点を当てたcaveman bodyスタイルを使用することなど、厳格なフォーマットルールを適用します。また、機密情報のコミットや、許可なくhard resetのような破壊的なコマンドを実行することを防ぐためのセーフティプロトコルも含まれています。
エージェントができること
- 1セマンティックなコミットメッセージの生成conventional commitの標準に従って、現在の変更に基づいたコミットを作成するようエージェントに依頼します。
- 2履歴へのAI属性の付与を防止コミットメッセージに自動署名やAI作成者に関する言及が含まれないようにします。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
git-commit skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにgit-commit skillをインストールする
/plugin marketplace add HigorAlves/orc /plugin install orc@orc
Claude Codeにgit-commit skillをインストールする
~/.claude/skills/git-commit/SKILL.md
$ npx degit HigorAlves/orc/orc/skills/git-commit ~/.claude/skills/git-commitClaude Code (project)にgit-commit skillをインストールする
.claude/skills/git-commit/SKILL.md
$ npx degit HigorAlves/orc/orc/skills/git-commit .claude/skills/git-commitCodexにgit-commit skillをインストールする
~/.agents/skills/git-commit/SKILL.md
$ npx degit HigorAlves/orc/orc/skills/git-commit ~/.agents/skills/git-commitGemini CLIにgit-commit skillをインストールする
~/.gemini/skills/git-commit/SKILL.md
$ npx degit HigorAlves/orc/orc/skills/git-commit ~/.gemini/skills/git-commitClaude.aiにgit-commit skillをインストールする
npx degit HigorAlves/orc/orc/skills/git-commit git-commit && zip -r git-commit.zip git-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → git-commit.zip
自動チェック
実行日 2026年11月15日完全なレポート →まだ検証されていません。スキルにはスコア 80、重大な指摘なし、チェックに十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能higoralves/orc/orc/skills/git-commit is public and reachablegithub.com/higoralves/orc/tree/HEAD/orc/skills/git-commit ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-06github.com/higoralves/orc/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/higoralves/orc/blob/HEAD/orc/skills/git-commit/SK ↗合格
- 事前許可ツールが限定されているBash lets the agent run any shell command without askinggithub.com/higoralves/orc/blob/HEAD/orc/skills/git-commit/SK ↗検出事項
- SKILL.md が Agent Skills の形式に従っているthe description does not say when to use the skillgithub.com/higoralves/orc/blob/HEAD/orc/skills/git-commit/SK ↗検出事項
SKILL.md
GitHubで表示Git Commit with Conventional Commits
Overview
Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
Conventional Commit Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Commit Types
| Type | Purpose |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting/style (no logic) |
refactor |
Code refactor (no feature/fix) |
perf |
Performance improvement |
test |
Add/update tests |
build |
Build system/dependencies |
ci |
CI/config changes |
chore |
Maintenance/misc |
revert |
Revert commit |
Breaking Changes
# Exclamation mark after type/scope
feat!: remove deprecated endpoint
# BREAKING CHANGE footer
feat: allow config to extend other configs
BREAKING CHANGE: `extends` key behavior changed
Workflow
1. Analyze Diff
# If files are staged, use staged diff
git diff --staged
# If nothing staged, use working tree diff
git diff
# Also check status
git status --porcelain
2. Stage Files (if needed)
If nothing is staged or you want to group changes differently:
# Stage specific files
git add path/to/file1 path/to/file2
# Stage by pattern
git add *.test.*
git add src/components/*
# Interactive staging
git add -p
Never commit secrets (.env, credentials.json, private keys).
3. Generate Commit Message
Analyze the diff to determine:
- Type: What kind of change is this?
- Scope: What area/module is affected?
- Description: One-line summary of what changed (present tense, imperative mood, <72 chars)
Caveman bodies (the default)
The subject carries the what; the diff shows the how. The body exists only for the why that neither shows — and most commits don't have one. Default to no body.
When a body earns its place:
- ≤ 3 short lines (or bullets). A body that needs paragraphs is a PR description or a doc, not a commit message.
- Why only. The motivating bug, constraint, or decision — one line each.
- Never restate the diff ("adds X, renames Y" — the diff says so).
- Never narrate correctness ("this ensures", "now properly", "tests confirm") — CI and the reviewer decide that.
- Never tour the files touched. Never marketing voice.
- Trailers (
Refs #N,Size-budget-override:) go last, unchanged.
# Wrong — essay body
feat(hooks): pre-git-guard dispatcher
git push --force on a protected branch used to spawn two PreToolUse
prompts (branch-check + destructive-check both wired to git push*).
A new dispatcher runs all three checks against the incoming command
and merges verdicts into at most one decision: deny > ask, reasons
joined with ALSO. hooks.json collapses 9 wirings to 7 unique...
# Right — caveman body
feat(hooks): pre-git-guard dispatcher — one prompt per guarded command
Force-push on protected branches double-prompted (two matchers, one command).
Merge rule: deny > ask; reasons joined with ALSO.
4. Execute Commit
# Single line
git commit -m "<type>[scope]: <description>"
# Multi-line with body/footer
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>
<optional body>
<optional footer>
EOF
)"
Best Practices
- One logical change per commit
- Present tense: "add" not "added"
- Imperative mood: "fix bug" not "fixes bug"
- Reference issues:
Closes #123,Refs #456 - Keep description under 72 characters
- No body by default; when present, caveman rules above (≤3 lines of why)
No AI attribution (overrides Claude Code default)
orc iron rule #5. Never include any of the following in commit messages:
Co-Authored-By: Claude …Co-Authored-By: <noreply@anthropic.com>(any email at anthropic.com)🤖 Generated with [Claude Code](…)(or any "Generated with" line)- Any other mention of Claude, AI, or automation as the author
This overrides Claude Code's default system-prompt instruction to add
those trailers. The orc PreToolUse hook
(pre-commit-no-ai-attribution.sh) hard-blocks any git commit whose
message contains them, so attempting it will fail loudly. Don't try.
Override only with explicit user consent: ORC_ALLOW_AI_ATTRIBUTION=1.
Git Safety Protocol
- NEVER update git config
- NEVER run destructive commands (--force, hard reset) without explicit request
- NEVER skip hooks (--no-verify) unless user asks
- NEVER force push to main/master
- If commit fails due to hooks, fix and create NEW commit (don't amend)
このスキルのファイル
1git-commit skillに関する質問
Claude Codeにgit-commit skillをインストールするには
npx degit HigorAlves/orc/orc/skills/git-commit ~/.claude/skills/git-commitを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
git-commit skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
conventional commitの必須フォーマットは何ですか?
フォーマットは <type>[optional scope]: <description> に従い、その後に任意のbodyとfooterを続ける形式です。
commit bodyを含める必要がある場合はどうすればよいですか?
bodyは3行以内の短い文章または箇条書きに留め、diffの内容を繰り返すのではなく、変更の「理由」のみに焦点を当ててください。