[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CP2RG5VF7TB403FRPHCHHW":3,"skill-same:01M6CP2RG5VF7TB403FRPHCHHW":63},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6CP2RG5VF7TB403FRPHCHHW","worktree-cleanup",null,"Removes git worktrees safely, cleans up associated branches, and pulls latest mainline after removal. Use when finished with a worktree, done with a branch, cleaning up after a merge or PR, abandoning work in a worktree, or when \"git worktree list\" shows stale entries. Checks for uncommitted changes, verifies no open PRs before branch deletion, and handles force-removal of locked worktrees.","shousper\u002Fclanker-kit","shousper","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1144345?v=4","01M6CP153W30NV9J1XT8K98G4J","Corey McGregor","01M6CP157WFP2WEFX4TJH7JVPG",5,"MIT","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fskills\u002Fworktree-cleanup\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"cleanup","worktree","worktree cleanup","list","done","branches","worktrees","stale","up","use","git worktrees","merge","branch","work","git worktree","open","git","pr","2026-11-10 10:12:30",false,"---\nname: worktree-cleanup\ndescription: Removes git worktrees safely, cleans up associated branches, and pulls latest mainline after removal. Use when finished with a worktree, done with a branch, cleaning up after a merge or PR, abandoning work in a worktree, or when \"git worktree list\" shows stale entries. Checks for uncommitted changes, verifies no open PRs before branch deletion, and handles force-removal of locked worktrees.\n---\n\n# Worktree Cleanup\n\n## Overview\n\nClean up a git worktree after work is complete (merged, PR created, or abandoned). Updates the mainline branch so local state is current.\n\n**Core principle:** User-triggered only. Never automatic.\n\n## The Process\n\n### Step 1: List Worktrees\n\n```bash\ngit worktree list\n```\n\nIf multiple worktrees exist (beyond the main working tree), present the list and ask which to clean up.\n\nIf only one non-main worktree exists, confirm: \"Remove worktree at `\u003Cpath>`?\"\n\n### Step 2: Check for Uncommitted Changes\n\n```bash\ngit -C \u003Cworktree-path> status --porcelain\n```\n\nIf dirty:\n- Show the uncommitted files\n- Ask: \"This worktree has uncommitted changes. Proceed with removal? (Changes will be lost)\"\n- Require explicit confirmation\n\n### Step 3: Remove Worktree\n\n⚠️ **CRITICAL — cd before removal:** You MUST determine the main working tree path and `cd` to it BEFORE running any removal command. Always chain the `cd` and removal in the SAME shell call using `&&`. Never run them as separate shell calls — shell CWD persists between calls, but a deleted CWD will brick every subsequent command.\n\nFirst, capture the main working tree path from Step 1's output (the first entry in `git worktree list`).\n\nThen remove:\n```bash\ncd \u003Cmain-working-tree> && git worktree remove \u003Cworktree-path>\n```\n\nIf removal fails (e.g., locked or dirty), try with `--force` after informing your human partner:\n```bash\ncd \u003Cmain-working-tree> && git worktree remove --force \u003Cworktree-path>\n```\n\nIf the worktree directory was already manually deleted from disk, clean up stale metadata:\n```bash\ncd \u003Cmain-working-tree> && git worktree prune\n```\n\n### Recovery: Dead CWD\n\nIf any Bash command fails with `Path \"...\" does not exist`, your shell CWD has been deleted from disk. **Do NOT retry the same command.** You MUST prefix your next command with an absolute `cd`:\n\n```bash\ncd \u003Cmain-working-tree> && git worktree prune && git worktree list\n```\n\nThe main working tree path (first entry from Step 1) is always valid. Use that. Retrying without the `cd` prefix will fail infinitely.\n\n### Step 4: Clean Up Branch (Optional)\n\nIf the worktree's branch has been merged or your human partner chose \"discard\":\n```bash\ngit branch -d \u003Cbranch-name>   # safe delete (only if merged)\n```\n\nIf not merged and user wants to delete:\n```bash\ngit branch -D \u003Cbranch-name>   # force delete — confirm first\n```\n\nCheck for open PRs before deleting:\n```bash\ngh pr list --head \u003Cbranch-name> --state open --json number --jq 'length'\n```\n\nIf the result is non-zero, skip branch deletion — the branch is still needed for the open PR.\n\n### Step 5: Update Mainline\n\nDetermine the mainline branch:\n```bash\ngit symbolic-ref refs\u002Fremotes\u002Forigin\u002FHEAD 2>\u002Fdev\u002Fnull | sed 's@^refs\u002Fremotes\u002Forigin\u002F@@'\n```\n\nFallback: check for `main` then `master`.\n\nIf currently on mainline:\n```bash\ngit pull --autostash\n```\n\nIf `--autostash` fails or there are staged changes:\n```bash\ngit stash\ngit pull --ff-only\ngit stash pop\n```\n\nIf pull can't fast-forward: inform your human partner. Do not force-merge or rebase without asking.\n\nIf NOT on mainline: offer to switch.\n```\nWould you like to switch to \u003Cmainline> and pull latest?\n```\n\n## Red Flags\n\n**Never:**\n- Auto-cleanup worktrees (always user-triggered)\n- Force-delete branches without confirmation\n- Force-merge or rebase mainline without asking\n- Run `git worktree remove` without `cd \u003Cmain-tree> &&` prefix in the same command\n- Retry a failed Bash command without first `cd`-ing to a valid absolute path — if you get \"Path does not exist\", your CWD is gone\n\n**Always:**\n- Check for uncommitted changes before removal\n- Confirm destructive operations\n- Chain `cd \u003Cmain-working-tree> &&` before every removal\u002Fprune command\n- Handle pull failures gracefully (inform, don't force)\n\n## Quick Reference\n\n| Command | Purpose |\n|---|---|\n| `git worktree list` | List all worktrees |\n| `git -C \u003Cpath> status --porcelain` | Check for uncommitted changes |\n| `git worktree remove \u003Cpath>` | Remove a worktree |\n| `git worktree remove --force \u003Cpath>` | Force-remove (locked\u002Fdirty worktree) |\n| `git worktree prune` | Clean up stale worktree metadata |\n| `git branch -d \u003Cbranch>` | Safe-delete merged branch |\n| `git branch -D \u003Cbranch>` | Force-delete unmerged branch |\n| `gh pr list --head \u003Cbranch> --state open --json number --jq 'length'` | Check for open PRs on branch |\n\n## Integration\n\n**Pairs with:**\n- **finish-branch** — called after finishing, at user's discretion\n- **git-worktrees** — cleans up what that skill creates\n","# Worktree Cleanup\n\n## Overview\n\nClean up a git worktree after work is complete (merged, PR created, or abandoned). Updates the mainline branch so local state is current.\n\n**Core principle:** User-triggered only. Never automatic.\n\n## The Process\n\n### Step 1: List Worktrees\n\n```bash\ngit worktree list\n```\n\nIf multiple worktrees exist (beyond the main working tree), present the list and ask which to clean up.\n\nIf only one non-main worktree exists, confirm: \"Remove worktree at `\u003Cpath>`?\"\n\n### Step 2: Check for Uncommitted Changes\n\n```bash\ngit -C \u003Cworktree-path> status --porcelain\n```\n\nIf dirty:\n- Show the uncommitted files\n- Ask: \"This worktree has uncommitted changes. Proceed with removal? (Changes will be lost)\"\n- Require explicit confirmation\n\n### Step 3: Remove Worktree\n\n⚠️ **CRITICAL — cd before removal:** You MUST determine the main working tree path and `cd` to it BEFORE running any removal command. Always chain the `cd` and removal in the SAME shell call using `&&`. Never run them as separate shell calls — shell CWD persists between calls, but a deleted CWD will brick every subsequent command.\n\nFirst, capture the main working tree path from Step 1's output (the first entry in `git worktree list`).\n\nThen remove:\n```bash\ncd \u003Cmain-working-tree> && git worktree remove \u003Cworktree-path>\n```\n\nIf removal fails (e.g., locked or dirty), try with `--force` after informing your human partner:\n```bash\ncd \u003Cmain-working-tree> && git worktree remove --force \u003Cworktree-path>\n```\n\nIf the worktree directory was already manually deleted from disk, clean up stale metadata:\n```bash\ncd \u003Cmain-working-tree> && git worktree prune\n```\n\n### Recovery: Dead CWD\n\nIf any Bash command fails with `Path \"...\" does not exist`, your shell CWD has been deleted from disk. **Do NOT retry the same command.** You MUST prefix your next command with an absolute `cd`:\n\n```bash\ncd \u003Cmain-working-tree> && git worktree prune && git worktree list\n```\n\nThe main working tree path (first entry from Step 1) is always valid. Use that. Retrying without the `cd` prefix will fail infinitely.\n\n### Step 4: Clean Up Branch (Optional)\n\nIf the worktree's branch has been merged or your human partner chose \"discard\":\n```bash\ngit branch -d \u003Cbranch-name>   # safe delete (only if merged)\n```\n\nIf not merged and user wants to delete:\n```bash\ngit branch -D \u003Cbranch-name>   # force delete — confirm first\n```\n\nCheck for open PRs before deleting:\n```bash\ngh pr list --head \u003Cbranch-name> --state open --json number --jq 'length'\n```\n\nIf the result is non-zero, skip branch deletion — the branch is still needed for the open PR.\n\n### Step 5: Update Mainline\n\nDetermine the mainline branch:\n```bash\ngit symbolic-ref refs\u002Fremotes\u002Forigin\u002FHEAD 2>\u002Fdev\u002Fnull | sed 's@^refs\u002Fremotes\u002Forigin\u002F@@'\n```\n\nFallback: check for `main` then `master`.\n\nIf currently on mainline:\n```bash\ngit pull --autostash\n```\n\nIf `--autostash` fails or there are staged changes:\n```bash\ngit stash\ngit pull --ff-only\ngit stash pop\n```\n\nIf pull can't fast-forward: inform your human partner. Do not force-merge or rebase without asking.\n\nIf NOT on mainline: offer to switch.\n```\nWould you like to switch to \u003Cmainline> and pull latest?\n```\n\n## Red Flags\n\n**Never:**\n- Auto-cleanup worktrees (always user-triggered)\n- Force-delete branches without confirmation\n- Force-merge or rebase mainline without asking\n- Run `git worktree remove` without `cd \u003Cmain-tree> &&` prefix in the same command\n- Retry a failed Bash command without first `cd`-ing to a valid absolute path — if you get \"Path does not exist\", your CWD is gone\n\n**Always:**\n- Check for uncommitted changes before removal\n- Confirm destructive operations\n- Chain `cd \u003Cmain-working-tree> &&` before every removal\u002Fprune command\n- Handle pull failures gracefully (inform, don't force)\n\n## Quick Reference\n\n| Command | Purpose |\n|---|---|\n| `git worktree list` | List all worktrees |\n| `git -C \u003Cpath> status --porcelain` | Check for uncommitted changes |\n| `git worktree remove \u003Cpath>` | Remove a worktree |\n| `git worktree remove --force \u003Cpath>` | Force-remove (locked\u002Fdirty worktree) |\n| `git worktree prune` | Clean up stale worktree metadata |\n| `git branch -d \u003Cbranch>` | Safe-delete merged branch |\n| `git branch -D \u003Cbranch>` | Force-delete unmerged branch |\n| `gh pr list --head \u003Cbranch> --state open --json number --jq 'length'` | Check for open PRs on branch |\n\n## Integration\n\n**Pairs with:**\n- **finish-branch** — called after finishing, at user's discretion\n- **git-worktrees** — cleans up what that skill creates\n",{"name":5,"description":7},"main","ffcb87b7a18526a98eccab20c8c12526bb10af96","shared\u002Fskills\u002Fworktree-cleanup",2,"https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit","https:\u002F\u002Fgithub.com\u002Fshousper","2026-10-27 23:43:43",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add shousper\u002Fclanker-kit --skill worktree-cleanup",{"tool":55,"command":56},"bunx","bunx skills add shousper\u002Fclanker-kit --skill worktree-cleanup",{"tool":58,"command":59},"pnpm","pnpm dlx skills add shousper\u002Fclanker-kit --skill worktree-cleanup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fskills\u002Fworktree-cleanup\u002FSKILL.md",true,[],[64,88,111,127,144,157],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":37},"01M6CP3FKPXFKQBY5979X2W9GN","writing-docs","Use when creating or editing documentation of any kind, including Markdown, RST, or HTML pages, READMEs, design docs, ADRs, changelogs, docstrings, and comment blocks. Covers document purpose, headings, paragraphs, lists, procedures, notices, cross-references, code samples, placeholders, example data, and word choice for technical writing.","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fwriting\u002Fskills\u002Fwriting-docs\u002FSKILL.md",[],[71,72,73,74,75,76,77,78,79,80,81,82,83,28,84,85,86,87],"writing","docs","writing docs","design","technical writing","documentation","code","data","markdown","Word","choice","editing","technical","html","example","document","references",{"skillNo":89,"name":32,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":37},"01M6CP3CHHC5S3FG5DS38W6PP8","Runs the story worker loop in a story-workflow project — claim ready stories, implement each in its own worktree, close through verification gates, repeat until the goal is met or the loop stalls. Use when asked to \"work the board\", \"complete all stories\", \"work on epic st-XXXX\", \"pick up the next story\", \"start a worker\", or to resume or continue a story run — and when a loop re-prompt names the next story in a session that started the loop. DO NOT TRIGGER without .agents\u002Fshousper-stories\u002Fconfig.json (use stories:setup first), for decomposing a spec into stories (stories:plan), or to stop a run (stories:cancel).","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fstories\u002Fskills\u002Fwork\u002FSKILL.md",[],[32,94,95,96,97,20,98,99,100,101,102,103,104,105,27,106,107,108,109,110],"workflow","config","run","verification","start","loop","plan","work on","pick","verification gates","session","ready","goal","stop","do","claim","next",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":37},"01M6CP39QNRN136HV0F62TMS7P","using-stories","Compressed story-workflow rulebook, injected automatically at session start (including after compaction) in projects with .agents\u002Fshousper-stories\u002Fconfig.json. Use when unsure of the workflow rules mid-session, when asked \"how does the story workflow work here\", or for a story CLI quick reference. DO NOT TRIGGER in projects without .agents\u002Fshousper-stories\u002Fconfig.json, to set up the workflow (stories:setup), to file stories (stories:plan), or to run the loop (stories:work).","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fstories\u002Fskills\u002Fusing-stories\u002FSKILL.md",[],[118,119,94,95,120,96,98,121,122,99,100,123,124,125,32,104,28,27,126,108],"using stories","cli","quick reference","SET","how","projects","json","Rules","reference",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":37},"01M6CP36Y3D5S74HQQX62D6SMC","setup","Interactive onboarding that turns a repo into a story-workflow project — merge-mode choice, verification gates with test-runner detection, gitignore wiring, optional project-specific reviewer personas. Use when asked to \"set up the story workflow\", \"adopt stories\", \"story init\", \"install the story board\", or when stories:plan \u002F stories:work is wanted but .agents\u002Fshousper-stories\u002Fconfig.json does not exist yet. DO NOT TRIGGER when .agents\u002Fshousper-stories\u002Fconfig.json already exists (use stories:plan to file work, stories:work to execute it), for creating individual stories, or for project scaffolding unrelated to the story workflow.","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fstories\u002Fskills\u002Fsetup\u002FSKILL.md",[],[129,94,134,135,97,136,121,81,137,32,138,103,139,28,27,108,140,141,142,143],"test","init","file","reviewer","repo","interactive","personas","runner","gitignore","test-runner",{"skillNo":145,"name":100,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":37},"01M6CP33ZJE0SNZAK43Z5RGPDQ","Decomposes a spec or approved design into epics and stories on the story board — sized, dependency-ordered, gated, human-approved, then filed via the story CLI. Use in a project with .agents\u002Fshousper-stories\u002Fconfig.json when there is a design doc (often from kit:brainstorming), spec, requirements file, or feature request to break down; it replaces kit:writing-plans in the workflow chain for story-based projects. Also use for \"file stories\", \"break this into stories\", \"populate the board\". DO NOT TRIGGER in projects without .agents\u002Fshousper-stories\u002Fconfig.json (use kit:writing-plans), for executing stories (stories:work), or for filing a single discovered-work story mid-loop (plain story create).","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fstories\u002Fskills\u002Fplan\u002FSKILL.md",[],[100,74,71,119,150,94,95,151,152,136,99,123,124,153,32,154,28,155,108,156],"spec","brainstorming","create","design doc","board","dependency","gated",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":37},"01M6CP31SH1DH78VYHRKEW8HK7","cancel","Stops an active story loop and reports where the board stands. Use when asked to \"stop the loop\", \"cancel the story run\", \"halt autonomous story work\", \"kill the worker loop\", or when a runaway run must be shut down. DO NOT TRIGGER for closing a single story (that is story done inside stories:work), for deleting or archiving stories, or for removing the story workflow from a project.","https:\u002F\u002Fgithub.com\u002Fshousper\u002Fclanker-kit\u002Fblob\u002Fmain\u002Fshared\u002Fstories\u002Fskills\u002Fcancel\u002FSKILL.md",[],[159,94,96,99,32,154,164,28,165,166,107,167,108,23],"autonomous","reports","Story","kill"]