[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71SP0K435N5KN2NYQ864ACE":3,"skill-same:01M71SP0K435N5KN2NYQ864ACE":119},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":69,"repositoryHtmlUrl":70,"repositoryHomepageUrl":71,"ownerHtmlUrl":72,"ownerBlogUrl":73,"ownerDescription":74,"updatedAt":75,"install":76,"resources":88},"01M71SP0K435N5KN2NYQ864ACE","cleanup",null,"Clean up after completed or abandoned orc sessions — removes workspace state, registry entry, git worktree, and optionally the merged branch. Destructive; always previews and asks first. Workspace-aware.","HigorAlves\u002Forc","HigorAlves","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11262976?v=4","01M71S79EZEMHZ8PQSV0XQJHYY","Higor Alves","01M71S79FKKTCHCN1EDR8DSTWQ",7,"MIT","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"branch","parse","dry","clean","log","up","auto","edit","write","read","status","gh pr","git worktree","Bash","worktree","registry","git","run","docker compose","2026-11-10 13:02:02",false,"---\nname: cleanup\ndescription: Clean up after completed or abandoned orc sessions — removes workspace state, registry entry, git worktree, and optionally the merged branch. Destructive; always previews and asks first. Workspace-aware.\nargument-hint: \"[--auto[=guided|full]] [--dry-run] [--all-completed] [--per-repo] [--down-volumes] [\u003Csession-id-or-branch>]\"\ndisable-model-invocation: true\nallowed-tools:\n  - Bash(orc-state:*)\n  - Read\n  - Write\n  - Edit\n  - Glob\n  - Grep\n  - AskUserQuestion\n  - Bash(git worktree:*)\n  - Bash(git branch:*)\n  - Bash(git rev-parse:*)\n  - Bash(git status:*)\n  - Bash(git log:*)\n  - Bash(gh pr view:*)\n  - Bash(rm -rf .orc:*)\n  - Bash(jq:*)\n  - Bash(orc-workspace-detect:*)\n  - Bash(orc-docker-env:*)\n  - Bash(docker compose:*)\n  - Bash(kill:*)\n  - Bash(ps:*)\n---\n\n# \u002Forc:cleanup\n\nClose the loop on finished orc work: remove the workspace state, the worktree and, when safe, the local feature branch.\n\n## Arguments\n\n- `--auto[=guided|full]` — autopilot level for this run; overrides `interaction_policy`. Ladder and hard-outward exemption: `orc:gates` §6.\n- `\u003Csession-id-or-branch>` — optional. Clean exactly one session, by `sessionId` (`orc-state sessions`, schema `orc:state-protocol`) or branch name, sanitized or raw.\n- `--all-completed` — clean every session whose `status` is `completed` or `abandoned`. Every safety check still applies per session.\n- `--dry-run` — print what would happen; change nothing. Recommended for the first run.\n- `--per-repo` — workspace mode: clean each linked repo as its PR merges. Use only when abandoning some repos (rare).\n- `--down-volumes` — also remove a torn-down environment's named volumes. Default keeps them: the next boot reuses DB data.\n\nNOTE: at `guided` or `full`, the standard plan (state dir, clean worktree, merged branch) auto-applies after printing. Anomalies still gate at every level: partial workspace merges, unmerged branches, a dirty worktree.\n\n## Preconditions\n\n> **🛑 Destructive run**\n>\n> P6 removes state directories, worktrees and local branches. The P5 preview gate is mandatory; `--dry-run` never applies.\n\n- Running from inside a candidate worktree stops the run in P1: `cd` to the main repo first.\n- In workspace mode, an open linked PR refuses the run unless `--per-repo` or the session is `abandoned`.\n- Typical moments: a shipped PR merged; `\u002Forc:status` shows stale `completed` sessions; an abandoned feature (mark the session `abandoned` first).\n\n## Phases\n\nModules live beside this file under `references\u002F` (ADR 0008 pilot). Entering a phase, Read exactly its module, per the `orc:phases` protocol.\n\n| Phase | Module | Skipped when |\n|---|---|---|\n| 0 Detect context | resident, below | never |\n| 1 Guard: not inside a candidate | `orc:cleanup\u002FP1` | never |\n| 2 Read the registry | `orc:cleanup\u002FP2` | never |\n| 3 Build the candidate list | `orc:cleanup\u002FP3` | never |\n| 4 Inspect each candidate | `orc:cleanup\u002FP4` | never |\n| 5 Preview the plan, then confirm | `orc:cleanup\u002FP5` | never; `--dry-run` stops here |\n| 6 Apply with safety gates | `orc:cleanup\u002FP6` | `--dry-run`, Cancel |\n| 7 Report | `orc:cleanup\u002FP7` | `--dry-run` |\n\n### Phase 0 — Detect context\n\n!`orc-workspace-detect --banner`\n\n1. Read the banner above; it exports `ORC_*` vars. Do not re-run detection.\n2. In workspace mode, note the registry for P2: `${ORC_STATE_DIR}\u002Forc.json`.\n3. In workspace mode, before P4, fetch the merge state of each candidate's linked PRs.\n4. If any linked PR is not `MERGED`, refuse and list the open PRs.\n\n```bash\nfor url in $(jq -r '.sessions[] | select(.sessionId == \"'$ID'\") | .linkedPRs[].url' \"$ORC_STATE_DIR\u002Forc.json\"); do\n  gh pr view \"$url\" --json state -q .state\ndone\n```\n\nNOTE: workspace sessions carry `scope: \"workspace\"` and a `repos` array. After a refusal the user either waits, passes `--per-repo` to clean only the merged repos, or marks the session `abandoned` to bypass the merge check.\n\n## Iron rules\n\n- Never pass `--force` to `git worktree remove`. A dirty worktree holds user work: skip it and say so.\n- Never run `git branch -D`. Only `-d`, which refuses unmerged branches. The user runs `-D` by hand.\n- Never delete while running from inside a candidate. Refuse and name where to `cd`.\n- `.orc\u002Forc.json` updates are atomic: Read, modify in memory, Write the whole file. Never partial.\n- `--dry-run` always prints the plan and exits, even after a confirming answer in the gate.\n- A stack member at position N is deletable only when positions 1..N-1 are all `MERGED`. `--per-repo` bypasses, with consent.\n- Never `docker compose down` a project without the `orc-` prefix. Orphans appear in the preview; the user opts into each one.\n- Named volumes survive by default; only `--down-volumes` removes them. DB data is user work.\n\n## Output\n\n- `.orc\u002Forc.json` with the cleaned entries removed.\n- `.orc\u002F\u003Cbranch>\u002F` directories removed.\n- Worktrees removed where clean; local branches deleted where merged.\n- A plain fenced summary (P7) with everything left undone and why.\n","# \u002Forc:cleanup\n\nClose the loop on finished orc work: remove the workspace state, the worktree and, when safe, the local feature branch.\n\n## Arguments\n\n- `--auto[=guided|full]` — autopilot level for this run; overrides `interaction_policy`. Ladder and hard-outward exemption: `orc:gates` §6.\n- `\u003Csession-id-or-branch>` — optional. Clean exactly one session, by `sessionId` (`orc-state sessions`, schema `orc:state-protocol`) or branch name, sanitized or raw.\n- `--all-completed` — clean every session whose `status` is `completed` or `abandoned`. Every safety check still applies per session.\n- `--dry-run` — print what would happen; change nothing. Recommended for the first run.\n- `--per-repo` — workspace mode: clean each linked repo as its PR merges. Use only when abandoning some repos (rare).\n- `--down-volumes` — also remove a torn-down environment's named volumes. Default keeps them: the next boot reuses DB data.\n\nNOTE: at `guided` or `full`, the standard plan (state dir, clean worktree, merged branch) auto-applies after printing. Anomalies still gate at every level: partial workspace merges, unmerged branches, a dirty worktree.\n\n## Preconditions\n\n> **🛑 Destructive run**\n>\n> P6 removes state directories, worktrees and local branches. The P5 preview gate is mandatory; `--dry-run` never applies.\n\n- Running from inside a candidate worktree stops the run in P1: `cd` to the main repo first.\n- In workspace mode, an open linked PR refuses the run unless `--per-repo` or the session is `abandoned`.\n- Typical moments: a shipped PR merged; `\u002Forc:status` shows stale `completed` sessions; an abandoned feature (mark the session `abandoned` first).\n\n## Phases\n\nModules live beside this file under `references\u002F` (ADR 0008 pilot). Entering a phase, Read exactly its module, per the `orc:phases` protocol.\n\n| Phase | Module | Skipped when |\n|---|---|---|\n| 0 Detect context | resident, below | never |\n| 1 Guard: not inside a candidate | `orc:cleanup\u002FP1` | never |\n| 2 Read the registry | `orc:cleanup\u002FP2` | never |\n| 3 Build the candidate list | `orc:cleanup\u002FP3` | never |\n| 4 Inspect each candidate | `orc:cleanup\u002FP4` | never |\n| 5 Preview the plan, then confirm | `orc:cleanup\u002FP5` | never; `--dry-run` stops here |\n| 6 Apply with safety gates | `orc:cleanup\u002FP6` | `--dry-run`, Cancel |\n| 7 Report | `orc:cleanup\u002FP7` | `--dry-run` |\n\n### Phase 0 — Detect context\n\n!`orc-workspace-detect --banner`\n\n1. Read the banner above; it exports `ORC_*` vars. Do not re-run detection.\n2. In workspace mode, note the registry for P2: `${ORC_STATE_DIR}\u002Forc.json`.\n3. In workspace mode, before P4, fetch the merge state of each candidate's linked PRs.\n4. If any linked PR is not `MERGED`, refuse and list the open PRs.\n\n```bash\nfor url in $(jq -r '.sessions[] | select(.sessionId == \"'$ID'\") | .linkedPRs[].url' \"$ORC_STATE_DIR\u002Forc.json\"); do\n  gh pr view \"$url\" --json state -q .state\ndone\n```\n\nNOTE: workspace sessions carry `scope: \"workspace\"` and a `repos` array. After a refusal the user either waits, passes `--per-repo` to clean only the merged repos, or marks the session `abandoned` to bypass the merge check.\n\n## Iron rules\n\n- Never pass `--force` to `git worktree remove`. A dirty worktree holds user work: skip it and say so.\n- Never run `git branch -D`. Only `-d`, which refuses unmerged branches. The user runs `-D` by hand.\n- Never delete while running from inside a candidate. Refuse and name where to `cd`.\n- `.orc\u002Forc.json` updates are atomic: Read, modify in memory, Write the whole file. Never partial.\n- `--dry-run` always prints the plan and exits, even after a confirming answer in the gate.\n- A stack member at position N is deletable only when positions 1..N-1 are all `MERGED`. `--per-repo` bypasses, with consent.\n- Never `docker compose down` a project without the `orc-` prefix. Orphans appear in the preview; the user opts into each one.\n- Named volumes survive by default; only `--down-volumes` removes them. DB data is user work.\n\n## Output\n\n- `.orc\u002Forc.json` with the cleaned entries removed.\n- `.orc\u002F\u003Cbranch>\u002F` directories removed.\n- Worktrees removed where clean; local branches deleted where merged.\n- A plain fenced summary (P7) with everything left undone and why.\n",{"name":5,"description":7,"allowed-tools":43,"argument-hint":64,"disable-model-invocation":65},[44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],"Bash(orc-state:*)","Read","Write","Edit","Glob","Grep","AskUserQuestion","Bash(git worktree:*)","Bash(git branch:*)","Bash(git rev-parse:*)","Bash(git status:*)","Bash(git log:*)","Bash(gh pr view:*)","Bash(rm -rf .orc:*)","Bash(jq:*)","Bash(orc-workspace-detect:*)","Bash(orc-docker-env:*)","Bash(docker compose:*)","Bash(kill:*)","Bash(ps:*)","[--auto[=guided|full]] [--dry-run] [--all-completed] [--per-repo] [--down-volumes] [\u003Csession-id-or-branch>]",true,"main","7522fd7266944e30052204c2f6df287d8b5516be","orc\u002Fskills\u002Fcleanup",0,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc","https:\u002F\u002Forc.novacstack.com\u002F","https:\u002F\u002Fgithub.com\u002FHigorAlves","higoralves.dev","Software Engineering","2026-11-14 07:24:14",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":65},[78,81,84],{"tool":79,"command":80},"npx","npx skills add HigorAlves\u002Forc --skill cleanup",{"tool":82,"command":83},"bunx","bunx skills add HigorAlves\u002Forc --skill cleanup",{"tool":85,"command":86},"pnpm","pnpm dlx skills add HigorAlves\u002Forc --skill cleanup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002FSKILL.md",[89,95,99,103,107,111,115],{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002FPHASE-1-GUARD.md","REFERENCE","参考文档",506,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-1-GUARD.md",{"path":96,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002FPHASE-2-REGISTRY.md",399,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-2-REGISTRY.md",{"path":100,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002FPHASE-3-CANDIDATES.md",791,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-3-CANDIDATES.md",{"path":104,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002FPHASE-4-INSPECT.md",2534,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-4-INSPECT.md",{"path":108,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002FPHASE-5-PLAN.md",2298,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-5-PLAN.md",{"path":112,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002FPHASE-6-APPLY.md",2842,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-6-APPLY.md",{"path":116,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":117,"sourceHtmlUrl":118},"references\u002FPHASE-7-REPORT.md",671,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fcleanup\u002Freferences\u002FPHASE-7-REPORT.md",[120,128,154,175,193,213],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":127},"01M73VYZ3XY4HAVS3WS73CW9J7","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Fcodex\u002Forc\u002Fcontent\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M71SW40F9TAAEDKBYYBCM814","writing-plans","Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[135,136,137,138,139,140,141,142,143,144,27,145,146,147,148,149,150,151,152,153],"writing","writing plans","plans","use","code","tests","for","ZeRO","context","steps","plan","verification","tasks","you","when","files","implementation plan","superpowers","engineer",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":38},"01M71SW15KHE4MHJW9NEXV65X2","writing-for-agents","orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md\u002FCLAUDE.md, reference docs","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[135,161,141,162,163,138,164,165,166,167,168,169,149,170,171,172,173,174],"writing for agents","a skill","document","editing","push","doctrine","layer","tuning","inline","matt pocock","github","docs","reference","https",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":38},"01M71SVYQKXT743HHHWGHT3G13","workspace-mode","Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos\u002F--repo\u002F--all-repos\u002F--this-repo precedence, per-repo dispatch, and linked-PR mechanics.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fworkspace-mode\u002FSKILL.md",[],[182,183,184,185,186,187,138,188,189,35,190,149,25,191,192],"workspace mode","mode","workspace","auto-detection","detection","parent","repo","pr","repos","mechanics","dispatch",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":199,"publishedAt":38},"01M71SVVP3BXS06G9395P2K0RH","wizard","Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwizard\u002FSKILL.md",[],[195,149,170,200,201,202,203,32,138,204,205,141,206,207,144,208,209,210,211,212],"only","provisioning infrastructure","never","condition","interactive","one","do","infrastructure","secrets","human","generate","credentials","work",{"skillNo":214,"name":215,"nameZh":6,"description":216,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":217,"categories":218,"keywords":219,"publishedAt":38},"01M71SVT4AR6NKAM5B077E7QSJ","wait-what","Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[220,221,174,222,223,224,225,171,226,227,228,229,170,230,231,232],"wait","wait what","vocabulary","stop","it","land","message","say","last","pitch","true","re","project"]