Skip to main content
skill CX Codex

git-commit · thinkflowlab — Claude Code skill: what it does, how to install

git-commit is a Claude Code skill that creates Git commits or drafts commit messages exclusively from the staged index. Runs on requests to commit staged work or generate commit notes.

Apache-2.0 ★ 413 updated 2026-11-17

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

What git-commit does

The skill runs git diff --staged before executing any Git action. If the staging area is empty, it halts immediately without adding files or making empty commits. Working tree files and general conversation history are ignored when evaluating what was changed.

Commit titles follow the [type] scope: imperative description pattern using defined types like [feat] or [bugfix], while the commit body starts with an exact ## summary header. The message is written to a temporary file outside the working tree, then committed via git commit --file <message-file>.

Commands such as git add, git stage, and git commit -a are prohibited during the commit sequence. If a push is explicitly requested, it rebases onto the upstream branch first and stops if conflicts occur instead of using force push.

What it helps with

  • commit staged index changes without touching working tree files
  • format commit messages with standard type tags and summary blocks
  • prevent unreviewed changes from being staged automatically
  • handle pre-push rebase conflict resolution safely

Example prompts for the agent

  • Draft a commit message for the current staged changes
  • Commit the staged changes
  • Create a chore commit from the current index

How to install git-commit

1Skills CLI (Vercel)

npx skills add ThinkFlowLab/OpenDirector --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 to install git-commit in Claude Code?

Run npx skills add ThinkFlowLab/OpenDirector --skill git-commit -a claude-code.

What does git-commit do?

It reads git diff --staged, structures a title with a change type, adds a ## summary body, and commits via a temporary file.

What is required for git-commit to work?

An active Git repository with staged changes. If nothing is staged, the skill halts without modifying files.

Source text

SKILL.md · Apache-2.0
---
name: git-commit
description: Create a OpenDirector Git commit, or draft its message, from the current staging area only. Inspect git diff --staged first; never stage files or include unstaged work.
---

# Git Commit

Commit only changes the user has already staged. Creating or editing this
skill does not authorize a commit. A message-only request authorizes only
drafting the message; execute a commit when the user requests it.

## Workflow

1. Run `git diff --staged` before any other Git inspection command. If
   command output is truncated, read the remaining staged diff before
   describing it. For binary files, describe only what can be established
   from staged metadata or staged content.
2. If the diff is empty, stop and report that nothing is staged. Do not
   stage files, create an empty commit, or infer a commit from prior work.
3. Base the message exclusively on this staged diff. Additional inspection
   may use `git diff --staged --stat`, `git diff --staged --name-status`, or
   `git show :path` to read the index version. Working-tree files, previous
   conversation, and the product roadmap are not evidence of staged work.
4. Choose a type prefix and, when useful, one scope from the guidance below.
   Write a title and a body whose first line is exactly `## summary`.
5. Before committing, run `git diff --staged` again. If its content changed
   during preparation, reread the new diff and revise the message. If it
   became empty, stop. Do not include newly staged material without review.
6. Save the exact message to a temporary file outside the working tree and
   run `git commit --file <message-file>` without a pathspec or any option
   that changes the staging area. Respect normal sandbox permissions.
7. After success, report the commit hash and title. Inspect the resulting
   commit with `git log -1 --format='%h %s'` and `git show --stat --oneline
   HEAD` as needed. If hooks or validation fail, report the failure and stop;
   leave the staging area as returned, without automatic fixes or retries.

## Staging and commit boundaries

- While preparing or creating a commit, never run `git add`, `git stage`,
  `git commit -a` / `--all`, or any equivalent staging operation, including
  `git update-index` or `git apply --cached` / `--index`.
- Never use `git commit --include`, `--only`, or path arguments. They can
  commit working-tree content or bypass part of the reviewed index.
- Do not unstage, reset, stash, restore, edit, or regenerate project files
  as part of committing. Partially staged files must retain that boundary.
- Do not split staged work, amend commits, bypass hooks, or push unless
  separately requested. Mixed staged changes may use an umbrella title and
  summary bullets; do not silently select a subset.
- Before any separately requested `git push`, you must first run `git rebase`
  onto the current branch's configured upstream. If no upstream is configured,
  do not push; report the blocker instead. If the rebase stops with conflicts,
  follow the workflow below and do not push until it completes successfully.
- If a hook changes the index or files, report the observed effect. Do not
  undo its changes or claim that the index necessarily remained unchanged.

## Rebase conflict handling

When the required pre-push rebase stops with conflicts:

1. Run `git status` and `git diff --name-only --diff-filter=U` to identify
   every conflicted path. Inspect both sides of each conflict before editing.
2. Resolve each conflict deliberately, preserving intended local and upstream
   changes. Never discard user work or select an entire side merely to make
   the conflict disappear.
3. Stage only resolved conflict paths with explicit `git add -- <path>...`
   commands. Do not stage unrelated working-tree changes; this is the only
   exception to the no-staging rule above.
4. Confirm `git diff --name-only --diff-filter=U` is empty and run
   `git diff --cached --check`. Run relevant focused validation for the
   resolved files when available.
5. Run `git rebase --continue`, preserving the existing commit message.
   Repeat these steps if a later commit conflicts.
6. After successful completion, run `git status` and ensure no rebase is in
   progress before pushing. If a conflict cannot be resolved confidently, run
   `git rebase --abort`, report the affected paths and blocker, and wait for
   instructions. Never use a force push to bypass conflicts.

## Title

Use `[type] scope: imperative description`, omitting `scope:` when a change
spans the repository or a scope would add little information. Keep the full
title about 70 characters or less. Use English by default for titles and
bodies; follow an explicit user language preference.

