본문으로 건너뛰기
cccskills
무료GitHub에 공개

git-cleanup

Use when the user explicitly invokes branch or worktree cleanup for a repo with accumulated local branches. Don't use for remote branch deletion or force-push operations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.9 KB
  • agents/openai.yaml172 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Git cleanup

Contract

FieldBound contract
TriggerThe user explicitly invokes branch/worktree cleanup for a repository with accumulated local branches or worktrees.
AuthorityReversible local: writes only VCS-tracked local branches and clean worktrees; rollback is git reflog and remote refs. No remote mutation. Show the exact set before any deletion.
Side effectDelete confirmed local git branches and clean worktrees only; dirty worktrees and protected branches are refused.
DoneEvery local branch is categorized or surfaced as unanalyzed, every recommended deletion has evidence, exact quoted commands receive final confirmation, and each command is reported as deleted or failed.

Inputs

A local git repository path (defaults to the current working directory). No remote credentials, no force-push targets, no protected-branch list beyond the repository's own configuration. The user supplies final confirmation for each deletion command; nothing is deleted without it.

Procedure

  1. Run git branch -vv and git worktree list to enumerate every local branch and worktree. Record the current branch and the default upstream branch as protected; never propose their deletion. Done when: every local branch and worktree is enumerated and the current branch plus default upstream are marked protected.
  2. For each local branch, determine merge status against its upstream and against the current branch: run git branch --merged and git branch --no-merged, then git log <branch> --not <upstream> --oneline to surface unmerged commits. Categorize each branch as merged, unmerged-with-evidence, or unanalyzed when the upstream is missing or the comparison is ambiguous. Done when: each branch carries one of merged, unmerged-with-evidence, or unanalyzed with its evidence.
  3. For each worktree, run git -C <path> status --porcelain to classify it as clean or dirty. Mark dirty worktrees as refused for deletion. Done when: every worktree is classified clean or dirty.
  4. For every branch or clean worktree recommended for deletion, attach the evidence that justifies it: the merge commit SHA, the empty git log output proving no unique commits, or the worktree's clean status. Branches categorized unanalyzed are surfaced with their reason and never recommended for deletion. Done when: each recommended deletion has its evidence attached and no unanalyzed branch is recommended.
  5. Present the full categorized list and, for each recommended deletion, the exact quoted command the user must confirm (for example git branch -d <name> or git worktree remove <path>). Do not execute any command yet. Done when: the categorized list and every recommended deletion's exact quoted command are shown, with nothing executed.
  6. Wait for explicit human confirmation of each exact quoted command. Refuse to batch, abbreviate, or infer confirmation. Done when: the user confirms each exact quoted command individually, or declines.
  7. Execute only the confirmed commands, one at a time, in the order confirmed. After each command, record whether it succeeded (deleted) or failed, capturing the exact git error message. Done when: each confirmed command ran and is recorded deleted or failed with its git error message.

Failure and recovery

  • Dirty worktree: refuse deletion, report the uncommitted changes, and stop. The user must commit, stash, or discard changes before retrying.
  • Protected branch: refuse deletion, name the branch, and stop. Protected branches are the current branch, the default upstream, and any branch the repository marks protected.
  • Unanalyzed branch: surface the branch with its reason (missing upstream, ambiguous merge comparison) and never delete it. Deletion requires the user to resolve the ambiguity and re-invoke.
  • Command failure: record the exact git error, leave all other confirmed commands pending, and report the failure. Do not retry automatically or widen scope.
  • Missing confirmation: stop before execution. No deletion occurs. Partial results are the categorized analysis only; no branch or worktree is removed without per-command confirmation.
  • Recovery for an accidental deletion is git reflog and git branch <name> <sha> for branches, or re-adding a worktree with git worktree add; state this recovery path when reporting any deletion.

Output

A categorized report of every local branch (merged, unmerged-with-evidence, unanalyzed, or protected) and every worktree (clean, dirty, or protected), each recommended deletion with its evidence and exact quoted command, the set of confirmed commands, and a per-command result of deleted or failed with the git error message. Branches or worktrees never confirmed remain listed as not deleted.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

af-xdp

무료

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

agents-md

무료

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

OutlineDriven의 스킬 모두 보기

이 스킬의 문제 신고