MCP HubMCP Hub
スキル一覧に戻る

Enforcing Git Commit Workflow

camoneart
更新日 Yesterday
88 閲覧
2
2
GitHubで表示
開発automation

について

このスキルは、適切なファイルのステージングとプレフィックスの使用を保証することで、セマンティックなGitコミットの実践を強化します。一括的な `git add -A` 操作を防ぎ、適切なセマンティックプレフィックスを付けた、焦点が絞られ目的志向のコミットを要求します。コードをコミットする際、Gitの履歴を管理する際、またはユーザーがGit関連の操作について言及した際にご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/camoneart/claude-code
Git クローン代替
git clone https://github.com/camoneart/claude-code.git ~/.claude/skills/Enforcing Git Commit Workflow

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Enforcing Git Commit Workflow

意味のあるコミット履歴を保つための厳格なGitワークフロー管理スキル。

いつ使うか

  • コードをコミットする時
  • ユーザーがgit関連の操作を要求した時
  • コミットメッセージの作成が必要な時

基本原則

1. 機能別コミットを原則とする

各コミットは1つの明確な目的を持つこと。

2. git add -A 禁止

例外: pnpx changeset version が生成した大量のパッケージ更新を commit する場合のみ。

3. 必ず個別ステージング

# ✅ 正しい
git add path/to/changed-file.ts
git add another/file.test.ts
git commit -m "test: add edge-case tests for suggest command"

# ❌ 間違い
git add -A
git commit -m "update files"

Prefix 一覧

詳細は prefix-reference.md を参照。

主要なPrefix

Prefix用途 (日本語)説明
fixバグ修正コードの不具合を修正するコミット
hotfixクリティカルなバグ修正サービス停止レベルの緊急バグ対応
add新規機能追加新しいファイルや小規模機能を追加するコミット
feat新機能ユーザー向けの大きな機能追加または変更
update機能修正既存機能に対する修正・改善(バグ修正ではない)
change仕様変更仕様そのものを変更するコミット
clean整理使われていないコードの削除や軽微な整理
disable無効化機能を一時的に無効化(コメントアウト等)
refactorリファクタリング挙動を変えずに内部構造のみ改善
remove削除ファイル・ライブラリ・機能を削除するコミット
upgradeバージョンアップ依存ライブラリや FW のメジャーアップデート
revert変更取り消し以前のコミットを打ち消すコミット
docsドキュメントREADME やコメントのみの変更
styleスタイル修正コードフォーマット、空白、セミコロンなど動作に影響しない変更
perfパフォーマンスパフォーマンス改善のための実装変更
testテストテストコードの追加・更新・リファクタ
chore雑多メンテビルド、CI、依存更新など本番コードに影響しない作業

実行フロー

ステップ1: ファイル分類

変更ファイルを目的別にグループ化:

  • テストコード
  • 実装コード
  • ドキュメント
  • 設定ファイル

ステップ2: 個別ステージング

# テストを先にコミット
git add src/__tests__/feature.test.ts
git commit -m "test: add tests for new feature"

# 次に実装
git add src/feature.ts
git commit -m "feat: implement new feature"

ステップ3: 不明点の確認

判断できない場合は必ずユーザーに確認

  • 「この変更はどのカテゴリに属しますか?」
  • 「これらのファイルは一緒にコミットして良いですか?」

警告・中断処理

以下を検出した場合、警告を表示し処理を中断

  • git add -A の使用(例外: changeset version)
  • 不明確なコミットメッセージ
  • 複数の目的が混在するコミット

ユーザーが強制実行を指定しない限り続行しない。

自動コミット禁止

Claude Code 自身が判断して Push まで行う場合でも、上記手順に従ってログを分割すること。

参考

詳細なPrefix一覧とガイドラインは prefix-reference.md を参照。

GitHub リポジトリ

camoneart/claude-code
パス: skills/enforcing-git-commit-workflow

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

sglang

メタ

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

スキルを見る

cloudflare-turnstile

メタ

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

スキルを見る

Algorithmic Art Generation

メタ

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

スキルを見る