commit skill
Generates well-crafted git commit messages by analyzing diffs and following existing repository styles.
- GitHub stars
- 75
- Files
- 1
- Last commit
- Sep 14, 2026
- License
- MIT
- Allowed tools
- 3
What does the commit skill do?
commit generates well-crafted git commit messages by analyzing diffs and following existing repository styles.
Summary generated from the skill's SKILL.md.
About the commit skill
Writing descriptive git commit messages that explain the purpose of code changes is what this skill automates for developers. When an agent needs to finalize a task, it loads this skill to analyze staged and unstaged diffs alongside recent repository history. By examining the last ten commits, the agent learns the specific formatting style used by the project to ensure consistency across the codebase.
The tool uses bash commands like git status, git diff HEAD, and git branch to gather context before drafting a message. It focuses on the reasoning behind a change rather than just listing the modified files. The process concludes by staging relevant files and executing a git commit command using heredoc syntax. To maintain repository integrity, the skill avoids interactive flags, refuses to amend existing commits without permission, and skips files that appear to contain secrets like .env or credentials.json.
What an agent can do with it
- 1Automate descriptive commit messagesAsk the agent to create a commit message that explains the reasoning behind your recent code changes.
- 2Maintain repository style consistencyHave the agent write commits that match the existing formatting and tone of your project history.
- 3Secure file stagingEnsure that sensitive configuration files are not accidentally included in your version control history.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the commit skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the commit skill in Plugin
/plugin marketplace add sneg55/agent-starter /plugin install agent-starter@agent-starter
Install the commit skill in Claude Code
~/.claude/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.claude/skills/commitInstall the commit skill in Claude Code (project)
.claude/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit .claude/skills/commitInstall the commit skill in Codex
~/.agents/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.agents/skills/commitInstall the commit skill in Gemini CLI
~/.gemini/skills/commit/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit ~/.gemini/skills/commitInstall the commit skill in Claude.ai
npx degit sneg55/agent-starter/skills/commit commit && zip -r commit.zip commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → commit.zip
SKILL.md
View on GitHubGit Commit
Context
Gather this context before committing:
- Current git status:
git status - Current git diff (staged and unstaged):
git diff HEAD - Current branch:
git branch --show-current - Recent commits:
git log --oneline -10
Git Safety Protocol
- NEVER update the git config
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
- CRITICAL: ALWAYS create NEW commits. NEVER use git commit --amend, unless the user explicitly requests it
- Do not commit files that likely contain secrets (.env, credentials.json, etc). Warn the user if they specifically request to commit those files
- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit
- Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported
Task
Based on the changes, create a single git commit:
-
Analyze all staged changes and draft a commit message:
- Look at the recent commits to follow this repository's commit message style
- Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
- Ensure the message accurately reflects the changes and their purpose (i.e. "add" means a wholly new feature, "update" means an enhancement to an existing feature, "fix" means a bug fix, etc.)
- Draft a concise (1-2 sentences) commit message that focuses on the "why" rather than the "what"
-
Stage relevant files and create the commit using HEREDOC syntax:
git commit -m "$(cat <<'EOF'
Commit message here.
EOF
)"
Stage and create the commit in a single message. Do not do anything else.
Files in this skill
1commit skill questions
How do I install the commit skill in Claude Code?
Run npx degit sneg55/agent-starter/skills/commit ~/.claude/skills/commit. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the commit skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How does the agent decide on the commit message style?
The agent analyzes recent commits in the repository to ensure the new message follows the established commit message style.
Will the agent amend existing commits?
No, the agent is instructed to always create new commits and never use git commit --amend unless explicitly requested by the user.
What happens if there are no changes to commit?
The agent will not create an empty commit if there are no untracked files or modifications.