Agent skill
git-conventions
Git commit practices and conventions. Use when committing changes, writing commit messages, creating branches, or making PRs.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/git-conventions
SKILL.md
Git Practices
Before Starting Work
# Check current branch and status
git status
git branch
# Pull latest changes if on a shared branch
git pull
Committing Changes
-
Commit frequently — after completing each logical unit of work
-
Write descriptive commit messages — explain the "what" and "why"
-
Include the co-author line at the end of commit messages:
Co-Authored-By: Claude <[email protected]> -
Check what will be committed before committing:
bashgit status git diff --staged
Don't Commit
- Large output files (check
.gitignore) - Credentials or secrets (
.env,credentials.json, etc.) - IDE-specific files unless project convention says otherwise
- Claude Code worktrees (
.claude/worktrees/) - Rendered HTML from Quarto/Rmarkdown scripts — these are large, regenerable artifacts
When to Prompt User About Commits
- After completing a significant task
- Before switching to a different area of the codebase
- At the end of a working session (use
/doneskill) - After updating documentation
Troubleshooting
"Command not found" for git tools → Git should be available system-wide; check PATH if issues arise
Merge conflicts → Alert the user and explain the conflict before attempting resolution
Git push fails with SSH permission denied
→ SSH keys aren't available in Claude Code's terminal environment
→ Switch remote to HTTPS: git remote set-url origin https://github.com/OWNER/REPO.git
→ The gh CLI provides HTTPS authentication automatically
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?