Choose the type by the staged change's purpose, not its file extension:

| Prefix | Use |
|---|---|
| `[feat]` | New user-visible behavior or a newly usable capability. |
| `[bugfix]` | Correctness fixes, regressions, stale-result protection, or recovery fixes. |
| `[refactor]` | Code or directory restructuring that preserves behavior. |
| `[perf]` | A performance improvement supported by the staged implementation; quote measurements only when verified. |
| `[docs]` | Documentation, tutorials, comments, examples, and skill instructions. |
| `[test]` | Tests, fixtures, or test infrastructure. |
| `[build]` | Dependencies, lockfiles, packaging, and build tooling. |
| `[ci]` | Automated integration, validation, or delivery pipelines. |
| `[chore]` | Repository or operational maintenance not covered above. |

UI additions and visual fixes use `[feat]` or `[bugfix]`; CSS files alone do
not imply a formatting-only change. When a commit includes supporting tests
and docs, choose the type of its main behavior change.

Scopes describe the affected area, independently of the type:

| Scope | OpenDirector area |
|---|---|
| `web` | Browser workbench, layouts, components, and local interactions. |
| `api` | HTTP / SSE entrypoints, routes, and request handling. |
| `agent` | Server-side creative decisions, tools, and evaluation. |
| `workflow` | Durable orchestration, dispatch, waiting, and recovery. |
| `media` | Probing, proxies, audio, rendering, and export processing. |
| `providers` | Language-model and image, video, or speech adapters. |
| `storage` | Database, object storage, repositories, and migrations. |
| `contracts` | API, event, and shared timeline contracts. |
| `repo` | Repository layout, shared tooling, and repository skills. |

Use a narrower product scope such as `projects`, `assistant`, `timeline`,
or `exports` when clearer. The browser assistant UI is distinct from the
server-side `agent`. Future architecture is context for naming, not evidence
that a capability already exists. Avoid prefixes such as `[agent]` or
`[media]` that mix the type of change with its subsystem.

## Body

The required body starts with `## summary`, followed by a short paragraph
or Markdown bullets. For multiple distinct points, use bullets starting
with `- `. Explain the concrete change and its purpose; state an important
preserved invariant when it helps reviewers assess a refactor or fix.

Wrap prose and bullet continuation lines manually near 70 characters.
Keep commands, identifiers, and URLs intact when wrapping would break them.
Use a structured tool argument or a temporary message file with actual
newlines; do not interpolate message text into shell command strings.

Add the following only when relevant and supported:

- `## validation`: commands or checks actually performed against the staged
  content. A passing working-tree build does not verify a partially staged
  version. If that distinction cannot be resolved, omit the section or
  explicitly describe the verification limit. Never invent passing tests.
- `## breaking changes`: incompatible API, event, timeline, storage, or
  command changes, their impact, and a migration action when known.
- `Refs: #123` or `Fixes: #123`: only for a real issue supplied by the user
  or verified from repository context. Use `Fixes` only when addressed.

Do not require empty optional sections, repeat the title as the entire
summary, include secrets, or claim simulated generation is a real model
integration. Describe only the staged result, not the work chronology.

Example format (not a claim about the current staging area):

```text
[refactor] web: organize the workbench into feature modules

## summary

- Move the frontend into apps/web and update resource imports.
- Separate layout controls, project operations, and assistant types
  while preserving existing browser storage keys and schemas.
- Update installation, development, and build instructions.
```

© ThinkFlowLab · Apache-2.0 · ThinkFlowLab/OpenDirector

Similar skills

All skills for Git and GitHub →

git-commit by other authors comes first.

git-commit official github A GitHub Copilot skill that turns a working diff into a commit: it reads the changes, stages the related files, writes a Conventional Commits message and runs git commit. CX Codex +1 47,165installs git-commit decebals git-commit generates Conventional Commits messages for Java codebases based on staged changes inspected with git diff. CX Codex +1 264installs git-commit fvadicamo 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 324installs git-commit ThinkInAIXYZ git-commit generates commit messages following Conventional Commits — type, scope, and subject. The agent reads staged changes via git diff --staged and proposes a message. CX Codex +1 1installs git-commit ilteoood git-commit — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that reads the diff and builds a Conventional Commits message automatically. CX Codex +1 624installs commit syahiidkamil Creates Git commits autonomously using ATLAS conventions without asking for approval. Handles staged files or splits working changes into clean commits. CX Codex ★ 406repo stars Developer Work Analysis from Git Diff and Commit Message [email protected] Developer Work Analysis from Git Diff and Commit Message is a prompt for ChatGPT, Claude.ai, and Claude Code that reviews a git diff and commit message to assess changes, flag issues, and suggest improvements. GP ChatGPT ★ 178,201repo stars git-commit-helper davila7 Reads git diff --staged and drafts a commit message following Conventional Commits. It fires after every Bash tool call and appends a line to ~/.claude/git-commit-helper.log. CX Codex +1 7,093installs git-commit-workflow laurigates The git-commit-workflow Claude Code skill defines commit-message and staging rules. It helps split related edits into focused commits and review staged changes. CX Codex +1 161installs woocommerce-git-commit woocommerce woocommerce-git-commit prepares clean Git commits following WooCommerce conventions, splits changelog entries, and stages specific files without pushing. CX Codex +1 121installs speckit-git-commit spec-kit-core The speckit-git-commit skill stages and commits project changes around Spec Kit commands. Use it when Git history should be updated from the project’s Spec Kit settings. CX Codex +1 ★ 110repo stars

From the same set6

Project sponsors

Companies that keep this analytics open