基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill git-worktrees命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Anti-over-engineering guardrail that activates when an AI coding agent expands scope, adds abstractions, or changes files the user did not request.
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
Complete n8n skill — workflow building, node configuration, JavaScript/Python code nodes, expression syntax, validation, MCP tools, credentials, administration, Docker deployment, backup/restore, internal API, and troubleshooting. Auto-triggers on any n8n task including workflow creation, node configuration, code nodes, expressions, validation errors, credential management, instance administration, n8n setup, n8n upgrade, n8n backup, and n8n API usage.
| name | Git Worktrees |
| description | Guidance for isolated Git worktree workflows and parallel branch development. |
Isolated development environments. Parallel work without branch switching. Clean separation.
EnterWorktree / ExitWorktree tools| Scenario | Use |
|---|---|
| Sequential feature work | Branch (simpler) |
| Parallel feature work | Worktree (isolated) |
| Quick hotfix while mid-feature | Worktree (no stash needed) |
| Subagent isolation | Worktree (via isolation: "worktree" on Agent tool) |
| Spike/experiment alongside main work | Worktree (disposable) |
| Code review while developing | Worktree (separate checkout) |
# Create a worktree for a new branch
git worktree add ../project-feature-name -b feature/feature-name
# Create a worktree for an existing branch
git worktree add ../project-hotfix hotfix/urgent-fix
# List active worktrees
git worktree list
Directory naming: Use ../<project>-<purpose> to keep worktrees adjacent to the main repo.
# Each worktree is a full checkout — cd into it and work normally
cd ../project-feature-name
# Run tests, edit files, commit — all isolated from main worktree
# Install dependencies if needed (they're NOT shared)
npm install # or pip install -r requirements.txt, etc.
# When done with a worktree
cd /path/to/main/repo
git worktree remove ../project-feature-name
# Prune stale worktree references
git worktree prune
When spawning subagents, use isolation: "worktree" to give each agent its own copy:
Agent tool parameters:
isolation: "worktree"
prompt: "Implement feature X in the isolated worktree..."
The worktree is automatically cleaned up if the agent makes no changes. If changes are made, the worktree path and branch are returned in the result.
After creating a worktree, always verify the baseline:
# Ensure tests pass in the clean worktree before making changes
cd ../project-worktree
# Run the project's test suite
# If tests fail here, the problem is pre-existing — do not mask it
Some worktrees need dependency installation:
| Project Type | Check For | Install Command |
|---|---|---|
| Node.js | package.json | npm install or bun install |
| Python | requirements.txt / pyproject.toml | pip install -r requirements.txt or uv sync |
| Rust | Cargo.toml | cargo build |
| Go | go.mod | go mod download |