git-commit · ilteoood — Claude Code skill: Conventional Commits on autopilot
Reads your diff, picks the commit type and scope, and writes a Conventional Commits message. Handy when every commit ends up as fix or update.
npx skills add ilteoood/harness --skill git-commit -a claude-codeWhat git-commit does
The skill inspects the changes in your repo and decides the type itself: feat, fix, docs, refactor, perf, test, build, ci, chore, revert. It then suggests a scope and a one-line description in imperative mood, under 72 characters. Breaking changes get an exclamation mark after the type or scope, or a BREAKING CHANGE footer.
The flow is straightforward. It runs git diff --staged first, falls back to git diff on the working tree when the index is empty, and checks git status --porcelain along the way. If nothing is staged, or the changes deserve separate commits, it stages files by path, by pattern such as *.test.*, or through git add -p. Then it builds the message and calls git commit -m. You can override type, scope and description by hand.
Bash is the only tool the skill is allowed to use. A safety protocol sits in the instructions: no touching git config, no --force or hard reset unless you ask, no --no-verify to skip hooks, no force push to main or master. Secrets like .env, credentials.json and private keys should stay out of the commit. When a hook rejects the commit, the skill fixes the problem and creates a new commit instead of amending.
What it helps with
- write a Conventional Commits message without reading the diff yourself
- split a messy working tree into several logical commits
- flag a breaking change so release tooling picks it up
- keep
.envfiles and private keys out of a commit - make commit history follow one style
Example prompts for the agent
- commit the changes in src/components
- make a commit with type feat and scope api
- commit only the test files, leave the rest alone
How to install git-commit
1Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a claude-code2Manually: put the files in place
~/.claude/skills/git-commit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/git-commit/
1Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a codex2Manually: put the files in place
.agents/skills/git-commit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a cursor2Manually: put the files in place
.cursor/skills/git-commit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ilteoood/harness git-commit2Manually: put the files in place
.github/skills/git-commit/SKILL.md1Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a gemini-cli2Platform CLI
gemini skills install https://github.com/ilteoood/harness --path skills/core/git-commitManually: put the files in place
.devin/skills/git-commit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about git-commit
How do I install git-commit in Claude?
Run npx skills add ilteoood/harness --skill git-commit -a claude-code. The skill lands at ~/.claude/skills/git-commit/SKILL.md.
What does git-commit do?
It reads the diff, works out the commit type and scope, and generates a Conventional Commits message. It can stage files and run git commit for you.
Which commit types does it support?
feat, fix, docs, style, refactor, perf, test, build, ci, chore and revert. Breaking changes are marked with ! after the type or scope, or with a BREAKING CHANGE footer.
Source text
SKILL.md · MIT
--- name: git-commit description: 'Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping' license: MIT allowed-tools: Bash --- # Git Commit with Conventional Commits ## Overview Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message. ## Conventional Commit Format ``` <type>[optional scope]: <description> [optional body] [optional footer(s)] ``` ## Commit Types | Type | Purpose | | ---------- | ------------------------------ | | `feat` | New feature | | `fix` | Bug fix | | `docs` | Documentation only | | `style` | Formatting/style (no logic) | | `refactor` | Code refactor (no feature/fix) | | `perf` | Performance improvement | | `test` | Add/update tests | | `build` | Build system/dependencies | | `ci` | CI/config changes | | `chore` | Maintenance/misc | | `revert` | Revert commit | ## Breaking Changes ``` # Exclamation mark after type/scope feat!: remove deprecated endpoint # BREAKING CHANGE footer feat: allow config to extend other configs BREAKING CHANGE: `extends` key behavior changed ``` ## Workflow ### 1. Analyze Diff ```bash # If files are staged, use staged diff git diff --staged # If nothing staged, use working tree diff git diff # Also check status git status --porcelain ``` ### 2. Stage Files (if needed) If nothing is staged or you want to group changes differently: ```bash # Stage specific files git add path/to/file1 path/to/file2 # Stage by pattern git add *.test.* git add src/components/* # Interactive staging git add -p ``` **Never commit secrets** (.env, credentials.json, private keys). ### 3. Generate Commit Message Analyze the diff to determine: - **Type**: What kind of change is this? - **Scope**: What area/module is affected? - **Description**: One-line summary of what changed (present tense, imperative mood, <72 chars) ### 4. Execute Commit ```bash # Single line git commit -m "<type>[scope]: <description>" # Multi-line with body/footer git commit -m "$(cat <<'EOF' <type>[scope]: <description> <optional body> <optional footer> EOF )" ``` ## Best Practices - One logical change per commit - Present tense: "add" not "added" - Imperative mood: "fix bug" not "fixes bug" - Reference issues: `Closes #123`, `Refs #456` - Keep description under 72 characters ## Git Safety Protocol - NEVER update git config - NEVER run destructive commands (--force, hard reset) without explicit request - NEVER skip hooks (--no-verify) unless user asks - NEVER force push to main/master - If commit fails due to hooks, fix and create NEW commit (don't amend)
© ilteoood · MIT · ilteoood/harness
Similar skills
All skills for Git and GitHub →git-commit by other authors comes first.