Real file from a public repo · synced Aug 22, 2026
monorepo-worktree-safety
Prevents dependency resolution failures and test discovery disasters when using git worktrees inside monorepos or submodules. Use this skill whenever: (1) creating a git worktree anywhere inside a monorepo or submodule directory, (2) you see errors like 'vitest: not found', unresolved @org/ or workspace: packages from a worktree path, (3) test suites are running unexpectedly duplicate or foreign tests, (4) someone asks to run coverage or CI checks from a branch worktree, (5) setting up parallel feature development in a monorepo using worktrees. If the user mentions worktrees AND a monorepo, always apply this skill — don't assume the environment is already safe.
Works with
Install in three steps
- 1
Download the ZIP
One file per agent, plus INSTALL.md with the exact paths below.
- 2
Claude Code: copy SKILL.md into your skills folder
.claude/skills/monorepo-worktree-safety/SKILL.md # this project ~/.claude/skills/monorepo-worktree-safety/SKILL.md # every project
- 3
Other agents: use the matching file
skill.mdc goes in Cursor’s .cursor/rules/. AGENTS.md works as GitHub Copilot instructions, a legacy .cursorrules, or a Codex / Gemini CLI instructions file.

