用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill worktree命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | worktree |
| description | [Git] Create isolated git worktree for parallel development Use when this capability is needed. |
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.
Goal: Create isolated git worktrees for parallel feature development with automatic branch naming and env file setup.
Workflow:
worktree.cjs info to detect repo type, base branch, env filesworktree.cjs create with project, slug, prefix, and env filesKey Rules:
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Create an isolated git worktree for parallel feature development.
node .claude/scripts/worktree.cjs info --json
Response fields:
repoType: "monorepo" or "standalone"baseBranch: detected base branchprojects: array of {name, path} for monorepoenvFiles: array of .env* files founddirtyState: booleanDetect branch prefix from user's description:
fixrefactordocstestchoreperffeatFor MONOREPO: Use AskUserQuestion if project not specified:
// If user said "/worktree add auth" but multiple projects exist
AskUserQuestion({
questions: [
{
header: 'Project',
question: 'Which project should the worktree be created for?',
options: projects.map(p => ({ label: p.name, description: p.path })),
multiSelect: false
}
]
});
For env files: Always ask which to copy:
AskUserQuestion({
questions: [
{
header: 'Env files',
question: 'Which environment files should be copied to the worktree?',
options: envFiles.map(f => ({ label: f, description: 'Copy to worktree' })),
multiSelect: true
}
]
});
add-authlogin-bugMonorepo:
node .claude/scripts/worktree.cjs create "<PROJECT>" "<SLUG>" --prefix <TYPE> --env "<FILES>"
Standalone:
node .claude/scripts/worktree.cjs create "<SLUG>" --prefix <TYPE> --env "<FILES>"
Options:
--prefix - Branch type: feat|fix|refactor|docs|test|chore|perf--env - Comma-separated .env files to copy--json - Output JSON for parsing--dry-run - Preview without executing| Command | Usage | Description |
|---|---|---|
create | create [project] <feature> | Create new worktree |
remove | remove <name-or-path> | Remove worktree and branch |
info | info | Get repo info |
list | list | List existing worktrees |
| Code | Meaning | Action |
|---|---|---|
MISSING_ARGS | Missing project/feature for monorepo | Ask for both |
MISSING_FEATURE | No feature name (standalone) | Ask for feature |
PROJECT_NOT_FOUND | Project not in .gitmodules | Show available projects |
MULTIPLE_PROJECTS_MATCH | Ambiguous project name | Use AskUserQuestion |
MULTIPLE_WORKTREES_MATCH | Ambiguous worktree for remove | Use AskUserQuestion |
BRANCH_CHECKED_OUT | Branch in use elsewhere | Suggest different name |
WORKTREE_EXISTS | Path already exists | Suggest use or remove |
WORKTREE_CREATE_FAILED | Git command failed | Show git error |
WORKTREE_REMOVE_FAILED | Cannot remove worktree | Check uncommitted changes |
User: /worktree fix the login validation bug
Claude: [Runs: node .claude/scripts/worktree.cjs info --json]
[Detects: standalone repo, envFiles: [".env.example"]]
[Detects prefix from "fix" keyword: fix]
[Converts slug: "login-validation-bug"]
Claude: [Uses AskUserQuestion for env files]
"Which environment files should be copied?"
Options: .env.example
User: .env.example
Claude: [Runs: node .claude/scripts/worktree.cjs create "login-validation-bug" --prefix fix --env ".env.example"]
Output: Worktree created at ../worktrees/myrepo-login-validation-bug
Branch: fix/login-validation-bug
TaskCreate BEFORE startingfile:line evidence for every claim (confidence >80% to act)Converted and distributed by TomeVault — claim your Tome and manage your conversions.
基于 SOC 职业分类