Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/xiqin/loom/loom-using-git-worktreesnpx skills add xiqin/loom --skill loom-using-git-worktreesgit clone --depth 1 https://github.com/xiqin/loomWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xiqin/loom/loom-using-git-worktrees)<a href="https://agentmods.dev/skills/xiqin/loom/loom-using-git-worktrees"><img src="https://agentmods.dev/badge/skills/xiqin/loom/loom-using-git-worktrees.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.00904 |
| Opus 5 | $0.00021 | $0.00452 |
| Sonnet 5 | $0.00008 | $0.00181 |
| Haiku 4.5 | $0.00004 | $0.00090 |
Grade A, and why
loom-using-git-worktrees scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Git 工作树隔离
核心原则
检测现有隔离 → 原生工具优先 → git worktree 作为兜底。
Step 0:检测是否已在隔离环境
在创建任何东西之前,先检查当前是否已在 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
如果已在隔离环境中: 跳过创建,直接使用当前环境。
执行流程
Step 1:检查当前状态
git status
- 确认当前在正确的分支(通常为主分支)
- 确认没有未提交的变更
- 确认有实现计划(
specs/<date+feature>/plan.md和specs/<date+feature>/tasks/目录)
Step 2:创建隔离工作空间
优先使用平台原生工具:
- 优先使用 AI 工具的工作空间管理功能
- 其他平台:检查是否有
WorktreeCreate类工具 - 兜底:手动
git worktree add
目录安全: 创建前确认 worktree 目录在 .gitignore 中,防止意外提交。
分支命名规范:
feature/<date>-<feature-name>
示例:
feature/2026-04-26-passport-listfeature/2026-04-26-user-auth
# 兜底方案(原生工具不可用时)
git worktree add .worktree/<date>-<feature-name> -b feature/<date>-<feature-name>
Step 3:安装依赖并验证基线
自动检测项目类型并安装依赖,然后运行测试确保干净起点。
<读取 constitution.md 中的 TEST_CMD 并执行>
- 依赖安装成功
- 所有测试通过
- 没有失败的测试
如果基线测试失败: 停止,报告问题,等用户确认是否继续。
Step 4:确认分支状态
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 中再建 worktree)
- 只清理自己创建的 worktree(验证路径在 superpower 管理目录下)
- 目录创建前必须确认
.gitignore规则
完成条件
分支创建并验证测试基线。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 121 lines · 42 tokens per session scan A 8e4a1162c041
loom-using-git-worktrees is a skill published in the GitHub repository xiqin/loom (5 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 904 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…