Agent skill
safe-commit
git commit を行う際に自動発動。禁止ディレクトリ(ai/, .serena/)のコミット防止と、論理的なコミット分割を支援する。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/safe-commit
SKILL.md
Safe Commit
コミット前に必ず以下を確認・実行する。
禁止ディレクトリのチェック
コミット前に必ず実行:
# ステージングされた禁止ファイルを確認
git diff --cached --name-only | grep -E '^(ai/|\.serena/)'
# 存在する場合はアンステージ
git reset HEAD -- ai/ .serena/ 2>/dev/null || true
禁止対象
ai/- セッションログ、一時ファイル.serena/- Serena MCP設定
これらは 絶対にコミットしない。
コミット計画
複数の論理的変更がある場合は /commit-plan を実行して分割を検討。
チェックリスト
コミット実行前:
-
git diff --cached --name-onlyで禁止ディレクトリがないか確認 - 禁止ファイルがあれば
git reset HEAD -- ai/ .serena/ - 変更が論理的に分割されているか確認
- コミットメッセージが "why" を説明しているか確認
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?