# Git commit

> Git commit is an open-source agent skill for developer tools. Guides an AI agent to stage, split and write Conventional Commit messages with emoji. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ruan-cat/monorepo/tree/main/ai-plugins/common-tools/skills/git-commit
- **Repository:** https://github.com/ruan-cat/monorepo
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** git-commit
- **Collection:** https://github.com/ruan-cat/monorepo
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill walks a coding agent through preparing git commits: checking what is staged, deciding whether a change set should be split into several logical commits, and drafting a Conventional Commits message with an emoji and type. It includes a pre-commit routine that runs commitlint when the repository has a local config, picks a small relevant check before committing, and verifies the result afterwards. It also covers detecting file renames so deletions and additions stay in one commit, and flags breaking changes with the exclamation-mark form.

The emoji and type mapping is read from a bundled TypeScript file rather than fetched online. The skill also describes a shared-worktree procedure for cases where several agents commit to the same working copy, using git stash to save, reorder and restore work. It appends an Assisted-by trailer identifying the agent and model when both are known, and leaves other co-author trailers alone. It is written in Chinese and expects a git repository, with Node tooling such as pnpm when commitlint is configured.

## When your agent uses it

> 创建高质量的 git 提交：审查/暂存预期的变更，拆分为逻辑提交，并编写清晰的提交信息 （遵循 Conventional Commits 规范，支持 Emoji）。当用户要求提交代码、编写提交信息、 暂存变更或将工作拆分为多个提交时使用此技能。当用户提及【破坏性变更】关键词时， 必须按照本技能的 BREAKING CHANGE 规范使用感叹号格式编写提交信息。 优先针对 git 暂存区（staged）中的文件进行提交，只有当暂存区为空时才考虑整个工作树。 当用户提及【分门别类】关键词时，必须按照本技能的多提交拆分规范， 从文件类型、业务模块、修改类型、修改范围四个维度认真拆分多个提交。 本技能只追加 Assisted-by，不再生成、审核或拦截 Co-authored-by。 emoji/type 只读取本技能 references/commit-types.ts，不要联网查询。 多个 agent 共用同一工作副本时，按 references/shared-worktree-race.md 用 git stash 保存、排序、弹出并清掉自己的提交；提交失败先看状态和 HEAD， 禁止盲目重试或强推。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs TypeScript scripts](https://github.com/ruan-cat/monorepo/tree/HEAD/ai-plugins/common-tools/skills/git-commit)
- [No network calls found in its scripts](https://github.com/ruan-cat/monorepo/tree/HEAD/ai-plugins/common-tools/skills/git-commit)
- [License: MIT](https://github.com/ruan-cat/monorepo/tree/HEAD/ai-plugins/common-tools/skills/git-commit)

## Features

- **Staged-first commit workflow:** Checks the index first and commits only what is already staged, leaving out-of-scope edits untouched.
- **Logical commit splitting:** Splits mixed changes by file type, module, change type and scope before committing.
- **Rename detection:** Keeps a moved file's deletion and new path together in a single rename commit.
- **Conventional Commit messages:** Builds headers with emoji and type from a bundled list, with breaking-change markers.
- **Commitlint pre-check:** Validates the message against the repository's commitlint setup before running git commit.
- **Shared worktree safety:** Describes stash-based queuing for several agents working in one checkout, without force pushes.

## Good for

- Commit my staged changes with a proper Conventional Commit message
- Split a large set of edits into several focused commits
- Write a breaking-change commit that documents the migration
- Commit a renamed file without it showing up as a delete plus add
- Prepare a commit message and run commitlint before committing

## Install

### Claude Code

This skill ships in the `common-tools` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ruan-cat/monorepo
/plugin install common-tools@ruan-cat-tools
```

Or copy only this skill to `~/.claude/skills/git-commit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-commit &&
cp -R "$tmp/ai-plugins/common-tools/skills/git-commit" ~/.claude/skills/git-commit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/git-commit` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/git-commit` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-commit &&
cp -R "$tmp/ai-plugins/common-tools/skills/git-commit" ~/.agents/skills/git-commit &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/git-commit` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/git-commit` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-commit &&
cp -R "$tmp/ai-plugins/common-tools/skills/git-commit" ~/.cursor/skills/git-commit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/git-commit` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ruan-cat/monorepo.git --path ai-plugins/common-tools/skills/git-commit
```

Or copy the folder to `~/.gemini/skills/git-commit` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/git-commit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-commit &&
cp -R "$tmp/ai-plugins/common-tools/skills/git-commit" ~/.copilot/skills/git-commit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/git-commit` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ruan-cat/monorepo.git
```

Then copy `monorepo/ai-plugins/common-tools/skills/git-commit` into your agent's skills folder as `git-commit`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Git commit can run?

It needs a git repository. When the repository has a commitlint configuration, it runs commitlint on the message first, and it reads the bundled commit-types file for emoji and type values.

### Does Git commit push my commits?

No. The skill explicitly tells the agent not to run git push, leaving pushing to the user.

### Which agents and clients does Git commit support?

It is a standard agent skill folder, so it applies to all listed clients, including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

### Does Git commit add co-author trailers?

It only appends an Assisted-by trailer when the agent and model names are known. It does not generate, check or block Co-authored-by trailers.

### How do I install Git commit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/git-commit to use it in all your projects, or to .claude/skills/git-commit in one project. Or install the common-tools plugin, which includes it: /plugin marketplace add ruan-cat/monorepo, then /plugin install common-tools@ruan-cat-tools.

### Does Git commit run scripts?

Yes. It runs TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Git commit?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Git commit?

The closest alternatives to Git commit are Git commit, Code commit, Conventional commit, Autocommit and Git commit.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Git commit](https://ai-powered.com/skills/git-commit): Git commit is an open-source agent skill for developer tools.
- [Code commit](https://ai-powered.com/skills/code-commit): Code commit is an open-source agent skill for developer tools.
- [Conventional commit](https://ai-powered.com/skills/conventional-commit-k1-c): Conventional commit is an open-source agent skill for developer tools.
- [Autocommit](https://ai-powered.com/skills/autocommit): Autocommit is an open-source agent skill for developer tools.
- [Git commit](https://ai-powered.com/skills/git-commit-eduardo-sl): Git commit is an open-source agent skill for developer tools.
- [Conventional commit](https://ai-powered.com/skills/conventional-commit): Conventional commit is an open-source agent skill for developer tools.
- [Git workflow and versioning](https://ai-powered.com/skills/git-workflow-and-versioning): Git workflow and versioning is an open-source agent skill for developer tools.
- [Commit](https://ai-powered.com/skills/commit-tjmonsi): Commit is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/git-commit-ruan-cat
