git-commit
Plans and executes git commits with optional TICKET_ID prefix. Analyzes staged changes, proposes optimal commit structure (single or multiple), generates descriptive messages with technical context, and executes after user approval. Use when committing code changes, creating atomic commits, or splitting large changesets.
Best use case
git-commit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plans and executes git commits with optional TICKET_ID prefix. Analyzes staged changes, proposes optimal commit structure (single or multiple), generates descriptive messages with technical context, and executes after user approval. Use when committing code changes, creating atomic commits, or splitting large changesets.
Teams using git-commit should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/git-commit/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-commit Compares
| Feature / Agent | git-commit | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plans and executes git commits with optional TICKET_ID prefix. Analyzes staged changes, proposes optimal commit structure (single or multiple), generates descriptive messages with technical context, and executes after user approval. Use when committing code changes, creating atomic commits, or splitting large changesets.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Git Commit Planning
Analyze staged changes and create optimal commit plan, then execute after user approval.
## Arguments
`$ARGUMENTS` may contain a TICKET_ID (e.g., `JIRA-123`, `GH-456`).
- If provided: prefix all commit messages with `TICKET_ID: `
- If empty: omit prefix, use descriptive message only
## Workflow
### 1. Confirm Commit Scope
```bash
git status --porcelain
```
Show user:
- Staged files (ready to commit)
- Unstaged changes (not included)
- Untracked files
Ask user to confirm scope:
- **Proceed with staged** - commit only what's staged
- **Add specific files** - stage additional files before commit
- **Stage all changes** - add all modified/untracked files
- **Let me stage manually** - exit and let user stage
If nothing to commit (no staged + no changes) → inform and exit.
### 2. Analyze Changes
Run in parallel:
```bash
git diff --staged --stat
git diff --staged --name-only
git log --oneline -5 # for message style reference
```
Assess:
- File count and types
- Lines changed
- Logical groupings (features, fixes, refactors)
- Whether changes should be split into multiple commits
### 3. Plan Commits
**Single commit** when:
- 1-3 related files
- Single logical change
- Coherent unit of work
**Multiple commits** when:
- Unrelated changes mixed together
- Multiple features/fixes in one staging
- Cross-functional changes (code + tests + docs should sometimes split)
### 4. Generate Messages
**Title format** (max 60 chars):
- With TICKET_ID: `TICKET-123: Add user authentication`
- Without: `Add user authentication middleware`
**Prefixes**: Add, Fix, Update, Refactor, Remove, Implement
**Body** (technical context for future readers):
Target ~50-150 words. Audience: technical people reading git history to understand WHY.
Style:
- Prose or bullets with substance (not terse lists)
- Explain the problem and why this solution
- Skip obvious details (diff shows what changed)
Anti-patterns:
- Single sentence ("Fixed the bug")
- Terse bullets ("- Added X", "- Removed Y")
- Multi-paragraph essays
**Example:**
```
TICKET-123: Fix memory leak in cache service
Cache entries weren't being cleaned up when TTL expired, causing
memory to grow unbounded under sustained load. This adds reference
counting to track active cache users and a cleanup routine in the
TTL handler that only removes entries with zero references.
```
### 5. Present Plan
Format:
```
COMMIT PLAN
===========
Files: X | Lines: +Y/-Z
Commit 1: [message title]
file1.js (new)
file2.ts (modified)
Body:
[technical explanation]
[If multiple commits, show each]
Approve? (yes/no/modify)
```
### 6. Execute
After approval:
**Single commit:**
```bash
git commit -m "title" -m "body"
```
**Multiple commits:**
1. `git reset` (unstage all)
2. For each commit:
- `git add [specific files]`
- `git commit -m "title" -m "body"`
### 7. Report
```bash
git log --oneline -3
git log -1 --format=medium
```
Show:
- Commits created
- Next steps (push, PR)
## Error Handling
- **Nothing to commit**: No staged or unstaged changes, inform and exit
- **Commit failure**: Show error, suggest fix
- **Title too long**: Truncate or splitRelated Skills
workflow-review
Reviews Claude Code sessions and proposes workflow improvements. Use when: (1) /workflow-review command, (2) "review my workflow", "how can I improve", (3) after long sessions when nudged, (4) start of session with pending review. Analyzes tool usage patterns, CLAUDE.md configuration, and compares against CC best practices. Proposes: CLAUDE.md updates, new skills, underused CC features. Saves session summaries to .claude/workflow-reviews/ for cross-session continuity.
voice-mode
Activates voice conversation mode using Pocket TTS Docker container. Use when user says "voice mode", "let's talk", "talk to me", "speak your responses", or wants Claude to respond with spoken audio. Speaks all responses through TTS and plays via speakers.
test-quality
Guides strong, effective unit test generation using proven testing techniques. Use when writing unit tests, reviewing test quality, improving existing tests, generating test cases, checking test coverage strength, or when tests exist but may be weak. Triggers on: unit test, test quality, test coverage, write tests, improve tests, review tests, test strength, mutation testing, boundary testing.
pr-review
Reviews code changes before merging. Use when reviewing PRs, checking staged changes, reviewing diffs, code review, merge readiness check, or validating changes before commit/push.
latex-presentation
Creates impressive LaTeX Beamer presentations with modern design. Generates .tex files with theme selection, font pairing, TikZ diagrams, overlays, and best practices. Use for LaTeX slides, Beamer presentations, scaffolding decks, slide design advice, or TikZ diagram generation.
ctask
Manages tasks using the ctask CLI wrapper over a local SQLite database. Use when tracking work items, creating tasks, managing dependencies, adding comments, labeling, or reviewing task status. Triggers on task tracking, ticket management, work planning, backlog management.
codex
AI peer review via OpenAI Codex CLI. Use when reviewing code changes, validating technical decisions, comparing implementation approaches, or getting a second opinion on architecture choices. Triggers on /codex, /codex-review, or auto-triggers when presenting significant alternatives to user.
codemap
Generate navigational codebase maps with architecture diagrams. Use when mapping a codebase, creating architecture docs, visualizing project structure, generating infrastructure diagrams, understanding repo layout, or onboarding to a new project.
clarice
Conducts realistic mock interviews with detailed feedback and scoring. Use for interview prep, behavioral questions, technical interviews, STAR practice, system design interviews, or interview coaching.
c7
Fetches up-to-date library documentation from Context7 and saves to /tmp/context7/. Use when needing current API docs, code examples, library references, SDK documentation, or checking latest library versions. Triggers: context7, c7, library docs, fetch docs, current documentation, api reference.
caveman-commit
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
git-precommit
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates, and MCP tool count sync. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.