[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M754QNSXZ4PANTWCMX7R7DEB":3,"skill-same:01M754QNSXZ4PANTWCMX7R7DEB":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M754QNSXZ4PANTWCMX7R7DEB","codex-git-worktrees",null,"Use when implementation needs isolation from the current workspace; creates git worktrees with safe directory selection and baseline verification.","Bang-isme\u002FAgencyCLI","Bang-isme","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179383529?v=4","01M754NDM8K05SAX2V31R63WEE","01M754NDMV48ECFT4HY6X2CKQ0",2,"MIT","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Fskills\u002Fcodex-git-worktrees\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: codex-git-worktrees\ndescription: Use when implementation needs isolation from the current workspace; creates git worktrees with safe directory selection and baseline verification.\nload_priority: on-demand\n---\n\n## TL;DR\nCreate isolated workspace: detect directory → verify gitignored → create worktree → install deps → verify tests pass. Use `$worktree` or `$isolate` to activate. Pairs with `$finish` for cleanup.\n\n# Git Worktrees\n\n## Activation\n\n1. Activate on `$codex-git-worktrees`, `$worktree`, or `$isolate`.\n2. Activate before executing implementation plans that need isolation.\n3. Activate when `codex-subagent-execution` starts (recommended prereq).\n4. Activate when user asks for parallel development branches.\n\n**Announce at start:** \"I'm using codex-git-worktrees to set up an isolated workspace.\"\n\n## Directory Selection Process\n\nFollow this priority order:\n\n### 1. Check Existing Directories\n\n```bash\n# Check in priority order (cross-platform)\nls -d .worktrees 2>\u002Fdev\u002Fnull     # Preferred (hidden)\nls -d worktrees 2>\u002Fdev\u002Fnull      # Alternative\n\n# PowerShell (Windows)\nTest-Path .worktrees\nTest-Path worktrees\n```\n\n**If found:** Use that directory. If both exist, `.worktrees` wins.\n\n### 2. Check Project Config\n\n```bash\n# Check .codex\u002Fcontext\u002Fgenome.md or project README for worktree preferences\ngrep -i \"worktree\" .codex\u002Fcontext\u002Fgenome.md 2>\u002Fdev\u002Fnull\n```\n\n**If preference specified:** Use it without asking.\n\n### 3. Ask User\n\nIf no directory exists and no config preference:\n\n```\nNo worktree directory found. Where should I create worktrees?\n\n1. .worktrees\u002F (project-local, hidden)\n2. worktrees\u002F (project-local, visible)\n\nWhich would you prefer?\n```\n\n## Safety Verification\n\n### For Project-Local Directories\n\n**MUST verify directory is ignored before creating worktree:**\n\n```bash\n# Bash\u002FmacOS\u002FLinux\ngit check-ignore -q .worktrees 2>\u002Fdev\u002Fnull\necho $?  # 0 = ignored (safe), 1 = NOT ignored (fix needed)\n```\n\n```powershell\n# PowerShell (Windows)\ngit check-ignore -q .worktrees 2>$null\n$LASTEXITCODE  # 0 = ignored (safe), 1 = NOT ignored (fix needed)\n```\n\n**If NOT ignored:**\n\nFix immediately:\n1. Add to `.gitignore`\n2. Commit the change\n3. Proceed with worktree creation\n\n```bash\n# Bash\necho \".worktrees\u002F\" >> .gitignore\ngit add .gitignore\ngit commit -m \"chore: add .worktrees to gitignore\"\n```\n\n```powershell\n# PowerShell\nAdd-Content .gitignore \".worktrees\u002F\"\ngit add .gitignore\ngit commit -m \"chore: add .worktrees to gitignore\"\n```\n\n**Why critical:** Prevents accidentally committing worktree contents to repository.\n\n## Creation Steps\n\n### 1. Detect Project\n\n```bash\n# Bash\nproject=$(basename \"$(git rev-parse --show-toplevel)\")\necho \"Project: $project\"\n```\n\n```powershell\n# PowerShell\n$project = Split-Path (git rev-parse --show-toplevel) -Leaf\nWrite-Output \"Project: $project\"\n```\n\n### 2. Create Worktree\n\n```bash\n# Create worktree with new branch\ngit worktree add \".worktrees\u002F$BRANCH_NAME\" -b \"$BRANCH_NAME\"\ncd \".worktrees\u002F$BRANCH_NAME\"\n```\n\n### 3. Run 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# Python\nif [ -f requirements.txt ]; then pip install -r requirements.txt; fi\nif [ -f pyproject.toml ]; then pip install -e .; fi\n```\n\n```powershell\n# PowerShell equivalents\nif (Test-Path package.json) { npm install }\nif (Test-Path requirements.txt) { pip install -r requirements.txt }\nif (Test-Path pyproject.toml) { pip install -e . }\nif (Test-Path Cargo.toml) { cargo build }\nif (Test-Path go.mod) { go mod download }\nif (Test-Path *.csproj) { dotnet restore }\n```\n\n### 4. Verify Clean Baseline\n\nRun tests to ensure worktree starts clean:\n\n```bash\n# Use project-appropriate command\nnpm test \u002F python -m pytest \u002F cargo test \u002F go test .\u002F...\n```\n\n**If tests fail:** Report failures, ask whether to proceed or investigate.\n**If tests pass:** Report ready.\n\n### 5. Report Location\n\n```\nWorktree ready at \u003Cfull-path>\nBranch: \u003Cbranch-name>\nTests passing (\u003CN> tests, 0 failures)\nReady to implement \u003Cfeature-name>\n```\n\n## Finishing a Branch\n\nWhen work is complete, present options:\n\n```\nImplementation complete. What would you like to do?\n\n1. Merge back to \u003Cbase-branch> locally\n2. Push and create a Pull Request\n3. Keep the branch as-is (I'll handle it later)\n4. Discard this work\n```\n\n### Option 1: Merge Locally\n```bash\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n# Verify tests\ngit branch -d \u003Cfeature-branch>\ngit worktree remove \u003Cworktree-path>\n```\n\n### Option 2: Push and Create PR\n```bash\ngit push -u origin \u003Cfeature-branch>\n# Create PR via gh\u002Fgit platform\n```\nKeep worktree for follow-up work.\n\n### Option 3: Keep As-Is\nReport: \"Branch preserved at \u003Cpath>.\"\n\n### Option 4: Discard\n**Confirm first** with typed confirmation.\n```bash\ngit checkout \u003Cbase-branch>\ngit branch -D \u003Cfeature-branch>\ngit worktree remove \u003Cworktree-path>\n```\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\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 config → Ask user |\n| Directory not ignored | Add to .gitignore + commit |\n| Tests fail during baseline | Report failures + ask |\n| No package.json\u002FCargo.toml | Skip dependency install |\n\n## Common Mistakes\n\n| Mistake | Problem | Fix |\n|---------|---------|-----|\n| Skip ignore verification | Worktree tracked in git | Always `git check-ignore` first |\n| Assume directory location | Inconsistency with project | Follow priority: existing > config > ask |\n| Proceed with failing tests | Can't distinguish new vs old bugs | Report failures, get permission |\n| Hardcode setup commands | Breaks on different projects | Auto-detect from project files |\n| No test baseline | Don't know if worktree is clean | Always run tests after setup |\n\n## Red Flags — Never Do\n\n- Create worktree without verifying it's ignored (project-local)\n- Skip baseline test verification\n- Proceed with failing tests without asking\n- Assume directory location when ambiguous\n- Skip git config check\n\n## CodexAI Integration\n\n### With Subagent Execution\n```\n$worktree → create isolated branch → $sdd → execute plan → $finish\n```\n\n### With Git Autopilot\n```bash\n# Auto-commit within worktree\npython codex-git-autopilot\u002Fscripts\u002Fauto_commit.py --project-root \u003Cworktree-path>\n```\n\n### With Quality Gate\n```bash\n# Verify before merging back\npython codex-execution-quality-gate\u002Fscripts\u002Fauto_gate.py --mode full --project-root \u003Cworktree-path>\n```\n\n## Related Skills\n\n- **`codex-subagent-execution`** — Execute plan tasks within isolated worktree\n- **`codex-git-autopilot`** — Commit automation within worktree\n- **`codex-execution-quality-gate`** — Verify before merge\u002FPR\n- **`codex-plan-writer`** — Creates the plan to execute in worktree\n","## TL;DR\nCreate isolated workspace: detect directory → verify gitignored → create worktree → install deps → verify tests pass. Use `$worktree` or `$isolate` to activate. Pairs with `$finish` for cleanup.\n\n# Git Worktrees\n\n## Activation\n\n1. Activate on `$codex-git-worktrees`, `$worktree`, or `$isolate`.\n2. Activate before executing implementation plans that need isolation.\n3. Activate when `codex-subagent-execution` starts (recommended prereq).\n4. Activate when user asks for parallel development branches.\n\n**Announce at start:** \"I'm using codex-git-worktrees to set up an isolated workspace.\"\n\n## Directory Selection Process\n\nFollow this priority order:\n\n### 1. Check Existing Directories\n\n```bash\n# Check in priority order (cross-platform)\nls -d .worktrees 2>\u002Fdev\u002Fnull     # Preferred (hidden)\nls -d worktrees 2>\u002Fdev\u002Fnull      # Alternative\n\n# PowerShell (Windows)\nTest-Path .worktrees\nTest-Path worktrees\n```\n\n**If found:** Use that directory. If both exist, `.worktrees` wins.\n\n### 2. Check Project Config\n\n```bash\n# Check .codex\u002Fcontext\u002Fgenome.md or project README for worktree preferences\ngrep -i \"worktree\" .codex\u002Fcontext\u002Fgenome.md 2>\u002Fdev\u002Fnull\n```\n\n**If preference specified:** Use it without asking.\n\n### 3. Ask User\n\nIf no directory exists and no config preference:\n\n```\nNo worktree directory found. Where should I create worktrees?\n\n1. .worktrees\u002F (project-local, hidden)\n2. worktrees\u002F (project-local, visible)\n\nWhich would you prefer?\n```\n\n## Safety Verification\n\n### For Project-Local Directories\n\n**MUST verify directory is ignored before creating worktree:**\n\n```bash\n# Bash\u002FmacOS\u002FLinux\ngit check-ignore -q .worktrees 2>\u002Fdev\u002Fnull\necho $?  # 0 = ignored (safe), 1 = NOT ignored (fix needed)\n```\n\n```powershell\n# PowerShell (Windows)\ngit check-ignore -q .worktrees 2>$null\n$LASTEXITCODE  # 0 = ignored (safe), 1 = NOT ignored (fix needed)\n```\n\n**If NOT ignored:**\n\nFix immediately:\n1. Add to `.gitignore`\n2. Commit the change\n3. Proceed with worktree creation\n\n```bash\n# Bash\necho \".worktrees\u002F\" >> .gitignore\ngit add .gitignore\ngit commit -m \"chore: add .worktrees to gitignore\"\n```\n\n```powershell\n# PowerShell\nAdd-Content .gitignore \".worktrees\u002F\"\ngit add .gitignore\ngit commit -m \"chore: add .worktrees to gitignore\"\n```\n\n**Why critical:** Prevents accidentally committing worktree contents to repository.\n\n## Creation Steps\n\n### 1. Detect Project\n\n```bash\n# Bash\nproject=$(basename \"$(git rev-parse --show-toplevel)\")\necho \"Project: $project\"\n```\n\n```powershell\n# PowerShell\n$project = Split-Path (git rev-parse --show-toplevel) -Leaf\nWrite-Output \"Project: $project\"\n```\n\n### 2. Create Worktree\n\n```bash\n# Create worktree with new branch\ngit worktree add \".worktrees\u002F$BRANCH_NAME\" -b \"$BRANCH_NAME\"\ncd \".worktrees\u002F$BRANCH_NAME\"\n```\n\n### 3. Run 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# Python\nif [ -f requirements.txt ]; then pip install -r requirements.txt; fi\nif [ -f pyproject.toml ]; then pip install -e .; fi\n```\n\n```powershell\n# PowerShell equivalents\nif (Test-Path package.json) { npm install }\nif (Test-Path requirements.txt) { pip install -r requirements.txt }\nif (Test-Path pyproject.toml) { pip install -e . }\nif (Test-Path Cargo.toml) { cargo build }\nif (Test-Path go.mod) { go mod download }\nif (Test-Path *.csproj) { dotnet restore }\n```\n\n### 4. Verify Clean Baseline\n\nRun tests to ensure worktree starts clean:\n\n```bash\n# Use project-appropriate command\nnpm test \u002F python -m pytest \u002F cargo test \u002F go test .\u002F...\n```\n\n**If tests fail:** Report failures, ask whether to proceed or investigate.\n**If tests pass:** Report ready.\n\n### 5. Report Location\n\n```\nWorktree ready at \u003Cfull-path>\nBranch: \u003Cbranch-name>\nTests passing (\u003CN> tests, 0 failures)\nReady to implement \u003Cfeature-name>\n```\n\n## Finishing a Branch\n\nWhen work is complete, present options:\n\n```\nImplementation complete. What would you like to do?\n\n1. Merge back to \u003Cbase-branch> locally\n2. Push and create a Pull Request\n3. Keep the branch as-is (I'll handle it later)\n4. Discard this work\n```\n\n### Option 1: Merge Locally\n```bash\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n# Verify tests\ngit branch -d \u003Cfeature-branch>\ngit worktree remove \u003Cworktree-path>\n```\n\n### Option 2: Push and Create PR\n```bash\ngit push -u origin \u003Cfeature-branch>\n# Create PR via gh\u002Fgit platform\n```\nKeep worktree for follow-up work.\n\n### Option 3: Keep As-Is\nReport: \"Branch preserved at \u003Cpath>.\"\n\n### Option 4: Discard\n**Confirm first** with typed confirmation.\n```bash\ngit checkout \u003Cbase-branch>\ngit branch -D \u003Cfeature-branch>\ngit worktree remove \u003Cworktree-path>\n```\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\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 config → Ask user |\n| Directory not ignored | Add to .gitignore + commit |\n| Tests fail during baseline | Report failures + ask |\n| No package.json\u002FCargo.toml | Skip dependency install |\n\n## Common Mistakes\n\n| Mistake | Problem | Fix |\n|---------|---------|-----|\n| Skip ignore verification | Worktree tracked in git | Always `git check-ignore` first |\n| Assume directory location | Inconsistency with project | Follow priority: existing > config > ask |\n| Proceed with failing tests | Can't distinguish new vs old bugs | Report failures, get permission |\n| Hardcode setup commands | Breaks on different projects | Auto-detect from project files |\n| No test baseline | Don't know if worktree is clean | Always run tests after setup |\n\n## Red Flags — Never Do\n\n- Create worktree without verifying it's ignored (project-local)\n- Skip baseline test verification\n- Proceed with failing tests without asking\n- Assume directory location when ambiguous\n- Skip git config check\n\n## CodexAI Integration\n\n### With Subagent Execution\n```\n$worktree → create isolated branch → $sdd → execute plan → $finish\n```\n\n### With Git Autopilot\n```bash\n# Auto-commit within worktree\npython codex-git-autopilot\u002Fscripts\u002Fauto_commit.py --project-root \u003Cworktree-path>\n```\n\n### With Quality Gate\n```bash\n# Verify before merging back\npython codex-execution-quality-gate\u002Fscripts\u002Fauto_gate.py --mode full --project-root \u003Cworktree-path>\n```\n\n## Related Skills\n\n- **`codex-subagent-execution`** — Execute plan tasks within isolated worktree\n- **`codex-git-autopilot`** — Commit automation within worktree\n- **`codex-execution-quality-gate`** — Verify before merge\u002FPR\n- **`codex-plan-writer`** — Creates the plan to execute in worktree\n",{"name":5,"description":7,"load_priority":23},"on-demand","main","19b976c6b4f182f06d2d2e6b030549f2f8a69cc0","packages\u002Fcli\u002Fskills\u002Fcodex-git-worktrees",0,"https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI","https:\u002F\u002Fgithub.com\u002FBang-isme","Hi my name is jeff","2026-07-15 19:58:17",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Bang-isme\u002FAgencyCLI --skill codex-git-worktrees",{"tool":38,"command":39},"bunx","bunx skills add Bang-isme\u002FAgencyCLI --skill codex-git-worktrees",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Bang-isme\u002FAgencyCLI --skill codex-git-worktrees","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Fskills\u002Fcodex-git-worktrees\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M754T5CB6WCXB2AV8N0M50AC","codex-test-driven-development","Fixture stub for TDD skill.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-test-driven-development\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M754T41J59TG0MJYC52TES58","codex-subagent-execution","Fixture stub for subagent execution skill.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-subagent-execution\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M754T2JDSPA3YF83FK6BMNV6","codex-runtime-hook","Fixture stub for runtime hook skill.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-runtime-hook\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M754T1HG4JRTJVZC2PBFTXDT","codex-plan-writer","Fixture stub for plan writer skill.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-plan-writer\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M754SZJVZKGQR5PSA6YFFY09","codex-execution-quality-gate","Fixture stub for quality gate skill.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-execution-quality-gate\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M754SXBJ1DE0JR6TK0XJ4SAK","codex-demo","Minimal fixture skill for Agency CLI skill-md parser tests.","https:\u002F\u002Fgithub.com\u002FBang-isme\u002FAgencyCLI\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmock-skills\u002Fcodex-demo\u002FSKILL.md",[],[]]