Agent Skills: Safe Commit Skill

Skill for safe commits. Reviews changes before selective commits. Proposes file-specific commits for large changes, prevents use of git add -A.

UncategorizedID: dobachi/AI_Instruction_Kits/commit-safe

Install this agent skill to your local

pnpm dlx add-skill https://github.com/dobachi/AI_Instruction_Kits/tree/HEAD/templates/claude-skills/en/commit-safe

Skill Files

Browse the full folder contents for commit-safe.

Download Skill

Loading file tree…

templates/claude-skills/en/commit-safe/SKILL.md

Skill Metadata

Name
commit-safe
Description
Skill for safe commits. Reviews changes before selective commits. Proposes file-specific commits for large changes, prevents use of git add -A.

Safe Commit Skill

A skill for reviewing changes and performing selective commits.

Auto-Suggestion Triggers

| Situation | Suggestion | |-----------|------------| | After code changes | "Shall I commit the changes?" | | Multiple file changes | "Shall I commit specific files?" | | git add -A usage | "Recommend specifying files for commit" |

Procedure

1. Review Changes

git status --short
git diff --stat

2. File-Specific Commit

# Stage specific files
git add [specified files...]

# Commit with message
bash scripts/commit.sh "commit message"

3. Commit Message Convention

<type>: <description>

- feat: New feature
- fix: Bug fix
- docs: Documentation update
- refactor: Refactoring
- test: Test additions/modifications

Examples

# Commit specific files only
git add src/main.py src/utils.py
bash scripts/commit.sh "feat: Add new feature"

# Commit documentation only
git add README.md docs/guide.md
bash scripts/commit.sh "docs: Update README"

Recommended Workflow

  1. Check changes with git status
  2. Group related changes together
  3. Commit with specific files
  4. Split large changes into multiple small commits

Notes

  • Avoid using git add -A or git add .
  • Use scripts/commit.sh for commits (prevents AI signatures)
  • Never commit sensitive files (.env, credentials, etc.)
  • Always review with git diff --staged before committing