flow-cleanup
Clean up stale worktree references and merged branches
- License 许可
- MIT
- 所属仓库
- cooneycw/skillc
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- flow-cleanup
- description
- Clean up stale worktree references and merged branches
02 资源文件 7
- 参考文档docs/decisions/0006-worktree-teardown-ownership.md14.9 KB
- 参考文档PROVENANCE.md604 B
- 参考文档reference.md9.6 KB
- 脚本scripts/flow-worktree-claim.sh24.3 KB
- 脚本scripts/flow-worktree-sweep.sh26.1 KB
- 脚本scripts/SHA256SUMS840 B
- 脚本scripts/worktree-remove.sh75.2 KB
03 SKILL.md 正文
<!-- GENERATED by claude-power-pack - scripts/codex-skill-sync.py; edit .claude/commands/flow/cleanup.md instead -->
Codex harness adaptations
Generated from a Claude Code command. Where the procedure references these Claude-only surfaces, adapt as follows:
- Native worktrees (
EnterWorktree/ExitWorktreetool calls,.claude/worktrees/paths): use plain git instead, with the worktree as a VISIBLE SIBLING of the repo -git worktree add ../<repo>-<branch> -b <branch>(or$FLOW_WORKTREE_BASE/<repo>-<branch>when that env var is set), work inside it, thengit worktree remove ../<repo>-<branch>when done. - Helper scripts are bundled under
scripts/in this skill directory (byte-identical copies from the claude-power-pack checkout). Commands run them as"${CPP_SKILL_DIR:-/dev/null}"/scripts/<name>:CPP_SKILL_DIRis the absolute directory containing THIS SKILL.md - the location the skills catalog gives, with any alias such asr0expanded. A shell resolves a barescripts/<name>against your working directory (the target project), never this skill, so substitute that directory, or set it in the same command (CPP_SKILL_DIR=/abs/skill/dir; ...) - each command is a fresh shell. "Not a directory" on/dev/null/scripts/<name>(exit 126, or 127 in some shells) meansCPP_SKILL_DIRis unset: set it and re-run; never run the target project's ownscripts/<name>in its place. Read every "exit 127" fallback in this skill as "exit 127, or 126 Not a directory": set the variable and re-run before falling back. A helper whose verdict gates a step and that prints no verdict line after the whole fallback chain did not run - for the finish gate, noFLOW_FINISH_GATE:verdict line: STOP, never read it as skipped, never commit on it (issue #1547). A barescripts/<name>inside a command is a CPP-checkout operation that the text says so about; in prose,scripts/<name>NAMES the bundled helper. Some helpers expect sibling repo resources, so prefer a full checkout when one is available. - Canonical guidance linked as
docs/<path>is bundled underdocs/in this skill directory (byte-identical copies from the claude-power-pack checkout). The source-relative../../../docs/...link in the command body resolves outside an installed skill, so the generated copy points at the bundled path instead. docs/ remains the only writable source. - Network: this skill's bundled helpers appear to call the network (
gh,git fetch/push,curl,aws, HTTP). Codex's workspace sandbox has no network, and an allow rule forghcovers only a top-levelghcommand, never one a helper runs. Run these helpers with escalated permissions. From inside the sandbox, "error connecting to api.github.com" means no network, not a GitHub outage or a bad login.
Flow: Cleanup - Prune Stale Worktrees and Branches
Clean up stale worktree references and merged branches
Full procedure
Read reference.md in this skill directory for the complete, authoritative procedure before acting on this skill.
04 同仓库更多 Skills
tiny-check
Run the tiny project check
tiny-check
A synthetic gate selection fixture.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.