/ca-cleanup
Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; ancestry proven, never assumed.
$ npx -y skills add arbiterForge/codeArbiter --skill ca-cleanup --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/ca-cleanup
Context preview
The summary Claude sees to decide when to auto-load this skill.
Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; ancestry proven, never assumed.
SKILL.md
ca-cleanup.SKILL.mdname: ca-cleanup
description: Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; ancestry proven, never assumed.
argument-hint: (none)
$ca-cleanup — post-merge branch transition
Your PR merged. You are still standing on the branch, with build output, worktree residue, and scratch files around you. This command owns the ordinary walk back: prove the branch actually landed, decide what the leftovers are, get to a clean fast-forwarded default checkout, and drop the merged local branch.
It exists because nothing else owned it. `$ca-standup` is daily hygiene and deliberately never touches the current branch or the default one; `$ca-chore` takes docs, dependency bumps, and reverts. Issue #308 recorded what the gap produced: a routine cleanup routed to `$ca-chore`, which refused it, and then to `$ca-override` — a bypass invented to cover missing coverage. This is that coverage.
Routes to
The `post-merge-cleanup` skill (`${CLAUDE_PLUGIN_ROOT}/routines/post-merge-cleanup/SKILL.md`), which owns the ancestry proof, the artifact classification, and the per-item confirmations.
When NOT to use
- The branch has NOT merged yet → `$ca-pr` (`finishing-a-development-branch`)
owns the terminal decision; come back here after it lands.
- Daily start-of-day hygiene across *other* branches and worktrees →
`$ca-standup`.
- A read-only look at what is dirty → `$ca-status`.
- Uncommitted work you want to keep → `$ca-commit`. This command never
commits for you.
Hard gate
- MUST prove the current branch is an ancestor of the **fetched** default branch
before anything is deleted. An unproven or unfetched ancestry STOPs — a branch that only *looks* merged is not merged.
- MUST classify every dirty or untracked artifact as **unique**, **redundant**,
or **superseded**, and MUST NOT discard a unique or unclassifiable one without explicit per-item confirmation naming it.
- MUST confirm each removal individually — no batched yes, no implied yes.
- MUST reach the default branch with a clean working tree, and MUST fast-forward
with `--ff-only` only — never a merge commit, never a rebase, never a reset that discards work.
- MUST NOT force-delete a branch, force-push, delete a remote branch, or write to
the default branch.
- MUST NOT require `$ca-override`. This is ordinary lifecycle work; if it
cannot proceed, the reason is a stated gate, not a bypass.
Read more
name: ca-cleanup description: Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; ancestry proven, never assumed. argument-hint: (none)
$ca-cleanup — post-merge branch transition
Your PR merged. You are still standing on the branch, with build output, worktree residue, and scratch files around you. This command owns the ordinary walk back: prove the branch actually landed, decide what the leftovers are, get to a clean fast-forwarded default checkout, and drop the merged local branch.
It exists because nothing else owned it. `$ca-standup` is daily hygiene and deliberately never touches the current branch or the default one; `$ca-chore` takes docs, dependency bumps, and reverts. Issue #308 recorded what the gap produced: a routine cleanup routed to `$ca-chore`, which refused it, and then to `$ca-override` — a bypass invented to cover missing coverage. This is that coverage.
Routes to
The `post-merge-cleanup` skill (`${CLAUDE_PLUGIN_ROOT}/routines/post-merge-cleanup/SKILL.md`), which owns the ancestry proof, the artifact classification, and the per-item confirmations.
When NOT to use
- The branch has NOT merged yet → `$ca-pr` (`finishing-a-development-branch`)
owns the terminal decision; come back here after it lands.
- Daily start-of-day hygiene across *other* branches and worktrees →
`$ca-standup`.
- A read-only look at what is dirty → `$ca-status`.
- Uncommitted work you want to keep → `$ca-commit`. This command never
commits for you.
Hard gate
- MUST prove the current branch is an ancestor of the **fetched** default branch
before anything is deleted. An unproven or unfetched ancestry STOPs — a branch that only *looks* merged is not merged.
- MUST classify every dirty or untracked artifact as **unique**, **redundant**,
or **superseded**, and MUST NOT discard a unique or unclassifiable one without explicit per-item confirmation naming it.
- MUST confirm each removal individually — no batched yes, no implied yes.
- MUST reach the default branch with a clean working tree, and MUST fast-forward
with `--ff-only` only — never a merge commit, never a rebase, never a reset that discards work.
- MUST NOT force-delete a branch, force-push, delete a remote branch, or write to
the default branch.
- MUST NOT require `$ca-override`. This is ordinary lifecycle work; if it
cannot proceed, the reason is a stated gate, not a bypass.
When you can't trust yourself with your code base, trust Arbiter.
Repo: arbiterForge/codeArbiter
Other skills on codearbiter.
- /brainstorming
The Socratic spec-refinement front of /feature, and the planning front of /sprint. Routed to BEFORE any code — it takes a one-line idea and drives it to an approved, concrete spec with testable acceptance criteria. Four gated phases — frame, refine, write, approve. No
Open skill - /commit-gate
The only path to a commit. Routed to when the user invokes /commit or otherwise instructs codeArbiter to persist staged changes. Nine gated phases — permission, branch, classification, verification (test/lint/secrets), behavioral proof, diff review, selective stage, message,
Open skill - /context-check
Optional manual drift audit — report stale provenance-tracked docs (via _provenancelib drift detection across .codearbiter/.provenance/), then per stale doc offer re-scout / re-baseline / defer. Not the daily loop; commit-gate auto-heal owns routine maintenance.
Open skill - /context-creation
The brownfield back-fill. Routed to by /create-context, and by startup when .codearbiter/CONTEXT.md lacks the <!--INITIALIZED--> body marker but source code exists. Six gated phases — pre-flight, scout dispatch, synthesis, gap interview, write, lock. Reads the existing codebase
Open skill - /crypto-compliance
The banned-primitive gate. Routed to when changed code hashes, signs, encrypts, derives keys, generates security-relevant randomness, configures TLS, or imports a crypto library. Rejects broken primitives, disabled TLS verification, and home-rolled crypto; the approved-primitive
Open skill - /debug
Investigate-then-decide root-cause analysis for a defect whose cause is unknown (distinct from /fix, which assumes a known bug). Five gated phases: capture, hypothesize, gather, decide, hand off. Investigation only, no code changes; exits to /fix, /adr, or a no-action close.
Open skill

