ce-commit

GitHub

用于创建符合规范的 Git 提交。自动收集仓库上下文,处理分支逻辑(如默认分支保护),遵循约定式提交规范生成清晰的消息,并将更改拆分为逻辑独立的提交。

skills/ce-commit/SKILL.md EveryInc/compound-engineering-plugin

Trigger Scenarios

用户请求保存或提交代码更改 需要生成清晰的 Git 提交信息

Install

npx skills add EveryInc/compound-engineering-plugin --skill ce-commit -g -y
More Options

Use without installing

npx skills use EveryInc/compound-engineering-plugin@ce-commit

指定 Agent (Claude Code)

npx skills add EveryInc/compound-engineering-plugin --skill ce-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add EveryInc/compound-engineering-plugin --all -g -y

预览 repo 内 skill

npx skills add EveryInc/compound-engineering-plugin --list

SKILL.md

Frontmatter
{
    "name": "ce-commit",
    "description": "Create a git commit with a clear, value-communicating message. Use when the user asks to commit\/save staged or unstaged changes with a repo-appropriate message."
}

Git Commit

Create well-crafted local commit(s) from the current working tree. No push, no PR — use ce-commit-push-pr for the full ship flow.

Done when: each logical change is committed with an explicit file list and a message that states the outcome, and git status is clean of those changes. Stop when: the tree is clean (nothing to commit).

Context

Gather context with each command as its own shell tool call (program + args only). Do not join with ;, &&, ||, pipes, $(...), or redirects — that syntax fails under Windows PowerShell. A non-zero exit is a normal state to interpret, not a failure to suppress.

Command Purpose Non-zero / empty means
git status Working-tree state Not a git repo — stop
git diff HEAD Uncommitted changes Unborn repo / no commits yet
git branch --show-current Current branch Empty = detached HEAD
git log --oneline -10 Recent message style Unborn repo — no history
git rev-parse --abbrev-ref origin/HEAD Remote default branch No origin/HEAD / bare HEAD — try gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name', else main

Treat this as a snapshot. Re-read branch and staged set immediately before committing if anything may have changed.

Default branch name: strip a leading origin/ from origin/HEAD (so origin/trunktrunk). Use that bare name for all “on the default branch?” checks — never compare against origin/<name>.

Workflow

  1. Gather — run every Context command above (own shell call each), then continue.

  2. Nothing to commit — if git status shows no staged, modified, or untracked files, report that and stop. Do not use git diff HEAD alone as cleanliness (it misses untracked files).

  3. Branch first — if detached HEAD, or on the default branch (main / master / the bare default name above), create a feature branch from the change content (git checkout -b <name>), then re-read git branch --show-current. Do not ask — commit-only still must not leave work only on a detached HEAD or the default branch. If the derived name exists, pick a non-conflicting suffix.

  4. Convention — match project commit conventions already in context; else match the recent log pattern; else conventional commits (type(scope): description). When using conventional commits and fix/feat both fit, default to fix: (remedying broken or missing behavior); reserve feat: for new capabilities. User override wins.

  5. Logical commits — if changed files clearly split into distinct concerns, make separate commits (file level only, 2–3 max, no git add -p). If ambiguous, one commit.

  6. Message — subject is imperative and names the outcome (what is now possible or fixed), not the file list. Body only when motivation or trade-offs are not obvious from the subject. When a plan Implementation Unit ID is already in hand for this commit (conversation, caller, or the files belong to one unit), append that unit's U-ID in parentheses — (U3) means unit 3. Do not hunt for a plan. Omit when the commit spans units, the unit is unclear, or no plan is in hand.

    • Bad: Update checkout.rb / Add tests and fix stuff
    • Good: Fix double-submit on checkout
    • Good: Add per-subscription mute (U3)
  7. Stage and commit — stage named files only (never git add -A or git add .). Honor exclude:<paths> when the invocation carries it: those files stay uncommitted no matter what else changed; say in the report that they were left out. Prefer one shell call per commit group:

git add file1 file2 file3 && git commit -m "$(cat <<'EOF'
type(scope): subject line here

Optional body when the why is not obvious from the subject.
EOF
)" -- file1 file2 file3

The trailing path list on git commit is load-bearing: a bare git commit takes the whole index, so anything already staged before this run (a caller's exclude: paths, or work the user staged and did not name) would ride into the commit. Naming the paths commits exactly the group and leaves other index entries alone.

  1. Confirmgit status; report hash(es) and subject(s).

Version History

  • 15ab6f7 Current 2026-08-20 12:37

Same Skill Collection

.agents/skills/ce-skill-work/SKILL.md
skills/ce-babysit-pr/SKILL.md
skills/ce-code-review/SKILL.md
skills/ce-commit-push-pr/SKILL.md
skills/ce-compound-refresh/SKILL.md
skills/ce-compound/SKILL.md
skills/ce-debug/SKILL.md
skills/ce-doc-review/SKILL.md
skills/ce-dogfood/SKILL.md
skills/ce-explain/SKILL.md
skills/ce-handoff/SKILL.md
skills/ce-ideate/SKILL.md
skills/ce-optimize/SKILL.md
skills/ce-plan/SKILL.md
skills/ce-polish/SKILL.md
skills/ce-pov/SKILL.md
skills/ce-product-pulse/SKILL.md
skills/ce-promote/SKILL.md
skills/ce-proof/SKILL.md
skills/ce-prototype/SKILL.md
skills/ce-resolve-pr-feedback/SKILL.md
skills/ce-retune/SKILL.md
skills/ce-riffrec-feedback-analysis/SKILL.md
skills/ce-setup/SKILL.md
skills/ce-simplify-code/SKILL.md
skills/ce-strategy/SKILL.md
skills/ce-sweep/SKILL.md
skills/ce-test-browser/SKILL.md
skills/ce-test-xcode/SKILL.md
skills/ce-work/SKILL.md
skills/ce-worktree/SKILL.md
skills/lfg/SKILL.md
skills/ce-brainstorm/SKILL.md
tests/fixtures/sample-plugin/skills/agent-only-skill/SKILL.md
tests/fixtures/sample-plugin/skills/claude-only-skill/SKILL.md
tests/fixtures/sample-plugin/skills/disabled-skill/SKILL.md
tests/fixtures/sample-plugin/skills/skill-one/SKILL.md

Metadata

Files
0
Version
15ab6f7
Hash
3d5ed68d
Indexed
2026-08-20 12:37

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 09:45
浙ICP备14020137号-1 $방문자$