agents/fae/skills/project-worktrees/SKILL.md
项目级 Git worktree 管理工具,面向协同 Agent 设计。支持在项目 .worktrees 目录下创建隔离开发环境,自动依赖安装和测试验证。
npx skillsauth add sampx/agent-tools project-worktreesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
项目级 Git worktree 管理工具,专为协同 Agent 设计。在项目的 .worktrees/ 目录下创建隔离的开发环境,支持并行开发、实验性功能隔离。
与 git-worktrees 的区别:
| 特性 | git-worktrees | project-worktrees |
|------|--------------|-------------------|
| 管理层级 | 工作空间级 | 项目级 |
| worktree 路径 | <workspace>/.worktrees/<project>-<branch> | <project>/.worktrees/<branch> |
| 项目参数 | 需要 <project> | 不需要 |
| OpenSpec 集成 | 有 | 无 |
| 目标用户 | Wopal 主 Agent | 沙箱内的协同 Agent |
# 在项目根目录执行
./scripts/worktree.sh create <branch>
./scripts/worktree.sh list
./scripts/worktree.sh remove <branch>
# 创建新分支(默认)
./scripts/worktree.sh create feature-auth
# 跳过依赖安装
./scripts/worktree.sh create feature/test --no-install
# 跳过测试
./scripts/worktree.sh create feature/test --no-test
# 使用已存在的分支
./scripts/worktree.sh create hotfix-123 --checkout
创建新的 worktree。
语法:
./scripts/worktree.sh create <branch> [选项]
参数:
<branch>: 分支名(分支中的 / 会自动转换为 -)选项:
| 选项 | 说明 |
|------|------|
| --no-install | 跳过依赖安装 |
| --no-test | 跳过测试运行 |
| --checkout | 使用已存在的分支(不创建新分支) |
路径规则:
<project>/.worktrees/<branch>
示例:
feature/auth.worktrees/feature-auth列出当前项目的所有 worktree。
./scripts/worktree.sh list
删除 worktree。
语法:
./scripts/worktree.sh remove <branch> [--force]
选项:
| 选项 | 说明 |
|------|------|
| --force, -f | 跳过确认直接删除(适合 Agent 使用) |
清理已删除分支的 worktree 记录。
./scripts/worktree.sh prune
创建 worktree 时自动执行:
${project}/.worktrees/${branch})--no-install 跳过)--no-test 跳过)脚本会根据锁文件自动选择包管理器:
| 锁文件 | 包管理器 |
|--------|---------|
| pnpm-lock.yaml | pnpm install |
| package-lock.json | npm install |
| yarn.lock | yarn install |
| bun.lockb | bun install |
| 无锁文件 | 优先 pnpm(如果可用) |
# 创建多个隔离环境
./scripts/worktree.sh create feature/auth --no-test
./scripts/worktree.sh create feature/logging --no-test
# 在不同环境工作
cd .worktrees/feature-auth
# ... 开发 ...
# 创建隔离环境
./scripts/worktree.sh create hotfix/security-patch
# 修复完成后清理
cd .worktrees/hotfix-security-patch
git commit -m "fix: 安全补丁"
cd ../..
./scripts/worktree.sh remove hotfix/security-patch --force
# 适合 Agent 使用的完整流程
./scripts/worktree.sh create feature/agent-task --no-test
cd .worktrees/feature-agent-task
# ... Agent 执行任务 ...
git add . && git commit -m "feat: 完成任务"
cd ../..
./scripts/worktree.sh remove feature/agent-task --force
# 1. 创建功能分支 worktree
./scripts/worktree.sh create feature/new-skill
# 2. 切换到 worktree
cd .worktrees/feature-new-skill
# 3. 开发
# ... 编写代码、测试 ...
# 4. 提交
git add .
git commit -m "feat: 添加新技能"
# 5. 回到主工作区合并
cd ..
git checkout main
git merge feature/new-skill --no-ff
# 6. 清理 worktree
./scripts/worktree.sh remove feature/new-skill --force
remove 清理,避免僵尸目录--force 选项可跳过交互确认,适合 Agent 自动化场景projects/ontology/skills/my-skills/project-worktrees/scripts/worktree.sh.agents/skills/project-worktrees/scripts/worktree.shtools
Configure ellamaka, a fork of OpenCode with wopal-space mode. MUST use for any task about ellamaka config, agent frontmatter, permission rules, model/provider selection, formatter settings, config loading order, or why config changes are ignored. Trigger on requests about ellamaka or opencode config files, agent permission overrides, restricting subagents, custom/plugin tool permissions (e.g. wopal_task_*), disabling tools, configuring providers or models, formatter setup, config precedence or layering, or debugging settings that do not take effect. Use this skill even when the user says "opencode" if the actual runtime, config path, or behavior is ellamaka. Prefer this skill whenever the answer depends on the difference between ellamaka and upstream opencode, including wopal-space config loading, plugin tool permissions, or agent frontmatter precedence.
development
Plan quality verification for dev-flow. Goal-backward analysis ensures plans WILL achieve their stated goal before execution burns context. ⚠️ MUST use when: (1) Reviewing Plan quality before approve (2) Wopal completes Plan writing and needs quality gate (3) User asks to "check plan", "verify plan", "review plan" (4) Plan enters planning status and needs pre-execution validation 🔴 Trigger automatically when Plan is ready for review, even if user doesn't explicitly say "review". Agent: rook (read-only verification subagent) Mode: verification, not execution
development
Review implementation results for goal achievement and code quality. Supports both Plan-backed review and planless diff review. ⚠️ MUST use when: (1) Wopal delegates rook to review fae implementation output, (2) Prompt contains "review_type: implementation", (3) Prompt contains changed code file list or Plan path + implementation scope, (4) Any code review request from Wopal. 🔴 Trigger even when user does not explicitly mention "review" if the task involves verifying implementation results. This skill is rook-exclusive (only rook agent can load it).
tools
Foundation rules for how Wopal collaborates with sub-agents such as fae and rook. ⚠️ MUST load before ANY delegation — covers delegation tool APIs, task lifecycle, notifications, status handling, and recovery. 🔴 Trigger: "delegate", "let fae implement", "fae task", "rook review", "check task status", "cancel task", "abort task", "agent collaboration", "委派", "让 fae 执行", "fae 任务", "rook 审查", "检查状态", or any intent to hand work to a sub-agent. 🔴 Never delegate without loading this skill first. Skipping it is serious negligence. Note: this skill does not include workflow-specific prompt templates such as dev-flow templates. Those belong to the corresponding workflow skills.