commit
Use when the user says "commit", "/commit", "save progress", or asks to land working changes on a feature or worktree branch. Working-phase posture: minimal…
от ocx-sh★ 20 звёзд на GitHub
Установить commit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/commit — Working-Phase Commit Workflow
Commit working tree during active dev on feature/worktree branch. Working phase half of OCX two-phase branch workflow — rebasing-phase cleanup for main lives in /finalize.
See workflow-git.md for full model: branching rules, two-phase model, Checkpoint convention, land-ready definition. Skill assumes those, implements working-phase posture on top.
Working-Phase Posture
- Minimise commit count. Bundle freely. Amend rolling Checkpoints.
- One concern per commit relaxed. Honest bundle message (
chore(claude): bundle skill + rule + agent tweaks) beats fake one-concern narrative./finalizesplit/reword later. - Don't badger user about splitting. Worktree branches (
goat,evelynn,sion,soraka) explicitly working-phase by default. Cleanup at finalize time.
For land-ready branch contract, see "Land-Ready Definition" in workflow-git.md. That /finalize job, not /commit.
Inputs
Optional free-text arg. Treat as intent hint (e.g., fix ocx install symlink bug), not full message — still draft final message. Flags:
/commit --amend— explicitly amend HEAD (bypasses Checkpoint-only safeguard)/commit --pr— force PR-branch prompt even if previously declined/commit --no-pr— skip + record PR skip
For rebasing-phase cleanup (squash, reword, split main..HEAD), use /finalize instead.
Workflow
1. Snapshot state (parallel batch)
git status --porcelain=v1(never-uall)git diff --stagedandgit diff --statgit log -5 --oneline— recent commits + scan for strandedCheckpointin windowgit rev-parse --abbrev-ref HEAD— current branchgit rev-list --count main..HEAD 2>/dev/null— commits ahead of maingit config --get branch.<current>.ocx-skip-pr-prompt— PR prompt already answered?git log -1 --pretty=%s— HEAD itself Checkpoint?gh pr view --json number,state 2>/dev/null— open PR for branch?
If working tree clean and HEAD not Checkpoint, stop with "nothing to commit".
2. Checkpoint scan (window, not just HEAD)
Look at last 5 commits for any with subject exactly Checkpoint.
Case A — HEAD itself is Checkpoint:
Two sub-cases by working tree state:
| Sub-case | Behavior |
|---|---|
| Dirty tree (unstaged/untracked changes exist) | Auto-amend — stage all changed files by name and git commit --amend --no-edit. No question. Rolling Checkpoints absorb all active changes as union. Report what folded in. |
| Clean tree (no changes, Checkpoint holds accumulated work) | Checkpoint itself is deliverable. Draft conventional commit message from Checkpoint diff (git diff main..HEAD), show, amend: git commit --amend -m "<drafted message>". "Finalize in place" path — user called /commit to give Checkpoint real name. |
Case B — Checkpoint exists at HEAD1..HEAD5 but not HEAD (stranded): warn user. Means previous session made real work inside Checkpoint then landed other commits on top without finalizing. Offer:
| Option | Effect |
|---|---|
| Commit on top, leave stranded (default in working-phase) | Normal commit. Stranded Checkpoint handled by /finalize before landing |
Hand off to /finalize now |
Stop, tell user run /finalize for full rebase plan — safer than rewording one commit in isolation |
| Skip for now | Ignore, continue |
Case C — no Checkpoint in window: proceed.
3. Commit strategy
On worktree branch, prefer one of:
- Amend HEAD when HEAD is fresh local commit you authored (not yet touching
main's reach) and new WIP clearly continuation of same concern. Ask first — amending destructive to commit hashes. - New commit on top when HEAD already represents distinct concern.
- Start Checkpoint (
git commit -m "Checkpoint") when user says "save progress" or WIP not yet coherent enough to name.
On non-worktree branch: never auto-amend. Always create new commit unless /commit --amend passed.
On main: stop. Tell user create feature branch first.
4. Draft the commit message
Follow Conventional Commits v1.0.0. See commit_reference.md for full cheat sheet and workflow-git.md for quick rules. Key points for working phase:
chore:for AI/tooling files (.claude/,CLAUDE.md, skills, rules, hooks, taskfiles) — keeps out of changelog- Imperative mood, lowercase description, no trailing period, subject ≤72 chars
- Body explains why, not what, when non-obvious
- Breaking:
!before colon andBREAKING CHANGE:footer - Never
Co-Authored-By(OCX convention)
Working-phase bundles legitimate. If staged diff covers multiple concerns, chore(claude): bundle <what> style subject with body honestly listing clusters acceptable. Flag at body end that it will split or reword during /finalize.
Show drafted message to user for approval before com
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- commit_reference.md
FAQ
Что делает скилл commit?
Use when the user says "commit", "/commit", "save progress", or asks to land working changes on a feature or worktree branch. Working-phase posture: minimal commits, amendable Checkpoints. For pre-merge cleanup, use `/finalize`.
Как установить скилл commit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл commit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…