What I do
- Prevent commits to main/master by auto-creating feature branches
- Stage only files created/modified in current agent session
- Generate conventional commit messages with proper formatting
- Auto-detect when to add
[skip ci]based on project rules
When to use me
Use this skill when the user asks to commit changes made during the current session.
Branch Protection Workflow
- Check current branch:
git branch --show-current - If on
mainormaster:- Analyze
git diffand agent conversation context - Generate descriptive branch name (format:
<type>/<brief-description>) - Examples:
feat/add-csv-export,fix/npe-in-builder,docs/update-readme - If context is unclear, ask user for branch name
- Create and switch:
git checkout -b <branch-name>
- Analyze
Staging Workflow
- Stage only files that the agent created or modified in this session
- Use specific file paths:
git add <file1> <file2> <file3> - Show what will be committed:
git diff --cached --stat
Commit Message Format
- Format:
<type>: <description> - Types:
feat,fix,refactor,test,docs,chore - Requirements: Under 50 characters, no period, present tense
- Examples:
feat: add CSV exportfix: resolve NPE in builderdocs: update installation guide
CI Skip Detection
- Check if project has
AGENTS.mdfile with CI skip rules - If rules exist, add
[skip ci]suffix when changes only affect:- Documentation files (
*.md,README) - Config files (
.gitignore, IDE settings) - Non-production scripts (e.g.,
benchmark/,scripts/)
- Documentation files (
- If no
AGENTS.mdor no CI rules found → do not add[skip ci] - Example with skip:
docs: update README [skip ci]
Final Commit Step
Execute the commit with the formatted message:
git commit -m "<type>: <description>"
# or with CI skip if applicable:
git commit -m "<type>: <description> [skip ci]"