agent-device-lab
Prepare and check trusted macOS hosts for physical Android and iPhone tests with agent-device, ADB, and Xcode, or set up iPhone…
Audit and safely prune stale branches across a GitHub organization with immutable snapshots, conservative merged-PR classification, live SHA/protection/open-PR revalidation, resumable deletion ledgers, and post-delete verification. Use when a maintainer asks to clean up old,
$ npx -y skills add vincentkoc/dotskills --skill org-branch-cleanup --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/org-branch-cleanupContext preview
The summary Claude sees to decide when to auto-load this skill.
Audit and safely prune stale branches across a GitHub organization with immutable snapshots, conservative merged-PR classification, live SHA/protection/open-PR revalidation, resumable deletion ledgers, and post-delete verification. Use when a maintainer asks to clean up old,
name: org-branch-cleanup description: Audit and safely prune stale branches across a GitHub organization with immutable snapshots, conservative merged-PR classification, live SHA/protection/open-PR revalidation, resumable deletion ledgers, and post-delete verification. Use when a maintainer asks to clean up old, dead, merged, bot-created, or abandoned organization branches without risking default, protected, release, security-advisory, state, or active pull-request refs. license: MIT metadata: source: "https://github.com/vincentkoc/dotskills"
Remove organization branch clutter without guessing which refs are safe to delete.
The bundled `scripts/org_branch_cleanup.py` separates the work into read-only audit, explicit apply, and full verification phases. Dry-run evidence is the default; deletion requires an exact organization confirmation.
1. Read the target repository or organization instructions before mutation. 2. Confirm GitHub authentication and rate-limit headroom:
3. Run a read-only audit:
python3 scripts/org_branch_cleanup.py audit \
--org example-org \
--output /tmp/example-org-branch-auditStart with `--include-repo-regex '^one-repo$'` when proving access or policy. Audit output is immutable by default; use a new directory rather than `--overwrite`. 4. Inspect `audit-summary.json`, `audit-errors.tsv`, and `delete-candidates.jsonl`.
5. Apply only after the candidate set is reviewed:
python3 scripts/org_branch_cleanup.py apply \
--candidates /tmp/example-org-branch-audit/delete-candidates.jsonl \
--confirm-org example-org \
--output /tmp/example-org-branch-apply`apply` requires the clean sibling `audit-summary.json`. Do not bypass this with `--allow-unverified-candidates` or `--allow-partial-audit` without an explicit operator decision. 6. Treat each preflight skip as a safety result, not a failure.
7. Verify every deletion:
python3 scripts/org_branch_cleanup.py verify \
--ledger /tmp/example-org-branch-apply/deleted.tsv \
--output /tmp/example-org-branch-apply/verification-rerun.tsv8. Report exact deleted, skipped, retained, excluded-repository, and verification counts. Preserve the ledger until the cleanup is accepted.
stateDiagram-v2
[*] --> AuditRequestedScope
AuditRequestedScope --> ReportAudit: audit only
AuditRequestedScope --> ReviewCandidates: apply requested
ReviewCandidates --> ReportBlocked: incomplete audit without explicit exception
ReviewCandidates --> RevalidateLiveRef: exact organization and candidates approved
RevalidateLiveRef --> RecordSkip: moved, protected, open PR, or missing
RevalidateLiveRef --> DeleteExactRef: eligible unchanged ref
DeleteExactRef --> VerifyDeletion
VerifyDeletion --> RecordDeleted: absent
VerifyDeletion --> ReportBlocked: failure or ambiguous result
RecordSkip --> ReportCounts
RecordDeleted --> ReportCounts
ReportAudit --> [*]
ReportCounts --> [*]
ReportBlocked --> [*]We are moving from "prompt as text" to skill as runtime module. Each skill acts like a lightweight, containerized application for AI work: a stable interface, opinionated workflow, and bundled resources that can be installed, versioned, tested, and reused
Prepare and check trusted macOS hosts for physical Android and iPhone tests with agent-device, ADB, and Xcode, or set up iPhone…
Resolve canonical Git checkouts, index and verify codebase-memory-mcp graphs through the guarded CLI, open its browser viewer on…
Mine structured Codex /goal history locally or across a configured machine fleet, measure active goal time and resumed thread…
Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without…
Interpret Crabpot and OpenClaw performance dashboard metrics, import-loop profiles, runtime profiles, and branch-to-branch perf…
Maintain and release the crawlkit Go library, preserving downstream compatibility for gitcrawl, slacrawl, discrawl, and notcrawl.