/loom-engineering:loom-using-git-worktrees <spec_dir or branch name>from loom-engineering
Creates an isolated git worktree under .worktree/ before starting implementation, verifies baseline tests pass, and enforces branch naming conventions.
Ships in loom-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
检测现有隔离 → 只在当前项目的 .worktree/ 下创建。禁止使用会落到项目外的宿主工作区工具。
在创建任何东西之前,先检查当前是否已在 worktree 中:
# 检测 worktree
git rev-parse --git-dir
git rev-parse --git-common-dir
# 如果 GIT_DIR != GIT_COMMON,已在 worktree 中
# 检测 submodule
git rev-parse --show-superproject-working-tree
如果已在隔离环境中: 跳过创建,直接使用当前环境。
git status
specs/<date+feature>/plan.md 和 specs/<date+feature>/tasks/ 目录)在主工作区根目录用 git 创建,路径必须是项目内的 .worktree/:
git rev-parse --show-toplevel
git worktree add .worktree/<date>-<feature-name> -b feature/<date>-<feature-name>
结果目录是 <项目根>/.worktree/<date>-<feature-name>。命令要在主工作区执行,不要在已有 worktree 里再创建。
目录安全: 创建前确认 .worktree/ 已在 .gitignore 中。没有则先补上,避免把工作区提交进仓库。
禁止使用宿主原生工作区工具来创建,包括 OpenCode 的 worktree_create、其他平台的 WorktreeCreate,以及用户临时目录或服务数据目录。这些工具的默认落点不在项目 .worktree/ 下。创建之后如果要把当前会话切进新工作区,只移动会话目录,不要再调用会另建工作区的工具。
分支命名规范:
feature/<date>-<feature-name>
示例:
feature/2026-04-26-passport-listfeature/2026-04-26-user-auth自动检测项目类型并安装依赖,然后运行测试确保干净起点。
<读取 constitution.md 中的 TEST_CMD 并执行>
如果基线测试失败: 停止,报告问题,等用户确认是否继续。
git branch --show-current
确认分支已创建并切换成功。
Git 分支命名规范
分支命名格式:feature/<date>-<feature-name>(如 feature/2025-01-15-user-auth)
其他前缀:fix/<date>-<name>、refactor/<date>-<name>、docs/<date>-<name>
禁止在主分支实现
没有明确用户同意,永远不要在 main/master 分支上开始实现。
.worktree/ 下的 worktree.gitignore 规则分支创建并验证测试基线。
What SKILL.md sets; muted values are Claude Code's defaults
Create or verify an isolated branch/worktree before implementation begins.
22 skills in this plugin
/loom-analyze-artifactsRead-only cross-artifact consistency analysis after planning and before approval. Verifies that spec.md, requirements.json, plan.md, tasks/Tn.md, traceability.json are mutually consistent: no duplicate/ambiguous requirements, every behavior mapped to a task, no orphan tasks, no coverage gaps, no contradictions. Outputs artifact-analysis.json with coverage% and severity. CRITICAL/HIGH findings block the approval gate. Use when: planning produced plan.md + tasks + traceability.json, before the user approves the plan.
/loom-brainstormingExplore 2-3 implementation options with trade-offs when the user describes a new feature or requirement. Use when: the user asks for a new feature design, implementation options, or technical trade-off analysis.
/loom-Other plugins' skills for the same job
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest/PreSkillShellCommand at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest/PreSkillShellCommand at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.