Agent skill
git-commit
Commit changes with an emphasis on tidiness and reviewability: small, focused commits, with clear rationale in messages.
Install this agent skill to your Project
npx add-skill https://github.com/goncalossilva/.agents/tree/main/skills/git-commit
SKILL.md
Git Commit
Use this skill as the playbook for producing reviewable commits and a clean, consistent commit history.
Phase 1: Review changes
- Check what files have changed
- If there are no changes to commit, inform the user and stop
- If there are unstaged changes, stage them with
git add
Rules:
- Keep commits small, focused, and atomic
- Avoid commits that mix unrelated changes (e.g., "Address feedback")
- Never stage or commit files that look like secrets (e.g.
.env, credentials, API keys)
Phase 2: Generate commit message
- Remember commit messages best practices
- Write a short subject line:
- Up to 50 chars
- Start subject with a capital letter, don’t end with a period
- Use imperative mood (e.g. "Fix memory leak while scrolling widget")
- Leave a blank line between subject and body
- Only when needed (don’t force it for trivial changes), write a body:
- Wrap lines at 72 chars
- Focus on "what" and "why", not the "how"
- Explain the motivation
- Mention side effects, trade-offs, or alternatives considered
- Reference relevant issue IDs / tickets at the bottom if known
- Check style of recent commits in the repo (tone, structure, capitalization, length, etc):
git log -10 --oneline - Generate a message that adheres to the style in the repo while following best practices
Rules:
- Never stage files that look like secrets (e.g.
.env, credentials, API keys) - Do not add yourself as an author or contributor
- Do not include "Generated with ...", "Co-Authored-By: ...", or any AI attribution
Phase 3: Commit
- Commit staged changes with
git commit
Rules:
- Avoid
git commit --amendunless explicitly requested - Do not bypass hooks with
git commit --no-verify- If
git commitfails due to hooks, fix issues and retry
- If
- Use
git commit -F(or heredoc) when there is a body, never newline escapes in-m. - Never push to remotes unless explicitly requested
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
update-changelog
Update CHANGELOG.md following Keep a Changelog (https://keepachangelog.com/en/1.1.0/)
homeassistant-ops
Operate a Home Assistant instance via the official REST/WebSocket APIs and backups, with safe plan/apply workflows for bulk, reviewable changes.
browser-tools
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
oracle
Get a second opinion by bundling a prompt + a curated file set, then asking another powerful LLM for debugging, refactor advice, design checks, or code reviews.
git-clean-history
Reimplement the current Git branch on a fresh branch off `main` with a clean, narrative-quality commit history.
sentry
Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times.
Didn't find tool you were looking for?