Skip to content
Skill

Git commit

Guides an AI agent to stage, split and write Conventional Commit messages with emoji

Git commit is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
TypeScript
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Git commit

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, 禁止盲目重试或强推。

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 10 files (53 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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.

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Git commit 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.

More from ruan-cat/monorepo

  1. Works through an OpenSpec change's task list, implementing and checking off each task

    • Open source
    • 5 GitHub stars
    • Developer tools
  2. Finalizes a completed OpenSpec change, syncing its specs and moving it to the archive

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Generates all OpenSpec planning artifacts for a change in one pass

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Starts a new OpenSpec change and shows its first artifact template for review

    • Open source
    • 5 GitHub stars
    • Developer tools
  5. Checks and normalizes package.json, tsup and tsconfig setup for monorepo Node packages

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Turns incident reports and repeated failures into durable, verifiable agent skill rules

    • Open source
    • 5 GitHub stars
    • Developer tools