Agent skill
commit-safe
安全なコミットを支援するスキル。変更内容を確認してから選択的にコミット。大きな変更時にファイル指定コミットを提案、git add -Aの使用を防止。
Install this agent skill to your Project
npx add-skill https://github.com/dobachi/AI_Instruction_Kits/tree/main/templates/claude-skills/ja/commit-safe
SKILL.md
安全コミットスキル
変更内容を確認してから、選択的にコミットを行うスキルです。
自動提案のタイミング
| 状況 | 提案内容 |
|---|---|
| コード変更後 | 「変更をコミットしますか?」 |
| 複数ファイル変更時 | 「ファイルを選択してコミットしますか?」 |
| git add -A 使用時 | 「ファイルを指定してコミットすることを推奨します」 |
実行手順
1. 変更内容の確認
git status --short
git diff --stat
2. ファイル指定コミット
# ファイルを指定してステージング
git add [指定ファイル...]
# コミットメッセージ付きでコミット
bash scripts/commit.sh "コミットメッセージ"
3. コミットメッセージ規約
<type>: <description>
- feat: 新機能追加
- fix: バグ修正
- docs: ドキュメント更新
- refactor: リファクタリング
- test: テスト追加・修正
使用例
# 特定ファイルのみコミット
git add src/main.py src/utils.py
bash scripts/commit.sh "feat: 新機能追加"
# ドキュメントのみコミット
git add README.md docs/guide.md
bash scripts/commit.sh "docs: README更新"
推奨ワークフロー
git statusで変更を確認- 関連する変更をグループ化
- ファイルを指定してコミット
- 大きな変更は複数の小さなコミットに分割
注意事項
git add -Aやgit add .の使用は避ける- コミットには
scripts/commit.shを使用(AI署名防止) - 機密ファイル(.env, credentials等)をコミットしない
- コミット前に必ず
git diff --stagedで内容を確認
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
auto-build
プロジェクトタイプを自動検出してビルドを実行するスキル。コード変更後にビルドを提案、エラー発生時は修正案を提示。Node.js、Rust、Python、Go、Makefileプロジェクトに対応。
checkpoint-manager
タスクの進捗を追跡・管理するスキル。会話開始時に未完了タスクを確認、新規タスク依頼時にタスク開始を提案、作業完了時に完了報告を提案。チェックポイントシステムと連携。
worktree-manager
Git worktreeの作成・管理を行うスキル。複雑なタスクや複数ファイル変更時にworktree作成を提案、タスク完了時にマージ・クリーンアップを案内。checkpoint-managerと連携。
auto-build
Skill for auto-detecting project type and executing builds. Suggests builds after code changes, proposes fixes for build errors. Supports Node.js, Rust, Python, Go, and Makefile projects.
checkpoint-manager
Skill for tracking and managing task progress. Checks pending tasks at conversation start, proposes task creation for new requests, suggests completion reports when work is done. Integrates with checkpoint system.
commit-safe
Skill for safe commits. Reviews changes before selective commits. Proposes file-specific commits for large changes, prevents use of git add -A.
Didn't find tool you were looking for?