cc-commit-msg

Generates Conventional Commit messages from staged git diffs with heredoc commit commands.

1.0k|109|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/doccker/cc-use-exp --skill cc-commit-msg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-commit-msg
Source: https://github.com/doccker/cc-use-exp/tree/main/.codex/skills/cc-commit-msg
Command: npx skills add https://github.com/doccker/cc-use-exp --skill cc-commit-msg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing consistent, well-structured git commit messages is repetitive and error-prone: subjects get overloaded, body bullets get flattened into one line by shell quoting, and mixed changes get crammed into a single commit. This Skill analyzes your staged diff and produces a properly formatted Conventional Commit message plus a copy-paste-ready heredoc command that preserves the subject/body structure.

Core Features & Use Cases

  • Diff-driven message generation: Reads git diff --cached by default (full working tree only when you explicitly say all), classifies the change intent as feat/fix/refactor/style/docs/test/chore, and warns when changes should be split into multiple commits.
  • Strict output format: English type keyword with Simplified Chinese subject and body, subject under 80 characters, flat bullet body, no emoji or Co-Authored-By trailers, plus a table of changed files.
  • Heredoc commit command: Always outputs a git commit -m "$(cat <<'EOF' ... EOF)" command so multi-line bodies survive shell parsing, and forbids broken \n single-line forms.
  • Use Case: After staging a bug fix across three files, ask for a commit message and receive fix: 修复列表接口分页读取错误 with body bullets and a ready-to-run heredoc command, then verify with git log -1.

Quick Start

Generate a commit message for my currently staged changes and give me the heredoc git commit command to run.

Frequently Asked Questions about cc-commit-msg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Conventional Commit message from staged changes?

Stage your changes with git add, then invoke the skill to analyze git diff --cached. It classifies the intent as feat, fix, refactor, style, docs, test, or chore and returns a subject line plus body bullets you can commit directly.

How to write a multi-line git commit message in the shell?

Use a heredoc: git commit -m "$(cat <<'EOF' ... EOF)" with the subject on the first line, a blank line, then body bullets. Single-quoted EOF prevents shell expansion, and the skill always outputs this form instead of broken \n single-line strings.

Does this skill run git commit automatically?

No. It only generates the message text and a copy-paste-ready heredoc command. It never executes git add or git commit on your behalf, and it is not a substitute for code review, release notes, or changelogs.

Can it include unstaged changes in the commit message analysis?

Yes, but only when you explicitly say all or request the full working tree. By default it inspects only the staged diff via git diff --cached; with the all flag it also reads git diff for unstaged changes.

What happens when a commit mixes features and fixes?

The skill picks the dominant intent if one exists, otherwise it warns you to split the changes into separate commits. It avoids forcing mixed changes into a single feat message just to satisfy the type format.