Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ilteoood/harness --skill git-commit -a claude-code
Open on GitHub

What 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 .env files 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-code

2Manually: put the files in place

~/.claude/skills/git-commit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/git-commit/

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.

git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. 47,165installs git-commit fvadicamo A skill that writes git commits in Conventional Commits format with a type, a required scope and a short subject. Useful when the agent commits on your behalf. CX Codex +1 319installs summarize_git_diff danielmiessler This prompt reads a git diff and returns a short conventional-commits message plus a bulleted list of what changed. ★ 44,429repo stars git-commit-helper davila7 Reads your staged changes and drafts a commit message in conventional commits format. Handy when you cannot be bothered to phrase one yourself. 7,093installs Conventional Commit Message Generator jeff-nasseri Turns a git diff or a plain description of your changes into a commit message that follows the Conventional Commits spec. Handy when you can't be bothered to recall the format. GP ChatGPT ★ 174,597repo stars git-pushing sickn33 Safely creates Conventional Commits and pushes branch changes using an isolated Git index. It prevents stray dirty files from leaking into remote branches during routine pushes. CX Codex +1 918installs re0-git LilMGenius Rewrites a finished commit message to match the local Git log style. Run it after committing when the log should explain the change without opening a diff. CX Codex +1 1,300installs commit getsentry A skill that drafts Sentry-style conventional commits with issue references and blocks direct commits to main. CX Codex +1 4,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor