[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E4MWRDMX43CHPC96FH2G6W":3,"skill-same:01M7E4MWRDMX43CHPC96FH2G6W":111},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":50},"01M7E4MWRDMX43CHPC96FH2G6W","commit",null,"When the bundled commit skill or built-in commit-push-pr command resolves in this session, prefer the first only when none of this skill's contract (convention, trailer, surgical staging, pre-checks) is wanted and the second to commit, push, and open a PR at once; this skill for every other commit. Create a git commit with a subject matching the resolved convention (layered source-control config → project convention → Conventional Commits default), a Claude Co-authored-by trailer, and surgical staging (never `git add -A`), feeding the message to git via Bash heredoc. Use when: 'commit this', 'make a commit', 'commit with message HINT', not for push, branch creation, or PR creation (use \u002Fpull-request).","melodic-software\u002Fpr-pipeline-sandbox","melodic-software","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58273638?v=4","01M77JVQTXNGKCE4MDFY2BC936","Melodic Software","01M7E4FZMA71KQGW6S0GB2X2EJ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"When the bundled commit skill or built-in commit-push-pr command resolves in this session, prefer the first only when none of this skill's contract (convention, trailer, surgical staging, pre-checks) is wanted and the second to commit, push, and open a PR at once; this skill for every other commit. Create a git commit with a subject matching the resolved convention (layered source-control config → project convention → Conventional Commits default), a Claude Co-authored-by trailer, and surgical staging (never `git add -A`), feeding the message to git via Bash heredoc. Use when: 'commit this', 'make a commit', 'commit with message HINT', not for push, branch creation, or PR creation (use \u002Fpull-request).\"\nargument-hint: \"[message-hint]\"\nuser-invocable: true\ndisable-model-invocation: false\nshell: bash\nmetadata:\n  workflow-stage: implement\n  summary: Commit with the resolved convention and surgical staging\n---\n\n## Pre-computed context\n\nExec-bit backstop: !`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.sh\" --probe 2>\u002Fdev\u002Fnull || echo \"unavailable — run the check manually\"`\nConfig layer (user-global): !`test -f \"$HOME\u002F.claude\u002Fsource-control.md\" && echo present || echo absent`\n\n## Repository context. Gather first\n\nCollect these with **individual** Bash calls, one command per call, never combined into a single\ninvocation:\n\n- Current branch, `git branch --show-current`\n- Staged, `git diff --cached --stat | tail -1`\n- Unstaged, `git status --short | head -20`\n- Recent commits, `git log --oneline -5`\n\nKeep the `head` and `tail` pipes in the commands: they are the bound\n([reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md) says why).\n\nBefore the layer probes, classify the config root with `bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fconfig-root.sh\" classify`. For `home` or `non-repo`, report team and personal override as not applicable, skip the three probes, and read user-global only ([..\u002F..\u002Freference\u002Fconfig-resolution.md](..\u002F..\u002Freference\u002Fconfig-resolution.md), \"The three layers\").\n\nThe team value of the convention keys (`subject_pattern`, `type_list`, `trailer_policy`) comes from\n`docs\u002Fconventions\u002Fsource-control.yaml`, read when probe 1 below reports it tracked, through\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fconvention-key.sh\" layer \"$ROOT\" \u003Ckey>`, which prints `yaml` or\n`none` for a key; `value` and `list` print the YAML's value. The retired `.claude\u002Fsource-control.md`\nis not read. Report which layer supplied each value.\n\nRun the repo-scoped probes as separate calls. Each uses git's repo-root-relative\nmagic pathspec `:\u002F`, which resolves against the top of the working tree, so these are correct from\nany subdirectory and never need the repository root substituted into them. **Quote the pathspec**,\nthe leading `:` is pathspec magic, and quoting keeps the shell from reinterpreting it.\n\n1. Team layer, trackedness.\n   `git ls-files --error-unmatch -- \":\u002Fdocs\u002Fconventions\u002Fsource-control.yaml\"`\n2. Team layer, existence.\n   `git ls-files --cached --others -- \":\u002Fdocs\u002Fconventions\u002Fsource-control.yaml\"`\n3. Personal override, existence.\n   `git ls-files --cached --others -- \":\u002F.claude\u002Fsource-control.local.md\"`\n\nProbes 2 and 3 deliberately omit `--exclude-standard`, so a gitignored file is still listed.\n\n**Combine probes 1 and 2 in that order**. Trackedness first, existence consulted only when\ntrackedness comes back nonzero. They are not independent readings:\n\n| Trackedness (1) | Existence (2) | Team-layer state |\n|---|---|---|\n| exit 0 | not consulted | `present (tracked)`, this is a config layer |\n| nonzero | non-empty output | `present but UNTRACKED`, deliberately **not** a config layer |\n| nonzero | empty output | `absent` |\n\n**A nonzero exit from probe 1 is a result, not a failure**: only a probe that could not run at all\n(git unavailable, not a repository) yields an unknown value. Never fold `present but UNTRACKED` into\n\"unknown\". Keep the git lines above out of `## Pre-computed context`.\n\n**These are snapshots taken when they run, not substitutes for the checks.** The exec-bit\nline only sees what was already staged when the skill loaded; anything staged in step 2 below is\ninvisible to it, so step 4 re-runs the script for real. The config-layer probes report **presence**,\nnot merged content. Read the layers that are present and merge them per key. A tracked-team layer\nreported `present but UNTRACKED` is deliberately not a layer: resolution requires the team file to\nbe git-tracked, so an untracked or gitignored file at that well-known path must not drive the\nconvention.\n\n**Every repo-scoped probe anchors at the repository root**, via the `:\u002F` magic pathspec, never at\nthe session's current directory, and never with a resolved root path substituted in. The reasons\nfor each probe's shape are in [reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md).\n\n## Per-commit checklist\n\nRun this list **for every commit**, including the second and tenth commit of a session. These are\ncommands, not remembered facts. Steps 3–5 are the ones a long session silently stops performing.\n\n1. **Resolve** the convention + `trailer_policy` across all three config layers (once per session\n   is enough; re-resolve if a layer changed).\n2. **Stage** surgically by explicit path, after checking the four pre-existing conditions below.\n3. **Format**, run the discoverable formatter scoped to this commit's paths, re-stage its fixes.\n4. **Exec-bit**, run `exec-bit-check.sh --fix -- \u003Cthis commit's paths>`, AFTER step 3.\n5. **Pre-check** the drafted subject against the resolved pattern before invoking git.\n6. **Fragments**, in a repository with a `fragment-plugins.txt` list under `scripts\u002F`, pipe the drafted message to\n   `write-changelog-fragments.sh` and stage the paths it prints (Task step 7).\n7. **Commit** via the Bash tool: `git commit -F -` heredoc-piped, `--trailer` per `trailer_policy`.\n8. **Report** the resulting SHA + subject to the user.\n\n## Purpose\n\nEncapsulates the canonical mechanic for building a commit message that honors a subject convention,\nappending a `Co-authored-by:` trailer, and feeding the result to `git commit` via stdin, without\nthese failure modes:\n\n- **PowerShell here-string syntax (`@'...'@`) inside a Bash tool call** produces `unexpected EOF` and\n  triggers fallback to writing the message to `.git\u002F\u003CTEMP>.txt`. `.git\u002F` is git's internal directory;\n  scratch files there collide with `COMMIT_EDITMSG` and other internals.\n- **`git commit -m \"\u003Cmulti-line>\"`** flattens newlines unpredictably across shells.\n- **`git add -A` \u002F `git add .`** stages secrets, build artifacts, unrelated edits, the convention is\n  surgical staging.\n\n## Subject convention ladder\n\nThe subject convention (WHAT shape a subject must take) resolves via a ladder, checked in order:\n\n1. **The layered source-control convention config**. User-global, tracked team\n   (`docs\u002Fconventions\u002Fsource-control.yaml`), and gitignored personal override, merged per key by\n   [`${CLAUDE_PLUGIN_ROOT}\u002Freference\u002Fconfig-resolution.md`](..\u002F..\u002Freference\u002Fconfig-resolution.md).\n   Resolve all three layers before using any value; a value from one layer alone is not the effective\n   config. When any layer declares one, the effective `subject_pattern` (and `type_list`, when\n   Conventional-Commits-shaped) is authoritative. Before pre-checking, expand `subject_pattern`: the\n   literal keyword `Conventional Commits` expands to the anchored pattern in step 3 below; anything\n   else is already a single anchored regex and is used as-is.\n2. **The consuming project's own `CLAUDE.md`, `AGENTS.md`, rules, or commit-msg hook**, if the\n   effective merged config declares no `subject_pattern` (absent from every layer, which includes the\n   case where layers exist but only contribute other keys) but the project declares (or enforces via\n   lefthook, husky, commitlint, or a plain `.git\u002Fhooks\u002F`) a different convention, follow that instead.\n3. **Conventional Commits (11-type vocabulary)**, the default when neither of the above is present.\n   Every subject must match this anchored pattern:\n\n```text\n^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(.+\\))?!?: .+\n```\n\nCompliant examples:\n\n- `feat(auth): add OAuth login flow`\n- `fix(api): handle null user in \u002Fme endpoint`\n- `docs: clarify rebase guidance`\n- `refactor(skills)!: rename \u002Fsimplify to \u002Fcode-review`\n\nThe 11 types. `build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test`.\n`security` is **not** a Conventional Commits type, never add it. The sources for the set are in\n[reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\nWhen the project enforces its convention with a commit-msg git hook, that hook is the authoritative\ngate regardless of which rung above resolved the pattern; this skill's pre-check exists to fast-fail\nclient-side before the hook round-trip. When no layer resolves a `subject_pattern` and nothing is\ninferable from the project's own files, point the user at `\u002Fsource-control:setup` to persist a\nconvention instead of re-inferring one every commit.\n\n## Task\n\n1. Survey working tree (`git status`, `git diff --cached --stat`) to confirm what's staged.\n2. Stage the intended files, but first check each path against these four pre-existing conditions,\n   *before* this step touches anything. Each is a state `git add` silently overwrites rather than\n   errors on, and in three of the four `git diff --stat` reads empty, so the obvious check misses it.\n   Rationale for each is in [reference\u002Fstaging-preconditions.md](reference\u002Fstaging-preconditions.md).\n\n   | Condition | Detect with | Action |\n   |---|---|---|\n   | Already-staged deletion | `git diff --cached --name-status -- \u003Cpath>` reports `D` | Skip the path entirely; never `git add` over it |\n   | Staged rename, old side | same command reports `R\u003Cscore> \u003Cold> \u003Cnew>` whose `\u003Cold>` falls under `\u003Cpath>` | Skip the old side entirely; never `git add` over it |\n   | Untracked files under a directory path | `git status --porcelain -- \u003Cpath>` shows `??` entries | Stop and surface them; enumerate the intended files instead of adding the directory |\n   | Partial-staging split | `git diff --cached --stat -- \u003Cpath>` **and** `git diff --stat -- \u003Cpath>` both non-empty | Leave as-is; a blanket add sweeps in hunks the user deliberately left unstaged |\n\n   Run `git add \u003Cpath>...` only for paths in none of those four states.\n3. Run the [format-before-push check](reference\u002Fformat-check.md) against the files just staged for\n   this commit (not the full staged set), re-staging any fixes.\n4. Run the exec-bit check, **after** step 3, not before: a formatter re-stage in step 3 reads the\n   worktree file mode, so setting the exec bit any earlier would be silently undone by that later\n   `git add`.\n\n   ```bash\n   bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.sh\" --fix -- \u003Cpath>...\n   ```\n\n   The script reports and fixes every newly-added file whose staged blob starts with a shebang while\n   its staged mode is `100644`, setting the worktree bit and the index entry in the order that\n   survives a later `git add`. **The pathspec is required**. `--fix` refuses an unscoped run\n   (exit 2) rather than sweeping mode changes across another session's staged work; pass `--all`\n   only to opt into a deliberate whole-index sweep. Rationale, cross-platform caveats, and the\n   manual fallback live in [reference\u002Fexec-bit.md](reference\u002Fexec-bit.md).\n5. Draft a subject + optional body, scoped to the staged diff, shaped to satisfy the active subject\n   convention (default: the Conventional Commits pattern above).\n6. Pre-check the subject against the pattern (fast-fail before invoking git).\n7. Write changelog fragments when the repository releases plugins from them, which it does when\n   a `fragment-plugins.txt` list exists in its `scripts\u002F` directory. Pipe the drafted message (subject, blank\n   line, body) to the script from the repository root and `git add` each path it prints, so the\n   fragments land in this commit:\n\n   ```bash\n   bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fwrite-changelog-fragments.sh\" \u003C\u003C'EOF'\n   \u003Cthe drafted message>\n   EOF\n   ```\n\n   On exit 2 for a subject it cannot map, rerun with `--level major|minor|patch|none`. A fragment\n   replaces the hand version bump and CHANGELOG entry. For a plugin the list does not name, the\n   script writes nothing, and the hand release record still applies. What it writes, and the bump\n   each type maps to, is in\n   [reference\u002Fchangelog-fragments.md](reference\u002Fchangelog-fragments.md).\n8. Invoke `git commit -F -` via the Bash tool, heredoc-piped, adding `--trailer` per the trailer\n   template below only when the resolved `trailer_policy` calls for one.\n9. Surface the resulting commit SHA + subject to the user.\n\n## Canonical bash form\n\nUse the **Bash tool**, not the PowerShell tool. Bash heredoc is the canonical form across all\nplatforms (Git Bash, Linux, macOS).\n\n```bash\n# --trailer line below applies only when the resolved trailer_policy calls for one\n# (default: yes). trailer_policy \"none\" -> drop the --trailer line entirely.\n# trailer_policy naming a different template -> substitute that template's text.\ngit commit -F - --cleanup=verbatim \\\n  --trailer \"\u003CCo-authored-by trailer, placeholders filled>\" \\\n  \u003C\u003C'EOF'\n\u003Csubject — shaped to satisfy the active subject convention>\n\n\u003Cbody — wrap at ~72 cols, blank line between paragraphs>\nEOF\n```\n\nPowerShell here-string is shown only for reference. `git commit -F - \u003Cmessage-via-stdin>` with\n`@'...'@` would work in a pure PowerShell tool call, but **never mix syntaxes inside one tool\ninvocation**. A PowerShell `@'...'@` block inside a Bash tool call leaves the bash parser unable to\nterminate the heredoc.\n\n**Hard rules:**\n\n- Invoke via the **Bash tool**.\n- Heredoc delimiter is single-quoted: `\u003C\u003C'EOF' ... EOF`. Single quotes prevent `$variable` and\n  backtick interpolation inside the message.\n- `--cleanup=verbatim` preserves the message exactly, no auto-stripping of comments or whitespace.\n- Never write the message to `.git\u002F\u003CTEMP>.txt`. If a real file is unavoidable, use `mktemp`.\n- Never mix Bash heredoc with PowerShell `@'...'@` inside one invocation.\n\nFor a dirty shared index (concurrent sessions, pre-existing mixed WIP), the pathspec-limited form\nand its staged-deletion hazards live in [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md).\nDefault remains the plain index commit.\n\n**The exec bit does not survive the pathspec form under `core.filemode=false`** (the Windows\ndefault). `--only` records the working-tree mode, and with filemode off git cannot see the\n`chmod +x`, so a correctly-set `100755` index entry is rebuilt as `100644`. Verified both\ndirections: the plain index commit preserves `100755`; the pathspec commit loses it. If this\ncommit includes a newly-added shebang file the exec-bit check corrected, commit that path with the\n**plain index form** (splitting the commit if the rest needs a pathspec), and confirm with\n`git ls-tree HEAD -- \u003Cpath>` rather than trusting the index. Full detail and the two workarounds\nthat were tested and failed are in [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md).\n\n## Pre-check\n\nBefore invoking `git commit`, regex-match the drafted subject against the active convention's pattern\n(default: the Conventional Commits pattern above).\n\nOn mismatch, surface the convention name and the compliant examples as actionable guidance, and ask\nfor a compliant subject before invoking git. The pre-check is shape-only; the project's `commit-msg`\ngit hook (when one exists) is the authoritative gate at commit time. The pre-check exists to save the\nhook-startup floor when the drafted subject is obviously wrong, plus to give the user a fast\nactionable error rather than an opaque hook failure.\n\n## Trailer resolution\n\nThe default template is:\n\n```text\nCo-authored-by: Claude \u003Cmodel> \u003Cnoreply@anthropic.com>\n```\n\n**The `\u003Cmodel>` placeholder is filled from your own knowledge of the running session**: the model\nfamily and version the harness reports for this session. If uncertain, ask the person to read the\nmodel from `\u002Fstatus` and tell you, rather than guessing or running a command yourself. There is no\nenvironment variable that auto-fills it, the trailer is part of the message body sent to\n`git commit`, not git config. Pointer:\n[commands reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands), rows `\u002Fstatus` and\n`\u002Fusage`; [Restrict Claude's skill access](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#restrict-claude%E2%80%99s-skill-access)\nfor which built-ins the model can invoke.\n\n**An optional context clause**, `Co-authored-by: Claude \u003Cmodel> (\u003Ccontext>) \u003Cnoreply@anthropic.com>`,\ne.g. `(1M context)`, may be added when the context window is a genuinely distinguishing fact about\nthe session and is known with confidence. It is **not** required, and its absence is not a defect.\n\n### Which authority wins\n\nFour sources can specify a trailer. Resolve in this order:\n\n1. **A resolved `trailer_policy`** from any config layer. Authoritative. `none` means omit\n   `--trailer` from the `git commit` invocation entirely (do not append an empty or default\n   trailer); a value naming a different template means substitute that template exactly. `none` and\n   absence are different states.\n2. **The consuming project's own conventions** (`CLAUDE.md`, `AGENTS.md`, rules), if they specify a\n   different attribution trailer, or none, follow those.\n3. **Harness-injected commit guidance.** The Claude Code harness may inject its own commit\n   instruction into the session, naming a `Co-Authored-By` trailer. Adopt its **shape**, this is why\n   the context clause above is optional rather than mandatory, but **never copy its literal text**.\n   That injected guidance can carry a **hardcoded model name that does not match the running\n   session**. Copying it verbatim writes a false provenance claim into durable git history, which is\n   precisely the harm this template exists to avoid. Always fill `\u003Cmodel>` from actual session\n   knowledge. Absent or unusual injected guidance says nothing about the project's wishes (a mod\n   can rewrite or blank it; [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md));\n   sources 1 and 2 still decide.\n4. **This skill's default**, above.\n\n**Key spelling.** This skill emits `Co-authored-by` and never rewrites the spelling existing history\ncarries; a consumer who wants a different spelling expresses it as a `trailer_policy` template. Why\nthat spelling: [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\n## Unrelated uncommitted changes\n\nIf the working tree contains unstaged or untracked files that fall outside this commit's scope,\nclassify each before staging per `\u002Fsource-control:pull-request create` (its unrelated-changes classification:\ninclude \u002F stash \u002F separate-commit \u002F discard). Do not duplicate that classification here; invoke\n`\u002Fsource-control:pull-request create` to surface it to the user.\n\n## Staging discipline\n\nAlways `git add \u003Cspecific-files>`, never `git add -A` or `git add .`. The risk is including secrets,\nbuild artifacts, or unrelated changes that the user did not approve for this commit. If multiple\nfiles are intentionally part of the commit, stage them by explicit list, not by wildcard, and skip\nthe partial-staging split per step 2 above.\n\nImmediately after staging, run the format-before-push check and then the exec-bit check, in that\norder. Catch what CI would otherwise catch on the push round-trip.\n\n## Composition policy\n\nThis skill is the single source of truth for the commit mechanic. Other skills should compose\n`\u002Fsource-control:commit` rather than invoking `git commit` directly. Direct calls bypass the pre-check, trailer\nlogic, and surgical-staging discipline this skill exists to enforce.\n\n**\"Compose\" means one of exactly two things, and a composing skill must name which:**\n\n- **Re-invoke `\u002Fsource-control:commit`** for the commit. This is the default and the only form that re-renders this\n  skill's full content. Prefer it whenever the commit is a discrete step a user could have asked for.\n- **Run the per-commit checklist above yourself**, per commit, as commands. Permitted for a workflow\n  skill making many commits in one flow, where re-invocation per commit is disproportionate.\n\nWhat is **not** composition is treating this skill as a convention absorbed once and thereafter\nremembered. The mechanic that decays is not the shape of the commit message, that is reinforced\nevery commit, it is the ordered per-commit *checks*: the formatter run, the exec-bit fix, the\nsubject pre-check. Those produce no visible signal when skipped, so a session that has stopped\nrunning them looks identical to one that has not, until CI says otherwise. That is the observed\nfailure this policy exists to prevent, not a hypothetical one.\n\nTwo properties make step 4 the cheap re-anchor for the checklist form: it is a command with an exit\ncode rather than a paragraph to recall, and the pre-computed probe at the top of this file surfaces\nits finding before anything else is read.\n\nWorkflow skills without explicit commit semantics should report status at phase boundaries and let\nthe user or the next workflow stage decide commit timing; a skill with commit semantics in its\ndocumented contract (e.g. `\u002Fsource-control:pull-request create`) composes this one.\n\n## Recorded deviations\n\n- **Model invocation stays enabled** (`disable-model-invocation: false`), so composing workflow\n  skills can reach this one. The archetype, the reason and the compensating controls are in\n  [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\n## Boundary, native Claude Code surfaces\n\nClaude Code bundles a skill of the same name whose description tells the model to use it whenever\nit is about to commit, so the two compete for every commit. A built-in command also commits as its\nfirst step. What each of the three surfaces does is in\n[reference\u002Fnative-commit.md](reference\u002Fnative-commit.md).\n\n**Routing.** Prefer this skill whenever it resolves and the repository carries a commit\nconvention, a source-control config layer is present, or a workflow composes `\u002Fsource-control:commit`.\nWhen the bundled `commit` skill resolves in this session, prefer it only for a plain commit where\nnone of this skill's contract is wanted. A request to commit, and nothing more, stays here even\nwhen `\u002Fcommit-push-pr` resolves: that command also pushes and opens a PR, which\n`\u002Fsource-control:pull-request` owns.\n\n**Mutation gate.** All three create commits, and `\u002Fcommit-push-pr` also pushes. Pick one per\ncommit and never run two for the same change. This skill never chains into the bundled `commit`\nor `\u002Fcommit-push-pr` on its own behalf.\n\n**Availability is never assumed.** The bundled skill is gated, and `disableBundledSkills` or a\n`skillOverrides` entry hides it; this section states what to do when a surface resolves, never\nthat it is present. The four-part records live in [reference\u002Fnative-commit.md](reference\u002Fnative-commit.md).\n\n## What this skill does NOT do\n\n- **No `git push`**, that's `\u002Fsource-control:pull-request create`.\n- **No branch creation**, that's the project's branch-naming \u002F branch-protection mechanisms (or\n  `\u002Fsource-control:worktree create`).\n- **No PR body composition**, that's `\u002Fsource-control:pull-request create`.\n- **No `git merge` or forge merge**, that's `\u002Fsource-control:pull-request merge`.\n- **No rebase**, that's `\u002Fsource-control:pull-request create`.\n- **No `--no-verify` or hook bypass**, if the project's `commit-msg` hook rejects the message,\n  surface the error and re-draft; never bypass.\n\n## Spoke paths\n\nThe `reference\u002F` files write this skill's directory as `\u003Cskill-dir>`, which is\n`${CLAUDE_SKILL_DIR}`. Put that path in place of the placeholder before running a command or writing\nit into a brief. Those files arrive through the Read tool as plain bytes, so a `${…}` token in them\nwould reach the Bash tool unsubstituted, and the Bash tool's environment has no `CLAUDE_SKILL_DIR`\nto expand it from. Basis: the plugins reference,\n\u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmanifest-reference#where-each-variable-resolves>.\n\n## Next\n\n`\u002Fsource-control:pull-request create`. Its precondition is a branch carrying the work to ship.\n\n## Reference index. Load on demand\n\n| File | Load when |\n|------|-----------|\n| [reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md) | A repository-context probe's shape is in question: the bounding pipes, the omitted `--exclude-standard`, what a nonzero probe exit means, or why probes anchor at `:\u002F`. |\n| [reference\u002Fchangelog-fragments.md](reference\u002Fchangelog-fragments.md) | Running step 7 and checking what a fragment holds: the bump per type, the changelog section, a `none` fragment, a repository or plugin without the list. |\n| [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md) | A rule's source is questioned: the 11-type set, a mod rewriting injected commit guidance, the `Co-authored-by` spelling, or the model-invocation deviation. |\n| [reference\u002Fnative-commit.md](reference\u002Fnative-commit.md) | Choosing between this skill, the bundled `commit` skill and `\u002Fcommit-push-pr`, or rechecking their records. |\n| [reference\u002Fstaging-preconditions.md](reference\u002Fstaging-preconditions.md) | A step-2 precondition fired and the right action is not obvious, or judging whether a new condition belongs in the set. |\n| [reference\u002Fformat-check.md](reference\u002Fformat-check.md) | Running step 3, formatter discovery, path scoping, the two-stage filter, partial-staging preservation. |\n| [reference\u002Fexec-bit.md](reference\u002Fexec-bit.md) | Understanding or hand-running step 4, why both the worktree bit and the index, `core.filemode` caveats, manual fallback. |\n| [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md) | The index holds staged work outside this commit's scope. Pathspec `--only` semantics and the staged-deletion hide\u002Frestore sequence. |\n| [`${CLAUDE_PLUGIN_ROOT}\u002Freference\u002Fconfig-resolution.md`](..\u002F..\u002Freference\u002Fconfig-resolution.md) | Resolving or merging the three config layers, or interpreting a key's `none`-vs-absent state. |\n","## Pre-computed context\n\nExec-bit backstop: !`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.sh\" --probe 2>\u002Fdev\u002Fnull || echo \"unavailable — run the check manually\"`\nConfig layer (user-global): !`test -f \"$HOME\u002F.claude\u002Fsource-control.md\" && echo present || echo absent`\n\n## Repository context. Gather first\n\nCollect these with **individual** Bash calls, one command per call, never combined into a single\ninvocation:\n\n- Current branch, `git branch --show-current`\n- Staged, `git diff --cached --stat | tail -1`\n- Unstaged, `git status --short | head -20`\n- Recent commits, `git log --oneline -5`\n\nKeep the `head` and `tail` pipes in the commands: they are the bound\n([reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md) says why).\n\nBefore the layer probes, classify the config root with `bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fconfig-root.sh\" classify`. For `home` or `non-repo`, report team and personal override as not applicable, skip the three probes, and read user-global only ([..\u002F..\u002Freference\u002Fconfig-resolution.md](..\u002F..\u002Freference\u002Fconfig-resolution.md), \"The three layers\").\n\nThe team value of the convention keys (`subject_pattern`, `type_list`, `trailer_policy`) comes from\n`docs\u002Fconventions\u002Fsource-control.yaml`, read when probe 1 below reports it tracked, through\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fconvention-key.sh\" layer \"$ROOT\" \u003Ckey>`, which prints `yaml` or\n`none` for a key; `value` and `list` print the YAML's value. The retired `.claude\u002Fsource-control.md`\nis not read. Report which layer supplied each value.\n\nRun the repo-scoped probes as separate calls. Each uses git's repo-root-relative\nmagic pathspec `:\u002F`, which resolves against the top of the working tree, so these are correct from\nany subdirectory and never need the repository root substituted into them. **Quote the pathspec**,\nthe leading `:` is pathspec magic, and quoting keeps the shell from reinterpreting it.\n\n1. Team layer, trackedness.\n   `git ls-files --error-unmatch -- \":\u002Fdocs\u002Fconventions\u002Fsource-control.yaml\"`\n2. Team layer, existence.\n   `git ls-files --cached --others -- \":\u002Fdocs\u002Fconventions\u002Fsource-control.yaml\"`\n3. Personal override, existence.\n   `git ls-files --cached --others -- \":\u002F.claude\u002Fsource-control.local.md\"`\n\nProbes 2 and 3 deliberately omit `--exclude-standard`, so a gitignored file is still listed.\n\n**Combine probes 1 and 2 in that order**. Trackedness first, existence consulted only when\ntrackedness comes back nonzero. They are not independent readings:\n\n| Trackedness (1) | Existence (2) | Team-layer state |\n|---|---|---|\n| exit 0 | not consulted | `present (tracked)`, this is a config layer |\n| nonzero | non-empty output | `present but UNTRACKED`, deliberately **not** a config layer |\n| nonzero | empty output | `absent` |\n\n**A nonzero exit from probe 1 is a result, not a failure**: only a probe that could not run at all\n(git unavailable, not a repository) yields an unknown value. Never fold `present but UNTRACKED` into\n\"unknown\". Keep the git lines above out of `## Pre-computed context`.\n\n**These are snapshots taken when they run, not substitutes for the checks.** The exec-bit\nline only sees what was already staged when the skill loaded; anything staged in step 2 below is\ninvisible to it, so step 4 re-runs the script for real. The config-layer probes report **presence**,\nnot merged content. Read the layers that are present and merge them per key. A tracked-team layer\nreported `present but UNTRACKED` is deliberately not a layer: resolution requires the team file to\nbe git-tracked, so an untracked or gitignored file at that well-known path must not drive the\nconvention.\n\n**Every repo-scoped probe anchors at the repository root**, via the `:\u002F` magic pathspec, never at\nthe session's current directory, and never with a resolved root path substituted in. The reasons\nfor each probe's shape are in [reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md).\n\n## Per-commit checklist\n\nRun this list **for every commit**, including the second and tenth commit of a session. These are\ncommands, not remembered facts. Steps 3–5 are the ones a long session silently stops performing.\n\n1. **Resolve** the convention + `trailer_policy` across all three config layers (once per session\n   is enough; re-resolve if a layer changed).\n2. **Stage** surgically by explicit path, after checking the four pre-existing conditions below.\n3. **Format**, run the discoverable formatter scoped to this commit's paths, re-stage its fixes.\n4. **Exec-bit**, run `exec-bit-check.sh --fix -- \u003Cthis commit's paths>`, AFTER step 3.\n5. **Pre-check** the drafted subject against the resolved pattern before invoking git.\n6. **Fragments**, in a repository with a `fragment-plugins.txt` list under `scripts\u002F`, pipe the drafted message to\n   `write-changelog-fragments.sh` and stage the paths it prints (Task step 7).\n7. **Commit** via the Bash tool: `git commit -F -` heredoc-piped, `--trailer` per `trailer_policy`.\n8. **Report** the resulting SHA + subject to the user.\n\n## Purpose\n\nEncapsulates the canonical mechanic for building a commit message that honors a subject convention,\nappending a `Co-authored-by:` trailer, and feeding the result to `git commit` via stdin, without\nthese failure modes:\n\n- **PowerShell here-string syntax (`@'...'@`) inside a Bash tool call** produces `unexpected EOF` and\n  triggers fallback to writing the message to `.git\u002F\u003CTEMP>.txt`. `.git\u002F` is git's internal directory;\n  scratch files there collide with `COMMIT_EDITMSG` and other internals.\n- **`git commit -m \"\u003Cmulti-line>\"`** flattens newlines unpredictably across shells.\n- **`git add -A` \u002F `git add .`** stages secrets, build artifacts, unrelated edits, the convention is\n  surgical staging.\n\n## Subject convention ladder\n\nThe subject convention (WHAT shape a subject must take) resolves via a ladder, checked in order:\n\n1. **The layered source-control convention config**. User-global, tracked team\n   (`docs\u002Fconventions\u002Fsource-control.yaml`), and gitignored personal override, merged per key by\n   [`${CLAUDE_PLUGIN_ROOT}\u002Freference\u002Fconfig-resolution.md`](..\u002F..\u002Freference\u002Fconfig-resolution.md).\n   Resolve all three layers before using any value; a value from one layer alone is not the effective\n   config. When any layer declares one, the effective `subject_pattern` (and `type_list`, when\n   Conventional-Commits-shaped) is authoritative. Before pre-checking, expand `subject_pattern`: the\n   literal keyword `Conventional Commits` expands to the anchored pattern in step 3 below; anything\n   else is already a single anchored regex and is used as-is.\n2. **The consuming project's own `CLAUDE.md`, `AGENTS.md`, rules, or commit-msg hook**, if the\n   effective merged config declares no `subject_pattern` (absent from every layer, which includes the\n   case where layers exist but only contribute other keys) but the project declares (or enforces via\n   lefthook, husky, commitlint, or a plain `.git\u002Fhooks\u002F`) a different convention, follow that instead.\n3. **Conventional Commits (11-type vocabulary)**, the default when neither of the above is present.\n   Every subject must match this anchored pattern:\n\n```text\n^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(.+\\))?!?: .+\n```\n\nCompliant examples:\n\n- `feat(auth): add OAuth login flow`\n- `fix(api): handle null user in \u002Fme endpoint`\n- `docs: clarify rebase guidance`\n- `refactor(skills)!: rename \u002Fsimplify to \u002Fcode-review`\n\nThe 11 types. `build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test`.\n`security` is **not** a Conventional Commits type, never add it. The sources for the set are in\n[reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\nWhen the project enforces its convention with a commit-msg git hook, that hook is the authoritative\ngate regardless of which rung above resolved the pattern; this skill's pre-check exists to fast-fail\nclient-side before the hook round-trip. When no layer resolves a `subject_pattern` and nothing is\ninferable from the project's own files, point the user at `\u002Fsource-control:setup` to persist a\nconvention instead of re-inferring one every commit.\n\n## Task\n\n1. Survey working tree (`git status`, `git diff --cached --stat`) to confirm what's staged.\n2. Stage the intended files, but first check each path against these four pre-existing conditions,\n   *before* this step touches anything. Each is a state `git add` silently overwrites rather than\n   errors on, and in three of the four `git diff --stat` reads empty, so the obvious check misses it.\n   Rationale for each is in [reference\u002Fstaging-preconditions.md](reference\u002Fstaging-preconditions.md).\n\n   | Condition | Detect with | Action |\n   |---|---|---|\n   | Already-staged deletion | `git diff --cached --name-status -- \u003Cpath>` reports `D` | Skip the path entirely; never `git add` over it |\n   | Staged rename, old side | same command reports `R\u003Cscore> \u003Cold> \u003Cnew>` whose `\u003Cold>` falls under `\u003Cpath>` | Skip the old side entirely; never `git add` over it |\n   | Untracked files under a directory path | `git status --porcelain -- \u003Cpath>` shows `??` entries | Stop and surface them; enumerate the intended files instead of adding the directory |\n   | Partial-staging split | `git diff --cached --stat -- \u003Cpath>` **and** `git diff --stat -- \u003Cpath>` both non-empty | Leave as-is; a blanket add sweeps in hunks the user deliberately left unstaged |\n\n   Run `git add \u003Cpath>...` only for paths in none of those four states.\n3. Run the [format-before-push check](reference\u002Fformat-check.md) against the files just staged for\n   this commit (not the full staged set), re-staging any fixes.\n4. Run the exec-bit check, **after** step 3, not before: a formatter re-stage in step 3 reads the\n   worktree file mode, so setting the exec bit any earlier would be silently undone by that later\n   `git add`.\n\n   ```bash\n   bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.sh\" --fix -- \u003Cpath>...\n   ```\n\n   The script reports and fixes every newly-added file whose staged blob starts with a shebang while\n   its staged mode is `100644`, setting the worktree bit and the index entry in the order that\n   survives a later `git add`. **The pathspec is required**. `--fix` refuses an unscoped run\n   (exit 2) rather than sweeping mode changes across another session's staged work; pass `--all`\n   only to opt into a deliberate whole-index sweep. Rationale, cross-platform caveats, and the\n   manual fallback live in [reference\u002Fexec-bit.md](reference\u002Fexec-bit.md).\n5. Draft a subject + optional body, scoped to the staged diff, shaped to satisfy the active subject\n   convention (default: the Conventional Commits pattern above).\n6. Pre-check the subject against the pattern (fast-fail before invoking git).\n7. Write changelog fragments when the repository releases plugins from them, which it does when\n   a `fragment-plugins.txt` list exists in its `scripts\u002F` directory. Pipe the drafted message (subject, blank\n   line, body) to the script from the repository root and `git add` each path it prints, so the\n   fragments land in this commit:\n\n   ```bash\n   bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fwrite-changelog-fragments.sh\" \u003C\u003C'EOF'\n   \u003Cthe drafted message>\n   EOF\n   ```\n\n   On exit 2 for a subject it cannot map, rerun with `--level major|minor|patch|none`. A fragment\n   replaces the hand version bump and CHANGELOG entry. For a plugin the list does not name, the\n   script writes nothing, and the hand release record still applies. What it writes, and the bump\n   each type maps to, is in\n   [reference\u002Fchangelog-fragments.md](reference\u002Fchangelog-fragments.md).\n8. Invoke `git commit -F -` via the Bash tool, heredoc-piped, adding `--trailer` per the trailer\n   template below only when the resolved `trailer_policy` calls for one.\n9. Surface the resulting commit SHA + subject to the user.\n\n## Canonical bash form\n\nUse the **Bash tool**, not the PowerShell tool. Bash heredoc is the canonical form across all\nplatforms (Git Bash, Linux, macOS).\n\n```bash\n# --trailer line below applies only when the resolved trailer_policy calls for one\n# (default: yes). trailer_policy \"none\" -> drop the --trailer line entirely.\n# trailer_policy naming a different template -> substitute that template's text.\ngit commit -F - --cleanup=verbatim \\\n  --trailer \"\u003CCo-authored-by trailer, placeholders filled>\" \\\n  \u003C\u003C'EOF'\n\u003Csubject — shaped to satisfy the active subject convention>\n\n\u003Cbody — wrap at ~72 cols, blank line between paragraphs>\nEOF\n```\n\nPowerShell here-string is shown only for reference. `git commit -F - \u003Cmessage-via-stdin>` with\n`@'...'@` would work in a pure PowerShell tool call, but **never mix syntaxes inside one tool\ninvocation**. A PowerShell `@'...'@` block inside a Bash tool call leaves the bash parser unable to\nterminate the heredoc.\n\n**Hard rules:**\n\n- Invoke via the **Bash tool**.\n- Heredoc delimiter is single-quoted: `\u003C\u003C'EOF' ... EOF`. Single quotes prevent `$variable` and\n  backtick interpolation inside the message.\n- `--cleanup=verbatim` preserves the message exactly, no auto-stripping of comments or whitespace.\n- Never write the message to `.git\u002F\u003CTEMP>.txt`. If a real file is unavoidable, use `mktemp`.\n- Never mix Bash heredoc with PowerShell `@'...'@` inside one invocation.\n\nFor a dirty shared index (concurrent sessions, pre-existing mixed WIP), the pathspec-limited form\nand its staged-deletion hazards live in [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md).\nDefault remains the plain index commit.\n\n**The exec bit does not survive the pathspec form under `core.filemode=false`** (the Windows\ndefault). `--only` records the working-tree mode, and with filemode off git cannot see the\n`chmod +x`, so a correctly-set `100755` index entry is rebuilt as `100644`. Verified both\ndirections: the plain index commit preserves `100755`; the pathspec commit loses it. If this\ncommit includes a newly-added shebang file the exec-bit check corrected, commit that path with the\n**plain index form** (splitting the commit if the rest needs a pathspec), and confirm with\n`git ls-tree HEAD -- \u003Cpath>` rather than trusting the index. Full detail and the two workarounds\nthat were tested and failed are in [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md).\n\n## Pre-check\n\nBefore invoking `git commit`, regex-match the drafted subject against the active convention's pattern\n(default: the Conventional Commits pattern above).\n\nOn mismatch, surface the convention name and the compliant examples as actionable guidance, and ask\nfor a compliant subject before invoking git. The pre-check is shape-only; the project's `commit-msg`\ngit hook (when one exists) is the authoritative gate at commit time. The pre-check exists to save the\nhook-startup floor when the drafted subject is obviously wrong, plus to give the user a fast\nactionable error rather than an opaque hook failure.\n\n## Trailer resolution\n\nThe default template is:\n\n```text\nCo-authored-by: Claude \u003Cmodel> \u003Cnoreply@anthropic.com>\n```\n\n**The `\u003Cmodel>` placeholder is filled from your own knowledge of the running session**: the model\nfamily and version the harness reports for this session. If uncertain, ask the person to read the\nmodel from `\u002Fstatus` and tell you, rather than guessing or running a command yourself. There is no\nenvironment variable that auto-fills it, the trailer is part of the message body sent to\n`git commit`, not git config. Pointer:\n[commands reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands), rows `\u002Fstatus` and\n`\u002Fusage`; [Restrict Claude's skill access](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#restrict-claude%E2%80%99s-skill-access)\nfor which built-ins the model can invoke.\n\n**An optional context clause**, `Co-authored-by: Claude \u003Cmodel> (\u003Ccontext>) \u003Cnoreply@anthropic.com>`,\ne.g. `(1M context)`, may be added when the context window is a genuinely distinguishing fact about\nthe session and is known with confidence. It is **not** required, and its absence is not a defect.\n\n### Which authority wins\n\nFour sources can specify a trailer. Resolve in this order:\n\n1. **A resolved `trailer_policy`** from any config layer. Authoritative. `none` means omit\n   `--trailer` from the `git commit` invocation entirely (do not append an empty or default\n   trailer); a value naming a different template means substitute that template exactly. `none` and\n   absence are different states.\n2. **The consuming project's own conventions** (`CLAUDE.md`, `AGENTS.md`, rules), if they specify a\n   different attribution trailer, or none, follow those.\n3. **Harness-injected commit guidance.** The Claude Code harness may inject its own commit\n   instruction into the session, naming a `Co-Authored-By` trailer. Adopt its **shape**, this is why\n   the context clause above is optional rather than mandatory, but **never copy its literal text**.\n   That injected guidance can carry a **hardcoded model name that does not match the running\n   session**. Copying it verbatim writes a false provenance claim into durable git history, which is\n   precisely the harm this template exists to avoid. Always fill `\u003Cmodel>` from actual session\n   knowledge. Absent or unusual injected guidance says nothing about the project's wishes (a mod\n   can rewrite or blank it; [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md));\n   sources 1 and 2 still decide.\n4. **This skill's default**, above.\n\n**Key spelling.** This skill emits `Co-authored-by` and never rewrites the spelling existing history\ncarries; a consumer who wants a different spelling expresses it as a `trailer_policy` template. Why\nthat spelling: [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\n## Unrelated uncommitted changes\n\nIf the working tree contains unstaged or untracked files that fall outside this commit's scope,\nclassify each before staging per `\u002Fsource-control:pull-request create` (its unrelated-changes classification:\ninclude \u002F stash \u002F separate-commit \u002F discard). Do not duplicate that classification here; invoke\n`\u002Fsource-control:pull-request create` to surface it to the user.\n\n## Staging discipline\n\nAlways `git add \u003Cspecific-files>`, never `git add -A` or `git add .`. The risk is including secrets,\nbuild artifacts, or unrelated changes that the user did not approve for this commit. If multiple\nfiles are intentionally part of the commit, stage them by explicit list, not by wildcard, and skip\nthe partial-staging split per step 2 above.\n\nImmediately after staging, run the format-before-push check and then the exec-bit check, in that\norder. Catch what CI would otherwise catch on the push round-trip.\n\n## Composition policy\n\nThis skill is the single source of truth for the commit mechanic. Other skills should compose\n`\u002Fsource-control:commit` rather than invoking `git commit` directly. Direct calls bypass the pre-check, trailer\nlogic, and surgical-staging discipline this skill exists to enforce.\n\n**\"Compose\" means one of exactly two things, and a composing skill must name which:**\n\n- **Re-invoke `\u002Fsource-control:commit`** for the commit. This is the default and the only form that re-renders this\n  skill's full content. Prefer it whenever the commit is a discrete step a user could have asked for.\n- **Run the per-commit checklist above yourself**, per commit, as commands. Permitted for a workflow\n  skill making many commits in one flow, where re-invocation per commit is disproportionate.\n\nWhat is **not** composition is treating this skill as a convention absorbed once and thereafter\nremembered. The mechanic that decays is not the shape of the commit message, that is reinforced\nevery commit, it is the ordered per-commit *checks*: the formatter run, the exec-bit fix, the\nsubject pre-check. Those produce no visible signal when skipped, so a session that has stopped\nrunning them looks identical to one that has not, until CI says otherwise. That is the observed\nfailure this policy exists to prevent, not a hypothetical one.\n\nTwo properties make step 4 the cheap re-anchor for the checklist form: it is a command with an exit\ncode rather than a paragraph to recall, and the pre-computed probe at the top of this file surfaces\nits finding before anything else is read.\n\nWorkflow skills without explicit commit semantics should report status at phase boundaries and let\nthe user or the next workflow stage decide commit timing; a skill with commit semantics in its\ndocumented contract (e.g. `\u002Fsource-control:pull-request create`) composes this one.\n\n## Recorded deviations\n\n- **Model invocation stays enabled** (`disable-model-invocation: false`), so composing workflow\n  skills can reach this one. The archetype, the reason and the compensating controls are in\n  [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md).\n\n## Boundary, native Claude Code surfaces\n\nClaude Code bundles a skill of the same name whose description tells the model to use it whenever\nit is about to commit, so the two compete for every commit. A built-in command also commits as its\nfirst step. What each of the three surfaces does is in\n[reference\u002Fnative-commit.md](reference\u002Fnative-commit.md).\n\n**Routing.** Prefer this skill whenever it resolves and the repository carries a commit\nconvention, a source-control config layer is present, or a workflow composes `\u002Fsource-control:commit`.\nWhen the bundled `commit` skill resolves in this session, prefer it only for a plain commit where\nnone of this skill's contract is wanted. A request to commit, and nothing more, stays here even\nwhen `\u002Fcommit-push-pr` resolves: that command also pushes and opens a PR, which\n`\u002Fsource-control:pull-request` owns.\n\n**Mutation gate.** All three create commits, and `\u002Fcommit-push-pr` also pushes. Pick one per\ncommit and never run two for the same change. This skill never chains into the bundled `commit`\nor `\u002Fcommit-push-pr` on its own behalf.\n\n**Availability is never assumed.** The bundled skill is gated, and `disableBundledSkills` or a\n`skillOverrides` entry hides it; this section states what to do when a surface resolves, never\nthat it is present. The four-part records live in [reference\u002Fnative-commit.md](reference\u002Fnative-commit.md).\n\n## What this skill does NOT do\n\n- **No `git push`**, that's `\u002Fsource-control:pull-request create`.\n- **No branch creation**, that's the project's branch-naming \u002F branch-protection mechanisms (or\n  `\u002Fsource-control:worktree create`).\n- **No PR body composition**, that's `\u002Fsource-control:pull-request create`.\n- **No `git merge` or forge merge**, that's `\u002Fsource-control:pull-request merge`.\n- **No rebase**, that's `\u002Fsource-control:pull-request create`.\n- **No `--no-verify` or hook bypass**, if the project's `commit-msg` hook rejects the message,\n  surface the error and re-draft; never bypass.\n\n## Spoke paths\n\nThe `reference\u002F` files write this skill's directory as `\u003Cskill-dir>`, which is\n`${CLAUDE_SKILL_DIR}`. Put that path in place of the placeholder before running a command or writing\nit into a brief. Those files arrive through the Read tool as plain bytes, so a `${…}` token in them\nwould reach the Bash tool unsubstituted, and the Bash tool's environment has no `CLAUDE_SKILL_DIR`\nto expand it from. Basis: the plugins reference,\n\u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmanifest-reference#where-each-variable-resolves>.\n\n## Next\n\n`\u002Fsource-control:pull-request create`. Its precondition is a branch carrying the work to ship.\n\n## Reference index. Load on demand\n\n| File | Load when |\n|------|-----------|\n| [reference\u002Fconfig-probes.md](reference\u002Fconfig-probes.md) | A repository-context probe's shape is in question: the bounding pipes, the omitted `--exclude-standard`, what a nonzero probe exit means, or why probes anchor at `:\u002F`. |\n| [reference\u002Fchangelog-fragments.md](reference\u002Fchangelog-fragments.md) | Running step 7 and checking what a fragment holds: the bump per type, the changelog section, a `none` fragment, a repository or plugin without the list. |\n| [reference\u002Fdesign-rationale.md](reference\u002Fdesign-rationale.md) | A rule's source is questioned: the 11-type set, a mod rewriting injected commit guidance, the `Co-authored-by` spelling, or the model-invocation deviation. |\n| [reference\u002Fnative-commit.md](reference\u002Fnative-commit.md) | Choosing between this skill, the bundled `commit` skill and `\u002Fcommit-push-pr`, or rechecking their records. |\n| [reference\u002Fstaging-preconditions.md](reference\u002Fstaging-preconditions.md) | A step-2 precondition fired and the right action is not obvious, or judging whether a new condition belongs in the set. |\n| [reference\u002Fformat-check.md](reference\u002Fformat-check.md) | Running step 3, formatter discovery, path scoping, the two-stage filter, partial-staging preservation. |\n| [reference\u002Fexec-bit.md](reference\u002Fexec-bit.md) | Understanding or hand-running step 4, why both the worktree bit and the index, `core.filemode` caveats, manual fallback. |\n| [reference\u002Fpathspec-commits.md](reference\u002Fpathspec-commits.md) | The index holds staged work outside this commit's scope. Pathspec `--only` semantics and the staged-deletion hide\u002Frestore sequence. |\n| [`${CLAUDE_PLUGIN_ROOT}\u002Freference\u002Fconfig-resolution.md`](..\u002F..\u002Freference\u002Fconfig-resolution.md) | Resolving or merging the three config layers, or interpreting a key's `none`-vs-absent state. |\n",{"shell":24,"metadata":25,"description":7,"argument-hint":28,"user-invocable":29,"disable-model-invocation":20},"bash",{"summary":26,"workflow-stage":27},"Commit with the resolved convention and surgical staging","implement","[message-hint]",true,"main","8bc4c1ff78802dc7b945e642443c4fb5b24369cd","plugins\u002Fsource-control\u002Fskills\u002Fcommit","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox","https:\u002F\u002Fgithub.com\u002Fmelodic-software","https:\u002F\u002Fmelodicsoftware.com","Independent software studio building developer tools, automation, and application services, with roots in music.","2026-11-15 02:54:43",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":29},[40,43,46],{"tool":41,"command":42},"npx","npx skills add melodic-software\u002Fpr-pipeline-sandbox --skill commit",{"tool":44,"command":45},"bunx","bunx skills add melodic-software\u002Fpr-pipeline-sandbox --skill commit",{"tool":47,"command":48},"pnpm","pnpm dlx skills add melodic-software\u002Fpr-pipeline-sandbox --skill commit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002FSKILL.md",[51,57,61,65,69,73,77,81,85,89,93,97,101,107],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},".claude\u002Fsource-control.local.md","REFERENCE","参考文档",274,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002F.claude\u002Fsource-control.local.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},".claude\u002Fsource-control.md",557,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002F.claude\u002Fsource-control.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"evals\u002Fdocs\u002Fconventions\u002Fsource-control.yaml",385,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Fevals\u002Fdocs\u002Fconventions\u002Fsource-control.yaml",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"evals\u002Fevals.json",14615,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Fevals\u002Fevals.json",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"reference\u002Fchangelog-fragments.md",1121,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fchangelog-fragments.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"reference\u002Fconfig-probes.md",3347,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fconfig-probes.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"reference\u002Fdesign-rationale.md",2867,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fdesign-rationale.md",{"path":82,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":83,"sourceHtmlUrl":84},"reference\u002Fexec-bit.md",9227,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fexec-bit.md",{"path":86,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":87,"sourceHtmlUrl":88},"reference\u002Fformat-check.md",6496,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fformat-check.md",{"path":90,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":91,"sourceHtmlUrl":92},"reference\u002Fnative-commit.md",2895,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fnative-commit.md",{"path":94,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":95,"sourceHtmlUrl":96},"reference\u002Fpathspec-commits.md",9784,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fpathspec-commits.md",{"path":98,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":99,"sourceHtmlUrl":100},"reference\u002Fstaging-preconditions.md",3692,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Freference\u002Fstaging-preconditions.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fexec-bit-check.sh","SCRIPT","脚本",10364,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.sh",{"path":108,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fexec-bit-check.test.sh",38346,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fsource-control\u002Fskills\u002Fcommit\u002Fscripts\u002Fexec-bit-check.test.sh",[112,119,126,133,140,147],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7E4RNP86SS2DHXW5WJ4C0A9","work","Pick exactly one work item from the tracker frontier by priority tier (due recurring, guardrails, highest impact, then not-yet-due recurring), claim it race-safe, and execute it end-to-end through the project's workflow. Use when the user asks to pick, grab, or work the next item, ticket, or issue, or asks what to work on next. Backlog CRUD is \u002Fwork-items:track; draining the backlog in a loop is \u002Fwork-items:work-loop.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Fwork\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7E4RDP5WGX2P2TR7Z2R9WC2","work-loop","Drain the work-item backlog as a self-paced autonomous loop, launched via \u002Floop: each cycle triages raw intake, admits items through the fail-closed admission gate, runs them through \u002Fwork-items:work under an adaptive cap, and checks the drain exit. Authors PRs, never merges. Use when: 'work loop', 'run the work loop', 'start the worker loop', 'drain the backlog', 'autonomous drain', 'loop the backlog', 'drain the issue backlog to done'. Escalations: \u002Fwork-items:attend-queue.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Fwork-loop\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7E4R64619K94TAFHPNQY969","triage","Evaluate raw intake, any untriaged item whoever filed it (bug reports, feature requests, unsolicited PRs, dogfood issues): raw, verified, briefed, autonomous-eligible, with exits to needs-info, human-gated, close. Use when: 'triage', 'what needs triage', 'triage this issue', 'triage this PR', 'evaluate this bug report', 'is this bug real', 'should we merge this unsolicited PR', 'attention view', 'what intake needs attention', 'sweep needs-human'. No number: the attention view. Escalations: \u002Fwork-items:attend-queue.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":19},"01M7E4QZF02WTMKMAM41P7Z7NW","track","Backlog CRUD through the bound tracker: stats, list, add, start, done, due, recheck, search, audit, publish-plan, link (default: stats). Use when the user wants to add, claim, or close a work item, ticket, or issue; list, search, or see a dashboard of open items; check what is due on the recurring schedule; or audit stale claims and labels. New bug reports go to \u002Fbugs:write first. Picking and executing the next item is \u002Fwork-items:work; raw intake is \u002Fwork-items:triage.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Ftrack\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":19},"01M7E4QRTF3TAH9NMKE0GG1JZJ","ship","Route and run one spec container's multi-session effort: where it stands, which execution shape is in effect (per-item PRs or one integration branch) and its discipline, the next step; `run` works its ready items in parallel, landing one at a time. Use when the user says 'ship' about a spec or container, asks where it stands or what is next, wants to run, drive or resume it, or close it out. One item: \u002Fwork-items:work; re-slicing: \u002Fwork-items:decompose.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Fship\u002FSKILL.md",[],[],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":19},"01M7E4QE6BGGAGVJNXRBKM152V","setup","Verify and configure the work-items plugin for this repo. check read-only inspects the tracker binding (the home's work-items.yaml), tracked .github\u002Frecurring-schedule.json (presence, JSON validity, unique reconciliation keys), jq and tracker-seam entry gates, recurring-maintenance role label, provenance and capability-tier labels; apply binds the provider (copying legacy JSON), writes the schedule, migrates provenance and capability-tier labels when authorized, backfills legacy frontier stamps, and optionally remaps role labels. First-time bind writes minimum viable config only; per-item schedule seeding is opt-in via --seed-schedule. Use when: 'set up work-items', 'bind the tracker provider', 'is work-items configured', 'configure the recurring schedule', 'work-items setup', 'seed recurring items', 'bulk-seed the recurring schedule', 'remap the work-item role labels', or the due\u002Frecheck\u002Fwork actions report no recurring schedule configured, or the seam reports no binding. Re-runnable.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fpr-pipeline-sandbox\u002Fblob\u002Fmain\u002Fplugins\u002Fwork-items\u002Fskills\u002Fsetup\u002FSKILL.md",[],[]]