[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C3C1EBYXRVMNHZZE9N49PN":3,"skill-same:01M6C3C1EBYXRVMNHZZE9N49PN":57},{"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":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6C3C1EBYXRVMNHZZE9N49PN","using-git-worktrees",null,"Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","IgorGanapolsky\u002FRandom-Timer","IgorGanapolsky","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F201209?v=4","01M6C2WB7720K13ERYVB3AJ0SQ","Igor Ganapolsky","01M6C2WBBF0NWVQV4A89FS00Q5",1,"MIT","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27],"using git worktrees","git","git worktrees","worktree","Tools","git worktree","workspace","work","use","2026-11-10 10:12:30",false,"---\nname: using-git-worktrees\ndescription: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback\n---\n\n# Using Git Worktrees\n\n## Overview\n\nEnsure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.\n\n**Core principle:** Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.\n\n**Announce at start:** \"I'm using the using-git-worktrees skill to set up an isolated workspace.\"\n\n## Step 0: Detect Existing Isolation\n\n**Before creating anything, check if you are already in an isolated workspace.**\n\n```bash\nGIT_DIR=$(cd \"$(git rev-parse --git-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nGIT_COMMON=$(cd \"$(git rev-parse --git-common-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nBRANCH=$(git branch --show-current)\n```\n\n**Submodule guard:** `GIT_DIR != GIT_COMMON` is also true inside git submodules. Before concluding \"already in a worktree,\" verify you are not in a submodule:\n\n```bash\n# If this returns a path, you're in a submodule, not a worktree — treat as normal repo\ngit rev-parse --show-superproject-working-tree 2>\u002Fdev\u002Fnull\n```\n\n**If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 2 (Project Setup). Do NOT create another worktree.\n\nReport with branch state:\n- On a branch: \"Already in isolated workspace at `\u003Cpath>` on branch `\u003Cname>`.\"\n- Detached HEAD: \"Already in isolated workspace at `\u003Cpath>` (detached HEAD, externally managed). Branch creation needed at finish time.\"\n\n**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout.\n\nHas the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:\n\n> \"Would you like me to set up an isolated worktree? It protects your current branch from changes.\"\n\nHonor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 2.\n\n## Step 1: Create Isolated Workspace\n\n**You have two mechanisms. Try them in this order.**\n\n### 1a. Native Worktree Tools (preferred)\n\nThe user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `\u002Fworktree` command, or a `--worktree` flag. If you do, use it and skip to Step 2.\n\nNative tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.\n\nOnly proceed to Step 1b if you have no native worktree tool available.\n\n### 1b. Git Worktree Fallback\n\n**Only use this if Step 1a does not apply** — you have no native worktree tool available. Create a worktree manually using git.\n\n#### Directory Selection\n\nFollow this priority order. Explicit user preference always beats observed filesystem state.\n\n1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.\n\n2. **Check for an existing project-local worktree directory:**\n   ```bash\n   ls -d .worktrees 2>\u002Fdev\u002Fnull     # Preferred (hidden)\n   ls -d worktrees 2>\u002Fdev\u002Fnull      # Alternative\n   ```\n   If found, use it. If both exist, `.worktrees` wins.\n\n3. **If there is no other guidance available**, default to `.worktrees\u002F` at the project root.\n\n#### Safety Verification (project-local directories only)\n\n**MUST verify directory is ignored before creating worktree:**\n\n```bash\ngit check-ignore -q .worktrees 2>\u002Fdev\u002Fnull || git check-ignore -q worktrees 2>\u002Fdev\u002Fnull\n```\n\n**If NOT ignored:** Add to .gitignore, commit the change, then proceed.\n\n**Why critical:** Prevents accidentally committing worktree contents to repository.\n\n#### Create the Worktree\n\n```bash\n# Determine path based on chosen location\npath=\"$LOCATION\u002F$BRANCH_NAME\"\n\ngit worktree add \"$path\" -b \"$BRANCH_NAME\"\ncd \"$path\"\n```\n\n**Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.\n\n## Step 2: Project Setup\n\nAuto-detect and run appropriate setup:\n\n```bash\n# Node.js\nif [ -f package.json ]; then npm install; fi\n\n# Rust\nif [ -f Cargo.toml ]; then cargo build; fi\n\n# Python\nif [ -f requirements.txt ]; then pip install -r requirements.txt; fi\nif [ -f pyproject.toml ]; then poetry install; fi\n\n# Go\nif [ -f go.mod ]; then go mod download; fi\n```\n\n## Step 3: Verify Clean Baseline\n\nRun tests to ensure workspace starts clean:\n\n```bash\n# Use project-appropriate command\nnpm test \u002F cargo test \u002F pytest \u002F go test .\u002F...\n```\n\n**If tests fail:** Report failures, ask whether to proceed or investigate.\n\n**If tests pass:** Report ready.\n\n### Report\n\n```\nWorktree ready at \u003Cfull-path>\nTests passing (\u003CN> tests, 0 failures)\nReady to implement \u003Cfeature-name>\n```\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\n| Already in linked worktree | Skip creation (Step 0) |\n| In a submodule | Treat as normal repo (Step 0 guard) |\n| Native worktree tool available | Use it (Step 1a) |\n| No native tool | Git worktree fallback (Step 1b) |\n| `.worktrees\u002F` exists | Use it (verify ignored) |\n| `worktrees\u002F` exists | Use it (verify ignored) |\n| Both exist | Use `.worktrees\u002F` |\n| Neither exists | Check instruction file, then default `.worktrees\u002F` |\n| Directory not ignored | Add to .gitignore + commit |\n| Permission error on create | Sandbox fallback, work in place |\n| Tests fail during baseline | Report failures + ask |\n| No package.json\u002FCargo.toml | Skip dependency install |\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"I'm obviously not in a worktree — no need to check\" | Run Step 0. Harness-created isolation and submodules both fool eyeballing; the detection commands settle it. |\n| \"`git worktree add` is quicker than hunting for a native tool\" | A native tool (e.g. `EnterWorktree`) owns placement, branching, and cleanup. Bypassing it is the #1 mistake — it creates phantom state your harness can't see or manage. |\n| \"The worktree directory is surely ignored already\" | Run `git check-ignore`. An unignored worktree directory commits the whole tree into the repo. |\n| \"Any directory name works\" | Explicit instructions beat an existing project-local directory, which beats the `.worktrees\u002F` default. |\n| \"The workspace is fresh — baseline tests can wait\" | A dirty baseline makes every later failure ambiguous. Run the tests now; proceeding past failures is your human partner's call. |\n","# Using Git Worktrees\n\n## Overview\n\nEnsure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.\n\n**Core principle:** Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.\n\n**Announce at start:** \"I'm using the using-git-worktrees skill to set up an isolated workspace.\"\n\n## Step 0: Detect Existing Isolation\n\n**Before creating anything, check if you are already in an isolated workspace.**\n\n```bash\nGIT_DIR=$(cd \"$(git rev-parse --git-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nGIT_COMMON=$(cd \"$(git rev-parse --git-common-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nBRANCH=$(git branch --show-current)\n```\n\n**Submodule guard:** `GIT_DIR != GIT_COMMON` is also true inside git submodules. Before concluding \"already in a worktree,\" verify you are not in a submodule:\n\n```bash\n# If this returns a path, you're in a submodule, not a worktree — treat as normal repo\ngit rev-parse --show-superproject-working-tree 2>\u002Fdev\u002Fnull\n```\n\n**If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 2 (Project Setup). Do NOT create another worktree.\n\nReport with branch state:\n- On a branch: \"Already in isolated workspace at `\u003Cpath>` on branch `\u003Cname>`.\"\n- Detached HEAD: \"Already in isolated workspace at `\u003Cpath>` (detached HEAD, externally managed). Branch creation needed at finish time.\"\n\n**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout.\n\nHas the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:\n\n> \"Would you like me to set up an isolated worktree? It protects your current branch from changes.\"\n\nHonor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 2.\n\n## Step 1: Create Isolated Workspace\n\n**You have two mechanisms. Try them in this order.**\n\n### 1a. Native Worktree Tools (preferred)\n\nThe user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `\u002Fworktree` command, or a `--worktree` flag. If you do, use it and skip to Step 2.\n\nNative tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.\n\nOnly proceed to Step 1b if you have no native worktree tool available.\n\n### 1b. Git Worktree Fallback\n\n**Only use this if Step 1a does not apply** — you have no native worktree tool available. Create a worktree manually using git.\n\n#### Directory Selection\n\nFollow this priority order. Explicit user preference always beats observed filesystem state.\n\n1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.\n\n2. **Check for an existing project-local worktree directory:**\n   ```bash\n   ls -d .worktrees 2>\u002Fdev\u002Fnull     # Preferred (hidden)\n   ls -d worktrees 2>\u002Fdev\u002Fnull      # Alternative\n   ```\n   If found, use it. If both exist, `.worktrees` wins.\n\n3. **If there is no other guidance available**, default to `.worktrees\u002F` at the project root.\n\n#### Safety Verification (project-local directories only)\n\n**MUST verify directory is ignored before creating worktree:**\n\n```bash\ngit check-ignore -q .worktrees 2>\u002Fdev\u002Fnull || git check-ignore -q worktrees 2>\u002Fdev\u002Fnull\n```\n\n**If NOT ignored:** Add to .gitignore, commit the change, then proceed.\n\n**Why critical:** Prevents accidentally committing worktree contents to repository.\n\n#### Create the Worktree\n\n```bash\n# Determine path based on chosen location\npath=\"$LOCATION\u002F$BRANCH_NAME\"\n\ngit worktree add \"$path\" -b \"$BRANCH_NAME\"\ncd \"$path\"\n```\n\n**Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.\n\n## Step 2: Project Setup\n\nAuto-detect and run appropriate setup:\n\n```bash\n# Node.js\nif [ -f package.json ]; then npm install; fi\n\n# Rust\nif [ -f Cargo.toml ]; then cargo build; fi\n\n# Python\nif [ -f requirements.txt ]; then pip install -r requirements.txt; fi\nif [ -f pyproject.toml ]; then poetry install; fi\n\n# Go\nif [ -f go.mod ]; then go mod download; fi\n```\n\n## Step 3: Verify Clean Baseline\n\nRun tests to ensure workspace starts clean:\n\n```bash\n# Use project-appropriate command\nnpm test \u002F cargo test \u002F pytest \u002F go test .\u002F...\n```\n\n**If tests fail:** Report failures, ask whether to proceed or investigate.\n\n**If tests pass:** Report ready.\n\n### Report\n\n```\nWorktree ready at \u003Cfull-path>\nTests passing (\u003CN> tests, 0 failures)\nReady to implement \u003Cfeature-name>\n```\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\n| Already in linked worktree | Skip creation (Step 0) |\n| In a submodule | Treat as normal repo (Step 0 guard) |\n| Native worktree tool available | Use it (Step 1a) |\n| No native tool | Git worktree fallback (Step 1b) |\n| `.worktrees\u002F` exists | Use it (verify ignored) |\n| `worktrees\u002F` exists | Use it (verify ignored) |\n| Both exist | Use `.worktrees\u002F` |\n| Neither exists | Check instruction file, then default `.worktrees\u002F` |\n| Directory not ignored | Add to .gitignore + commit |\n| Permission error on create | Sandbox fallback, work in place |\n| Tests fail during baseline | Report failures + ask |\n| No package.json\u002FCargo.toml | Skip dependency install |\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"I'm obviously not in a worktree — no need to check\" | Run Step 0. Harness-created isolation and submodules both fool eyeballing; the detection commands settle it. |\n| \"`git worktree add` is quicker than hunting for a native tool\" | A native tool (e.g. `EnterWorktree`) owns placement, branching, and cleanup. Bypassing it is the #1 mistake — it creates phantom state your harness can't see or manage. |\n| \"The worktree directory is surely ignored already\" | Run `git check-ignore`. An unignored worktree directory commits the whole tree into the repo. |\n| \"Any directory name works\" | Explicit instructions beat an existing project-local directory, which beats the `.worktrees\u002F` default. |\n| \"The workspace is fresh — baseline tests can wait\" | A dirty baseline makes every later failure ambiguous. Run the tests now; proceeding past failures is your human partner's call. |\n",{"name":5,"description":7},"develop","4af946ac9a2b3cfbbe9b2e8696cc436f1d16e2e2",".cursor\u002Fskills\u002Fusing-git-worktrees",0,"https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer","https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Frandom-tactical-timer\u002Fid6758355312","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky","https:\u002F\u002Fwww.igorganapolsky.com","Forward Deploy AI Engineer. Automation specialist.\r\n","2026-11-09 23:14:20",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add IgorGanapolsky\u002FRandom-Timer --skill using-git-worktrees",{"tool":49,"command":50},"bunx","bunx skills add IgorGanapolsky\u002FRandom-Timer --skill using-git-worktrees",{"tool":52,"command":53},"pnpm","pnpm dlx skills add IgorGanapolsky\u002FRandom-Timer --skill using-git-worktrees","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",true,[],[58,79,98,108,120,131],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":74,"publishedAt":28},"01M6C3CEGAENG02BPG636N9WG6","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[64,69],{"categoryNo":65,"categoryName":66,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[75,76,77,78,27],"writing","writing plans","spec","code",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":88,"publishedAt":28},"01M6C3CC40GJBTJQHQ5BF7CQN9","workflow-economics-lite","Escape AI pilot purgatory: require completion-loop workflows with one owner, baseline, economic metric, system-of-record integration, and audit trail. Block orphan chatbots and interest-as-ROI claims.","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fworkflow-economics-lite\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000023","Skill与智能体开发",[89,90,91,92,93,94,95,96,97],"workflow","workflow economics lite","system","loop","baseline","integration","audit","workflows","roi",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":28},"01M6C3C9ESBW612NMMMBQDWSWR","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[105,106,107,27,26],"verification before completion","verification","evidence",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":28},"01M6C3C71DNQHJ6PGV0TN1R99N","value-center-lite","Apply InfoQ Rohrer value-center \u002F VSM five questions (agency + coherence). Use when planning work, shipping releases, or auditing agent autonomy claims. Fail closed on product-only slogans without WQTU\u002Fpaywall value.","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fvalue-center-lite\u002FSKILL.md",[],[115,116,27,26,117,118,119],"value center lite","only","product","shipping","planning",{"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":28},"01M6C3C41Q0R2J49F3Q4CQ004J","using-superpowers","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-superpowers\u002FSKILL.md",[],[127,128,27,129,130],"superpowers","using superpowers","find","how",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":28},"01M6C3BZ3XGB33Y6KXRCH1K8AJ","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Funslop\u002FSKILL.md",[],[133,75]]