agents/wopal/skills/git-worktrees/SKILL.md
Workspace-level Git worktree management for parallel development across multiple branches. Supports dynamic project validation and automated dependency installation. Use this skill when creating isolated development environments or working on multiple features in parallel.
npx skillsauth add sampx/agent-tools git-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 管理工具,实现统一的 worktree 创建、管理和清理。支持多分支并行开发、实验性功能隔离。
核心特性:
.worktrees/ 目录)projects/ 下包含 .git 的仓库)# 创建 worktree
./scripts/worktree.sh create <project> <branch>
# 列出 worktree
./scripts/worktree.sh list [--all|<project>]
# 删除 worktree
./scripts/worktree.sh remove <project> <branch>
# 清理
./scripts/worktree.sh prune <project>
# 创建新分支(默认)
./scripts/worktree.sh create ontology feature/wopal-cli-scan
# 使用已存在的分支
./scripts/worktree.sh create wopal hotfix-123 --existing
# 跳过依赖安装
./scripts/worktree.sh create ontology feature/test --no-install
# 跳过测试
./scripts/worktree.sh create ontology feature/test --no-test
# 在 ontology 上开发两个功能
./scripts/worktree.sh create ontology feature/auth
./scripts/worktree.sh create ontology feature/logging
# 切换到不同功能开发
cd .worktrees/ontology-feature-auth
cd .worktrees/ontology-feature-logging
# 创建紧急修复的隔离环境
./scripts/worktree.sh create wopal hotfix/security-patch
# 修复完成后合并并清理
cd .worktrees/wopal-hotfix-security-patch
git commit -m "fix: 安全补丁"
cd ../../projects/web/wopal
git merge hotfix/security-patch
./scripts/worktree.sh remove wopal hotfix/security-patch
创建新的 worktree。
语法:
./scripts/worktree.sh create <project> <branch> [选项]
参数:
<project>: 项目名(从 projects/ 下扫描到的 git 仓库中选择)<branch>: 分支名(分支中的 / 会自动转换为 -)选项:
--existing: 使用已存在的分支而非创建新分支--no-install: 跳过依赖安装--no-test: 跳过测试运行路径规则:
工作空间根目录/.worktrees/<project>-<branch>
示例:
ontology, 分支: feature/auth.worktrees/ontology-feature-auth列出 worktree。
语法:
./scripts/worktree.sh list [--all|<project>]
参数:
--all: 列出所有项目的 worktree(详细模式)<project>: 只列出指定项目的 worktree删除 worktree。
语法:
./scripts/worktree.sh remove <project> <branch>
删除时会提示确认,并询问是否同时删除分支。
清理已删除分支的 worktree 记录。
语法:
./scripts/worktree.sh prune <project>
可用项目名由脚本自动扫描工作空间根目录 projects/ 下包含 .git 的仓库目录得到。
# 查看脚本识别到的项目
./scripts/worktree.sh list --all
当前工作空间的项目(示例):
ontology - AI 工具研发中心wopal - Wopal 平台flex-scheduler - 任务调度系统创建 worktree 时自动执行:
projects/ 下的 git 仓库目录${workspace}/.worktrees/${project}-${branch})--no-install 跳过)
pnpm install 或 npm installcargo buildgo mod download--no-test 跳过)删除 worktree 的正确顺序:
# 1. 删除 worktree(脚本会自动处理)
./scripts/worktree.sh remove <project> <branch>
# 脚本会按顺序执行:
# - git worktree remove
# - 询问是否删除分支(可选)
Q: 提示"无效项目名"?
A: 项目名必须来自 projects/ 下扫描到的 git 仓库目录,查看可用项目:
./scripts/worktree.sh help
Q: worktree 已存在?
A: 使用 list 命令查看现有 worktree,然后删除或使用不同的分支名。
Q: 测试失败? A: 脚本会警告但不会阻止创建。检查测试失败原因,确认是否为预存在问题。
# 1. 创建功能分支 worktree
./scripts/worktree.sh create ontology feature/new-skill
# 2. 切换到 worktree
cd .worktrees/ontology-feature-new-skill
# 3. 开发
# ... 编写代码、测试 ...
# 4. 提交
git add .
git commit -m "feat: 添加新技能"
# 5. 回到主工作区合并
cd ../../projects/ontology
git checkout main
git merge feature/new-skill --no-ff
# 6. 清理 worktree
./scripts/worktree.sh remove ontology feature/new-skill
tools
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.