[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71QQHB2EQBFZGMF7P1GNV3V":3,"skill-same:01M71QQHB2EQBFZGMF7P1GNV3V":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":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M71QQHB2EQBFZGMF7P1GNV3V","method-worktree",null,"Creates an isolated git worktree for a new branch or an existing branch, PR, or commit, after checking for existing isolation. Use when analysis code needs isolated work.","sajor2000\u002Fmethodsmith","sajor2000","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F126191042?v=4","01M71QG4M3561SH49E3S7J3GKT","JC Rojas ","01M71QG4N56X2P61YTJSRP95VD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Fplugins\u002Fmethodsmith\u002Fskills\u002Fmethod-worktree\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"method worktree","worktree","branch","pr","for","new","use","Existing","when","analysis","code","commit","work","git worktree","git","isolation","2026-11-10 13:02:02",false,"---\nname: method-worktree\ndescription: \"Creates an isolated git worktree for a new branch or an existing branch, PR, or commit, after checking for existing isolation. Use when analysis code needs isolated work.\"\n---\n\n# Worktree Isolation\n\n## Skill Value\n\n- **Problem it solves:** Worktree creation can duplicate existing isolation or create host-invisible state.\n- **Use when:** The user or another workflow requests isolated branch or pull-request work.\n- **Output:** The existing or newly created isolated workspace path and branch or ref.\n- **Ask only if:** Isolation creation fails and continuing in the current checkout needs explicit approval.\n- **Do not do:** Do not nest worktrees, force duplicate branch checkouts, or silently fall back to the current checkout.\n- **Interaction:** Check isolation first. Ask one decision-changing question at a time; use the current harness's blocking question UI when available, otherwise present numbered choices and wait.\n\nEnsure the current work happens in an isolated workspace, without disturbing the user's main checkout. Many harnesses create a worktree at session start, so **check for existing isolation first** and do not create a redundant one.\n\nOrder of operations: **detect existing isolation -> prefer a native worktree tool -> fall back to plain git.** Never create a worktree the harness cannot see.\n\n**Two modes, set by the caller's need:**\n\n- **New work (default).** No specific ref named — create a fresh branch from a base (trunk). This is what `method-work` uses.\n- **Isolate an existing ref.** The caller names a ref to work on in isolation — a PR head, an existing branch, or a commit. Attach the worktree to that ref instead of creating a branch. A branch can be checked out in only one worktree at a time. If the ref is already checked out, report its path and let the caller work there or explicitly choose a detached worktree.\n\n## Step 0: Detect existing isolation\n\nCompare resolved absolute paths, because Git mixes relative and absolute output from subdirectories:\n\n```bash\ngit rev-parse --absolute-git-dir\n(cd \"$(git rev-parse --git-common-dir)\" && pwd -P)\n```\n\nIf the paths differ, distinguish a linked worktree from a submodule:\n\n```bash\ngit rev-parse --show-superproject-working-tree\n```\n\n- Non-empty output -> this is a submodule; continue to Step 1.\n- Empty output -> this is already an isolated worktree. If the caller requested new work or the current ref matches the requested existing ref, report its root and branch and work in place. If the caller requested a different existing ref, do not silently use the current checkout: inspect `git worktree list`, report an existing worktree for that ref when present, or request an explicit choice between switching to that path and creating an approved detached isolation. Never nest another worktree inside the current one.\n\n## Step 1: Prefer the harness's native worktree tool\n\nIf the harness provides a native worktree primitive, use it and stop. Native tools place, track, and clean up the worktree so the harness can manage it. A behind-the-back `git worktree add` creates state the harness cannot navigate to or clean up.\n\n## Step 2: Git fallback\n\nUse plain Git only when no native tool exists and Step 0 found no existing isolation.\n\n1. Run from the repository root: `cd \"$(git rev-parse --show-toplevel)\"`.\n2. Choose a meaningful branch name from the work description and determine the base branch from the remote default, falling back to `main`.\n3. Ensure `.worktrees\u002F` is ignored before creating anything. Check `git check-ignore -q .worktrees\u002F` with the trailing slash; add `.worktrees\u002F` to `.gitignore` only when needed.\n4. Best-effort fetch the base branch without changing the current checkout. A missing remote is non-fatal; use the local ref.\n5. Create the worktree according to the caller's mode:\n   - New work: `git worktree add -b \u003Cbranch-name> .worktrees\u002F\u003Cbranch-name> origin\u002F\u003Cfrom-branch>`; use the local base when the remote ref does not exist.\n   - Existing branch, tag, or commit: `git worktree add .worktrees\u002F\u003Cslug> \u003Ctarget-ref>`.\n   - PR: create a local branch first with `git fetch origin pull\u002F\u003Cn>\u002Fhead:pr-\u003Cn>`, then run `git worktree add .worktrees\u002Fpr-\u003Cn> pr-\u003Cn>`. Never leave a PR worktree detached if the caller intends to commit fixes.\n6. Switch into the new worktree.\n\nIf creation fails because of sandbox or permission restrictions, stop and request a blocking user decision through the current harness's standard interaction mechanism before touching the current checkout. If no blocking interaction mechanism exists or it errors, present numbered options and wait. Continue in the current checkout only with explicit confirmation.\n\n## Other worktree operations\n\nUse Git directly:\n\n```bash\ngit worktree list\ngit worktree remove .worktrees\u002F\u003Cbranch>\ncd .worktrees\u002F\u003Cbranch>\ncd \"$(git rev-parse --show-toplevel)\"\n```\n\n## When to create a worktree\n\nCreate one only when the current checkout is not already isolated and a separate workspace is useful for PR review or parallel work. Do not create one for a single task that can happen safely on a feature branch.\n\n## Integration\n\nWhen `method-work` or `method-review` selects this skill, run Step 0 first. Proceed in place when already isolated; otherwise prefer native isolation and use a meaningful branch name.\n\n## Troubleshooting\n\n**Worktree already exists:** switch to its reported path or remove it before recreating it.\n\n**Cannot remove the current worktree:** change to another checkout before running `git worktree remove`.\n","# Worktree Isolation\n\n## Skill Value\n\n- **Problem it solves:** Worktree creation can duplicate existing isolation or create host-invisible state.\n- **Use when:** The user or another workflow requests isolated branch or pull-request work.\n- **Output:** The existing or newly created isolated workspace path and branch or ref.\n- **Ask only if:** Isolation creation fails and continuing in the current checkout needs explicit approval.\n- **Do not do:** Do not nest worktrees, force duplicate branch checkouts, or silently fall back to the current checkout.\n- **Interaction:** Check isolation first. Ask one decision-changing question at a time; use the current harness's blocking question UI when available, otherwise present numbered choices and wait.\n\nEnsure the current work happens in an isolated workspace, without disturbing the user's main checkout. Many harnesses create a worktree at session start, so **check for existing isolation first** and do not create a redundant one.\n\nOrder of operations: **detect existing isolation -> prefer a native worktree tool -> fall back to plain git.** Never create a worktree the harness cannot see.\n\n**Two modes, set by the caller's need:**\n\n- **New work (default).** No specific ref named — create a fresh branch from a base (trunk). This is what `method-work` uses.\n- **Isolate an existing ref.** The caller names a ref to work on in isolation — a PR head, an existing branch, or a commit. Attach the worktree to that ref instead of creating a branch. A branch can be checked out in only one worktree at a time. If the ref is already checked out, report its path and let the caller work there or explicitly choose a detached worktree.\n\n## Step 0: Detect existing isolation\n\nCompare resolved absolute paths, because Git mixes relative and absolute output from subdirectories:\n\n```bash\ngit rev-parse --absolute-git-dir\n(cd \"$(git rev-parse --git-common-dir)\" && pwd -P)\n```\n\nIf the paths differ, distinguish a linked worktree from a submodule:\n\n```bash\ngit rev-parse --show-superproject-working-tree\n```\n\n- Non-empty output -> this is a submodule; continue to Step 1.\n- Empty output -> this is already an isolated worktree. If the caller requested new work or the current ref matches the requested existing ref, report its root and branch and work in place. If the caller requested a different existing ref, do not silently use the current checkout: inspect `git worktree list`, report an existing worktree for that ref when present, or request an explicit choice between switching to that path and creating an approved detached isolation. Never nest another worktree inside the current one.\n\n## Step 1: Prefer the harness's native worktree tool\n\nIf the harness provides a native worktree primitive, use it and stop. Native tools place, track, and clean up the worktree so the harness can manage it. A behind-the-back `git worktree add` creates state the harness cannot navigate to or clean up.\n\n## Step 2: Git fallback\n\nUse plain Git only when no native tool exists and Step 0 found no existing isolation.\n\n1. Run from the repository root: `cd \"$(git rev-parse --show-toplevel)\"`.\n2. Choose a meaningful branch name from the work description and determine the base branch from the remote default, falling back to `main`.\n3. Ensure `.worktrees\u002F` is ignored before creating anything. Check `git check-ignore -q .worktrees\u002F` with the trailing slash; add `.worktrees\u002F` to `.gitignore` only when needed.\n4. Best-effort fetch the base branch without changing the current checkout. A missing remote is non-fatal; use the local ref.\n5. Create the worktree according to the caller's mode:\n   - New work: `git worktree add -b \u003Cbranch-name> .worktrees\u002F\u003Cbranch-name> origin\u002F\u003Cfrom-branch>`; use the local base when the remote ref does not exist.\n   - Existing branch, tag, or commit: `git worktree add .worktrees\u002F\u003Cslug> \u003Ctarget-ref>`.\n   - PR: create a local branch first with `git fetch origin pull\u002F\u003Cn>\u002Fhead:pr-\u003Cn>`, then run `git worktree add .worktrees\u002Fpr-\u003Cn> pr-\u003Cn>`. Never leave a PR worktree detached if the caller intends to commit fixes.\n6. Switch into the new worktree.\n\nIf creation fails because of sandbox or permission restrictions, stop and request a blocking user decision through the current harness's standard interaction mechanism before touching the current checkout. If no blocking interaction mechanism exists or it errors, present numbered options and wait. Continue in the current checkout only with explicit confirmation.\n\n## Other worktree operations\n\nUse Git directly:\n\n```bash\ngit worktree list\ngit worktree remove .worktrees\u002F\u003Cbranch>\ncd .worktrees\u002F\u003Cbranch>\ncd \"$(git rev-parse --show-toplevel)\"\n```\n\n## When to create a worktree\n\nCreate one only when the current checkout is not already isolated and a separate workspace is useful for PR review or parallel work. Do not create one for a single task that can happen safely on a feature branch.\n\n## Integration\n\nWhen `method-work` or `method-review` selects this skill, run Step 0 first. Proceed in place when already isolated; otherwise prefer native isolation and use a meaningful branch name.\n\n## Troubleshooting\n\n**Worktree already exists:** switch to its reported path or remove it before recreating it.\n\n**Cannot remove the current worktree:** change to another checkout before running `git worktree remove`.\n",{"name":5,"description":7},"main","893bccb980e4dce1345919e9f675f5a9dcbed364","plugins\u002Fmethodsmith\u002Fskills\u002Fmethod-worktree",0,"https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith","https:\u002F\u002Fsajor2000.github.io\u002Fmethodsmith\u002F","https:\u002F\u002Fgithub.com\u002Fsajor2000","Critical care physician-scientist at Rush University. @Common-Longitudinal-ICU-data-Format contributor building open ICU data tools & clinical AI","2026-11-01 01:56:01",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add sajor2000\u002Fmethodsmith --skill method-worktree",{"tool":55,"command":56},"bunx","bunx skills add sajor2000\u002Fmethodsmith --skill method-worktree",{"tool":58,"command":59},"pnpm","pnpm dlx skills add sajor2000\u002Fmethodsmith --skill method-worktree","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Fplugins\u002Fmethodsmith\u002Fskills\u002Fmethod-worktree\u002FSKILL.md",true,[],[64,75,88,98,106,114],{"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":35},"01M71QQY0KE1184AF58EC1J5C1","skill-one","Sample skill","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[71,72,73,74],"one","skill one","sample","sample skill",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":35},"01M71QQW3PNK9AYB5HBMAPM72J","disabled-skill","A skill with model invocation disabled","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fdisabled-skill\u002FSKILL.md",[],[82,83,84,85,86,87],"disabled skill","a skill","with model","with","true","model",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":35},"01M71QQSY02X7DNZQRAGJ6YFGY","claude-only-skill","A skill restricted to Claude Code only","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fclaude-only-skill\u002FSKILL.md",[],[95,96,97,83,29],"claude only","claude only skill","only",{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":35},"01M71QQRPZ76X623V5P7T1E3DD","default-skill","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fskills\u002Fdefault-skill\u002FSKILL.md",[],[104,105],"default","default skill",{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":35},"01M71QQQG3FF2HFQHVH8VHA08R","custom-skill","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fcustom-skills\u002Fcustom-skill\u002FSKILL.md",[],[112,113],"custom skill","custom",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":35},"01M71QQMBNC76141GHXBSMENSH","method-write","Drafts, revises, and audits evidence-bound manuscripts, sections, abstracts, and reviewer responses with claim provenance. Use when scientific prose must be written or revised (entry point).","https:\u002F\u002Fgithub.com\u002Fsajor2000\u002Fmethodsmith\u002Fblob\u002Fmain\u002Fplugins\u002Fmethodsmith\u002Fskills\u002Fmethod-write\u002FSKILL.md",[],[121,122,123,124,125,126,25,27,127,128,85,129,130,131],"write","method write","point","evidence","entry","claim","provenance","reviewer","scientific","prose","drafts"]