git-commit skill
scriptsdiffからConventional Commitsメッセージを生成し、git commitを実行します。
- GitHubスター
- 8
- ファイル
- 4
- 最終コミット
- 2026年10月28日
- ライセンス
- MIT
- 許可されたツール
- —
git-commit skillは何をしますか
git-commitはAgent Skillsです。 diffからConventional Commitsメッセージを生成し、git commitを実行します。.
skillのSKILL.mdから生成された要約。
git-commit skill について
このSKILLは、ターミナルベースの環境で作業する開発者が、標準化されたcommitメッセージの作成とgit commitの実行を自動化できるようにします。エージェントが変更をステージングしたり、コード修正を完了させたりする必要がある際、このツールをロードしてステージング済みまたは未ステージングのdiffを分析します。conventionalcommits.orgの仕様に従ってConventional Commitsメッセージを生成し、すべてのエントリにtype、オプションのscope、および命令形の記述が含まれることを保証します。
このプロセスは、推測ではなく実際のコード変更を正確に反映させるために、git statusとgit diffの読み取りに基づいています。また、pre-commitリンティングメカニズムが含まれており、npm、ruff、flake8、golangci-lintなどのプロジェクト固有のリンターを自動的に検出して実行し、品質チェックに失敗したcommitをブロックします。このツールは標準的な開発用commit向けに設計されており、リリース用のcommit生成やブランチ終了のワークフロー管理には使用しないでください。
エージェントができること
- 1Conventional Commitsメッセージの生成AIエージェントが、コードのdiffに見られる具体的な変更に基づいて、構造化されたcommitメッセージを記述できます。
- 2破壊的変更の適切な処理開発者はこのツールを使用して、必要な感嘆符やフッターを含む形式で、破壊的変更を自動的にフォーマットできます。
- 3混在した変更のcommitへの整理エージェントは、diffに無関係な内容が含まれていることを識別し、それらを別々のcommitに分割することを提案できます。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
git-commit skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにgit-commit skillをインストールする
/plugin marketplace add mgiovani/cc-arsenal /plugin install cc-arsenal@cc-arsenal-marketplace
Claude Codeにgit-commit skillをインストールする
~/.claude/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.claude/skills/git-commitClaude Code (project)にgit-commit skillをインストールする
.claude/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit .claude/skills/git-commitCodexにgit-commit skillをインストールする
~/.agents/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.agents/skills/git-commitGemini CLIにgit-commit skillをインストールする
~/.gemini/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.gemini/skills/git-commitClaude.aiにgit-commit skillをインストールする
npx degit mgiovani/cc-arsenal/skills/git-commit git-commit && zip -r git-commit.zip git-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → git-commit.zip
SKILL.md
GitHubで表示Git Commit
Generate a conventional commit message and create the commit.
Quality Guidelines
Base the message only on what the diff actually shows, not assumptions:
- Read
git statusandgit diff --staged(orgit diffif nothing is staged yet) before writing anything. - Check which files/modules changed before setting scope.
- Look for removed exports, changed signatures, deleted functions to catch breaking changes.
- If the purpose of a change is unclear, ask the user rather than guess.
Pre-commit Linting
In Claude Code, a PreToolUse hook runs before every git commit: it detects the project's
linter (Node's npm/bun/pnpm/yarn run lint, Python's ruff/flake8, make lint, rubocop,
golangci-lint) and blocks the commit if it fails. No linter configured means the commit
proceeds unblocked. Outside Claude Code (no hook support), run the project's lint command
yourself before committing. Never bypass a failing lint with --no-verify: fix the errors
and re-run the commit instead.
Workflow
- Run
git statusandgit diff --stagedto see what actually changed. - If the diff mixes unrelated concerns (e.g. a feature plus an unrelated fix plus docs),
split into separate commits by staging each group with
git add <files>and committing them one at a time. Otherwise, one commit is enough, don't force a split. - For each commit, pick the type:
feat: new featurefix: bug fixdocs: documentation onlystyle: formatting, no code meaning changerefactor: neither fixes a bug nor adds a featureperf: performance improvementtest: adding or correcting testsbuild: build system or dependency changesci: CI configuration/scriptschore: everything else that doesn't touch src or testsrevert: reverts a previous commit
- Format as
type(scope): description, scope optional, description imperative mood ("add" not "added"), max ~50 characters. Skip the body for a typo fix or a single dependency bump; add a wrapped body (why, not how) once the change alters behavior or touches multiple files. For breaking changes, append!after the scope and add aBREAKING CHANGE: ...footer.
Example formats
feat(auth): add OAuth2 login support
fix(api): resolve null pointer in user endpoint
docs: update installation instructions
chore(deps): bump lodash to 4.17.21
feat(shopping-cart)!: remove deprecated calculate method
BREAKING CHANGE: calculate has been removed, use computeTotal instead
Ask for confirmation before committing if the changes are complex or span multiple concerns; otherwise just commit.
このスキルのファイル
4git-commit skillに関する質問
Claude Codeにgit-commit skillをインストールするには
npx degit mgiovani/cc-arsenal/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内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
プロジェクトにリンターが設定されている場合はどうなりますか?
commitの前にPreToolUse hookが実行され、プロジェクトのリンターを検出します。リンターのチェックに失敗した場合は、commitがブロックされます。
無関係な変更が複数含まれるdiffはどう扱うべきですか?
git add <files>を使用して変更のグループごとに個別にステージングし、一つずつcommitすることで、変更を別々のcommitに分割してください。
破壊的変更(breaking change)のcommit形式は?
破壊的変更の場合は、scopeの後に感嘆符(!)を追加し、フッターに 'BREAKING CHANGE: ...' を含める必要があります。