Agent skill
commit
Standardized git commit, push, and PR creation workflow.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-djnsty23-claude-auto-dev
SKILL.md
Commit Workflow
Working Tree
!git status --short 2>/dev/null
!git diff --stat HEAD 2>/dev/null | tail -5
!git log --oneline -5 2>/dev/null
Quick Commit
# 1. Check what changed
git status --short
git diff --stat
# 2. Stage specific files (never git add -A blindly)
git add src/components/new-feature.tsx src/lib/utils.ts
# 3. Commit with conventional format
git commit -m "feat: add playlist drag-drop reorder"
Conventional Commits (Required)
<type>: <short description>
[optional body]
| Type | When |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code restructure, no behavior change |
chore |
Dependencies, config, tooling |
docs |
Documentation only |
test |
Add or update tests |
perf |
Performance improvement |
Rules:
- Subject line < 70 chars
- Imperative mood: "add" not "added"
- No period at end
- Body explains WHY, not WHAT
Commit + Push
git add <files>
git commit -m "feat: description"
git push origin HEAD
Full PR Flow (commit-push-pr)
# 1. Create branch if on main
git checkout -b feat/playlist-ui
# 2. Stage and commit
git add <files>
git commit -m "feat: add playlist UI with drag-drop"
# 3. Push
git push -u origin feat/playlist-ui
# 4. Create PR
gh pr create --title "Add playlist UI" --body "## Summary
- Drag-drop playlist reorder
- Play queue integration
- Uses existing API routes
## Test plan
- [ ] Create playlist
- [ ] Reorder songs
- [ ] Play from playlist"
Safety Checks
Before committing (if ANY fail, fix before proceeding):
-
npm run typecheckpasses -
npm run buildpasses - No
.envfiles staged — unstage if found - No
console.login staged files — remove if found - No hardcoded secrets — remove if found
Before pushing:
- Branch is correct (not pushing to main accidentally)
- Commit messages are clean
If issues found: fix them, re-stage, re-run checks, THEN commit.
Version Sync Check (claude-auto-dev repo only)
When committing to this repo, check for stale version strings before staging:
# Read current version
VERSION=$(cat VERSION 2>/dev/null)
# Grep for previous version references (skip CHANGELOG.md - it's historical)
grep -rn "4\.9\.4\|v4\.9" --include="*.md" --include="*.json" --include="*.ps1" --include="*.sh" . \
| grep -v CHANGELOG.md | grep -v node_modules | grep -v .git
If stale versions found: fix them before committing.
Files to check: VERSION, package.json, manifest.json, README.md badge, commands.md, install.sh fallback, install.ps1 fallback.
The current version is: !cat VERSION 2>/dev/null
Batch Commit (During Auto Mode)
During auto, commit every 3 tasks:
git add -A -- ':!.env*' ':!*.pem' ':!*.key' ':!*.secret'
git commit -m "feat: complete S9-1 through S9-3
- S9-1: Playlist UI with drag-drop
- S9-2: Song extend from timestamp
- S9-3: Onboarding wizard"
Amend Last Commit
Only if not pushed yet:
git add <missed-files>
git commit --amend --no-edit
Undo Last Commit (Keep Changes)
git reset --soft HEAD~1
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?