[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75E077T8W5F4V30DX2PD72Y":3,"skill-same:01M75E077T8W5F4V30DX2PD72Y":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"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":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75E077T8W5F4V30DX2PD72Y","git-worktree-manager",null,"Run parallel feature work safely with Git worktrees. Standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app. Optimized for multi-agent workflows where each agent or terminal session owns one worktree. Use when running multiple feature branches simultaneously, isolating experimental work, or coordinating multi-agent development across the same repo.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fgit-worktree-manager\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"git-worktree-manager\"\ndescription: \"Run parallel feature work safely with Git worktrees. Standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app. Optimized for multi-agent workflows where each agent or terminal session owns one worktree. Use when running multiple feature branches simultaneously, isolating experimental work, or coordinating multi-agent development across the same repo.\"\n---\n\n# Git Worktree Manager\n\n**Tier:** POWERFUL  \n**Category:** Engineering  \n**Domain:** Parallel Development & Branch Isolation\n\n## Overview\n\nUse this skill to run parallel feature work safely with Git worktrees. It standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app without stepping on another branch.\n\nThis skill is optimized for multi-agent workflows where each agent or terminal session owns one worktree.\n\n## Core Capabilities\n\n- Create worktrees from new or existing branches with deterministic naming\n- Auto-allocate non-conflicting ports per worktree and persist assignments\n- Copy local environment files (`.env*`) from main repo to new worktree\n- Optionally install dependencies based on lockfile detection\n- Detect stale worktrees and uncommitted changes before cleanup\n- Identify merged branches and safely remove outdated worktrees\n\n## When to Use\n\n- You need 2+ concurrent branches open locally\n- You want isolated dev servers for feature, hotfix, and PR validation\n- You are working with multiple agents that must not share a branch\n- Your current branch is blocked but you need to ship a quick fix now\n- You want repeatable cleanup instead of ad-hoc `rm -rf` operations\n\n## Key Workflows\n\n### 1. Create a Fully-Prepared Worktree\n\n1. Pick a branch name and worktree name.\n2. Run the manager script (creates branch if missing).\n3. Review generated port map.\n4. Start app using allocated ports.\n\n```bash\npython scripts\u002Fworktree_manager.py \\\n  --repo . \\\n  --branch feature\u002Fnew-auth \\\n  --name wt-auth \\\n  --base-branch main \\\n  --install-deps \\\n  --format text\n```\n\nIf you use JSON automation input:\n\n```bash\ncat config.json | python scripts\u002Fworktree_manager.py --format json\n# or\npython scripts\u002Fworktree_manager.py --input config.json --format json\n```\n\n### 2. Run Parallel Sessions\n\nRecommended convention:\n\n- Main repo: integration branch (`main`\u002F`develop`) on default port\n- Worktree A: feature branch + offset ports\n- Worktree B: hotfix branch + next offset\n\nEach worktree contains `.worktree-ports.json` with assigned ports.\n\n### 3. Cleanup with Safety Checks\n\n1. Scan all worktrees and stale age.\n2. Inspect dirty trees and branch merge status.\n3. Remove only merged + clean worktrees, or force explicitly.\n\n```bash\npython scripts\u002Fworktree_cleanup.py --repo . --stale-days 14 --format text\npython scripts\u002Fworktree_cleanup.py --repo . --remove-merged --format text\n```\n\n### 4. Docker Compose Pattern\n\nUse per-worktree override files mapped from allocated ports. The script outputs a deterministic port map; apply it to `docker-compose.worktree.yml`.\n\nSee [docker-compose-patterns.md](references\u002Fdocker-compose-patterns.md) for concrete templates.\n\n### 5. Port Allocation Strategy\n\nDefault strategy is `base + (index * stride)` with collision checks:\n\n- App: `3000`\n- Postgres: `5432`\n- Redis: `6379`\n- Stride: `10`\n\nSee [port-allocation-strategy.md](references\u002Fport-allocation-strategy.md) for the full strategy and edge cases.\n\n## Script Interfaces\n\n- `python scripts\u002Fworktree_manager.py --help`\n  - Create\u002Flist worktrees\n  - Allocate\u002Fpersist ports\n  - Copy `.env*` files\n  - Optional dependency installation\n- `python scripts\u002Fworktree_cleanup.py --help`\n  - Stale detection by age\n  - Dirty-state detection\n  - Merged-branch detection\n  - Optional safe removal\n\nBoth tools support stdin JSON and `--input` file mode for automation pipelines.\n\n## Common Pitfalls\n\n1. Creating worktrees inside the main repo directory\n2. Reusing `localhost:3000` across all branches\n3. Sharing one database URL across isolated feature branches\n4. Removing a worktree with uncommitted changes\n5. Forgetting to prune old metadata after branch deletion\n6. Assuming merged status without checking against the target branch\n\n## Best Practices\n\n1. One branch per worktree, one agent per worktree.\n2. Keep worktrees short-lived; remove after merge.\n3. Use a deterministic naming pattern (`wt-\u003Ctopic>`).\n4. Persist port mappings in file, not memory or terminal notes.\n5. Run cleanup scan weekly in active repos.\n6. Use `--format json` for machine flows and `--format text` for human review.\n7. Never force-remove dirty worktrees unless changes are intentionally discarded.\n\n## Validation Checklist\n\nBefore claiming setup complete:\n\n1. `git worktree list` shows expected path + branch.\n2. `.worktree-ports.json` exists and contains unique ports.\n3. `.env` files copied successfully (if present in source repo).\n4. Dependency install command exits with code `0` (if enabled).\n5. Cleanup scan reports no unintended stale dirty trees.\n\n## References\n\n- [port-allocation-strategy.md](references\u002Fport-allocation-strategy.md)\n- [docker-compose-patterns.md](references\u002Fdocker-compose-patterns.md)\n- [README.md](README.md) for quick start and installation details\n\n## Decision Matrix\n\nUse this quick selector before creating a new worktree:\n\n- Need isolated dependencies and server ports -> create a new worktree\n- Need only a quick local diff review -> stay on current tree\n- Need hotfix while feature branch is dirty -> create dedicated hotfix worktree\n- Need ephemeral reproduction branch for bug triage -> create temporary worktree and cleanup same day\n\n## Operational Checklist\n\n### Before Creation\n\n1. Confirm main repo has clean baseline or intentional WIP commits.\n2. Confirm target branch naming convention.\n3. Confirm required base branch exists (`main`\u002F`develop`).\n4. Confirm no reserved local ports are already occupied by non-repo services.\n\n### After Creation\n\n1. Verify `git status` branch matches expected branch.\n2. Verify `.worktree-ports.json` exists.\n3. Verify app boots on allocated app port.\n4. Verify DB and cache endpoints target isolated ports.\n\n### Before Removal\n\n1. Verify branch has upstream and is merged when intended.\n2. Verify no uncommitted files remain.\n3. Verify no running containers\u002Fprocesses depend on this worktree path.\n\n## CI and Team Integration\n\n- Use worktree path naming that maps to task ID (`wt-1234-auth`).\n- Include the worktree path in terminal title to avoid wrong-window commits.\n- In automated setups, persist creation metadata in CI artifacts\u002Flogs.\n- Trigger cleanup report in scheduled jobs and post summary to team channel.\n\n## Failure Recovery\n\n- If `git worktree add` fails due to existing path: inspect path, do not overwrite.\n- If dependency install fails: keep worktree created, mark status and continue manual recovery.\n- If env copy fails: continue with warning and explicit missing file list.\n- If port allocation collides with external service: rerun with adjusted base ports.\n","# Git Worktree Manager\n\n**Tier:** POWERFUL  \n**Category:** Engineering  \n**Domain:** Parallel Development & Branch Isolation\n\n## Overview\n\nUse this skill to run parallel feature work safely with Git worktrees. It standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app without stepping on another branch.\n\nThis skill is optimized for multi-agent workflows where each agent or terminal session owns one worktree.\n\n## Core Capabilities\n\n- Create worktrees from new or existing branches with deterministic naming\n- Auto-allocate non-conflicting ports per worktree and persist assignments\n- Copy local environment files (`.env*`) from main repo to new worktree\n- Optionally install dependencies based on lockfile detection\n- Detect stale worktrees and uncommitted changes before cleanup\n- Identify merged branches and safely remove outdated worktrees\n\n## When to Use\n\n- You need 2+ concurrent branches open locally\n- You want isolated dev servers for feature, hotfix, and PR validation\n- You are working with multiple agents that must not share a branch\n- Your current branch is blocked but you need to ship a quick fix now\n- You want repeatable cleanup instead of ad-hoc `rm -rf` operations\n\n## Key Workflows\n\n### 1. Create a Fully-Prepared Worktree\n\n1. Pick a branch name and worktree name.\n2. Run the manager script (creates branch if missing).\n3. Review generated port map.\n4. Start app using allocated ports.\n\n```bash\npython scripts\u002Fworktree_manager.py \\\n  --repo . \\\n  --branch feature\u002Fnew-auth \\\n  --name wt-auth \\\n  --base-branch main \\\n  --install-deps \\\n  --format text\n```\n\nIf you use JSON automation input:\n\n```bash\ncat config.json | python scripts\u002Fworktree_manager.py --format json\n# or\npython scripts\u002Fworktree_manager.py --input config.json --format json\n```\n\n### 2. Run Parallel Sessions\n\nRecommended convention:\n\n- Main repo: integration branch (`main`\u002F`develop`) on default port\n- Worktree A: feature branch + offset ports\n- Worktree B: hotfix branch + next offset\n\nEach worktree contains `.worktree-ports.json` with assigned ports.\n\n### 3. Cleanup with Safety Checks\n\n1. Scan all worktrees and stale age.\n2. Inspect dirty trees and branch merge status.\n3. Remove only merged + clean worktrees, or force explicitly.\n\n```bash\npython scripts\u002Fworktree_cleanup.py --repo . --stale-days 14 --format text\npython scripts\u002Fworktree_cleanup.py --repo . --remove-merged --format text\n```\n\n### 4. Docker Compose Pattern\n\nUse per-worktree override files mapped from allocated ports. The script outputs a deterministic port map; apply it to `docker-compose.worktree.yml`.\n\nSee [docker-compose-patterns.md](references\u002Fdocker-compose-patterns.md) for concrete templates.\n\n### 5. Port Allocation Strategy\n\nDefault strategy is `base + (index * stride)` with collision checks:\n\n- App: `3000`\n- Postgres: `5432`\n- Redis: `6379`\n- Stride: `10`\n\nSee [port-allocation-strategy.md](references\u002Fport-allocation-strategy.md) for the full strategy and edge cases.\n\n## Script Interfaces\n\n- `python scripts\u002Fworktree_manager.py --help`\n  - Create\u002Flist worktrees\n  - Allocate\u002Fpersist ports\n  - Copy `.env*` files\n  - Optional dependency installation\n- `python scripts\u002Fworktree_cleanup.py --help`\n  - Stale detection by age\n  - Dirty-state detection\n  - Merged-branch detection\n  - Optional safe removal\n\nBoth tools support stdin JSON and `--input` file mode for automation pipelines.\n\n## Common Pitfalls\n\n1. Creating worktrees inside the main repo directory\n2. Reusing `localhost:3000` across all branches\n3. Sharing one database URL across isolated feature branches\n4. Removing a worktree with uncommitted changes\n5. Forgetting to prune old metadata after branch deletion\n6. Assuming merged status without checking against the target branch\n\n## Best Practices\n\n1. One branch per worktree, one agent per worktree.\n2. Keep worktrees short-lived; remove after merge.\n3. Use a deterministic naming pattern (`wt-\u003Ctopic>`).\n4. Persist port mappings in file, not memory or terminal notes.\n5. Run cleanup scan weekly in active repos.\n6. Use `--format json` for machine flows and `--format text` for human review.\n7. Never force-remove dirty worktrees unless changes are intentionally discarded.\n\n## Validation Checklist\n\nBefore claiming setup complete:\n\n1. `git worktree list` shows expected path + branch.\n2. `.worktree-ports.json` exists and contains unique ports.\n3. `.env` files copied successfully (if present in source repo).\n4. Dependency install command exits with code `0` (if enabled).\n5. Cleanup scan reports no unintended stale dirty trees.\n\n## References\n\n- [port-allocation-strategy.md](references\u002Fport-allocation-strategy.md)\n- [docker-compose-patterns.md](references\u002Fdocker-compose-patterns.md)\n- [README.md](README.md) for quick start and installation details\n\n## Decision Matrix\n\nUse this quick selector before creating a new worktree:\n\n- Need isolated dependencies and server ports -> create a new worktree\n- Need only a quick local diff review -> stay on current tree\n- Need hotfix while feature branch is dirty -> create dedicated hotfix worktree\n- Need ephemeral reproduction branch for bug triage -> create temporary worktree and cleanup same day\n\n## Operational Checklist\n\n### Before Creation\n\n1. Confirm main repo has clean baseline or intentional WIP commits.\n2. Confirm target branch naming convention.\n3. Confirm required base branch exists (`main`\u002F`develop`).\n4. Confirm no reserved local ports are already occupied by non-repo services.\n\n### After Creation\n\n1. Verify `git status` branch matches expected branch.\n2. Verify `.worktree-ports.json` exists.\n3. Verify app boots on allocated app port.\n4. Verify DB and cache endpoints target isolated ports.\n\n### Before Removal\n\n1. Verify branch has upstream and is merged when intended.\n2. Verify no uncommitted files remain.\n3. Verify no running containers\u002Fprocesses depend on this worktree path.\n\n## CI and Team Integration\n\n- Use worktree path naming that maps to task ID (`wt-1234-auth`).\n- Include the worktree path in terminal title to avoid wrong-window commits.\n- In automated setups, persist creation metadata in CI artifacts\u002Flogs.\n- Trigger cleanup report in scheduled jobs and post summary to team channel.\n\n## Failure Recovery\n\n- If `git worktree add` fails due to existing path: inspect path, do not overwrite.\n- If dependency install fails: keep worktree created, mark status and continue manual recovery.\n- If env copy fails: continue with warning and explicit missing file list.\n- If port allocation collides with external service: rerun with adjusted base ports.\n",{"name":5,"description":7},"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fgit-worktree-manager",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agisota\u002Fold-one --skill git-worktree-manager",{"tool":38,"command":39},"bunx","bunx skills add agisota\u002Fold-one --skill git-worktree-manager",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill git-worktree-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fgit-worktree-manager\u002FSKILL.md",true,[],[47,54,61,70,77,84],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":65,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]