Claude Skill

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; containment proven, never assumed.

LLM Mart · 0 points · 16 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download arbiterForge-codeArbiter-plugins_ca-pi_skills_ca-cleanup-bc9c216.zip · 1 KB
Part of arbiterforge/codearbiter — 238 skills

Install

skills CLI npx skills add https://github.com/arbiterForge/codeArbiter/tree/main/plugins/ca-pi/skills/ca-cleanup
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install arbiterforge-codearbiter@llmmart
Git git clone https://github.com/arbiterForge/codeArbiter.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole arbiterforge/codearbiter collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

/ca-cleanup — post-merge branch transition

Compatibility route. Prefer /ca-pr --cleanup for new usage. This installed route remains functional under the command-route compatibility policy at

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 (<plugin-root>/routines/post-merge-cleanup/SKILL.md), which owns the containment 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 contained in the fetched default branch — SHA-ancestry, or a squash-merge proven by the merged PR record (headRefOid == HEAD) — before anything is deleted. An unproven or unfetched comparison 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 use git branch -d, and MAY use -D only when the squash-merge PR-record proof held this run and -d refused, with that proof restated and the branch named in the confirmation. MUST NOT otherwise 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.
Files (codearbiter)
  • SKILL.md 3.1 KB
    ---
    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; containment proven, never assumed.
    argument-hint: (none)
    ---
    
    # /ca-cleanup — post-merge branch transition
    
    <!-- catalog-compatibility-notice:start -->
    > Compatibility route. Prefer `/ca-pr --cleanup` for new usage. This installed route remains
    > functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
    > continue with the unchanged cleanup workflow below.
    <!-- catalog-compatibility-notice:end -->
    
    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 (`<plugin-root>/routines/post-merge-cleanup/SKILL.md`),
    which owns the containment 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 contained in the **fetched** default branch —
      SHA-ancestry, or a squash-merge proven by the merged PR record (`headRefOid`
      == HEAD) — before anything is deleted. An unproven or unfetched comparison
      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 use `git branch -d`, and MAY use `-D` only when the squash-merge PR-record
      proof held this run and `-d` refused, with that proof restated and the branch
      named in the confirmation. MUST NOT otherwise 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.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related