← ClaudeAtlas

worktree-setuplisted

Provision a freshly-created git worktree so it's actually ready to work in — trust its mise.toml, copy gitignored-but-needed files (Rails config/master.key, .env, …) from the main checkout, and re-mark shebang scripts executable. Use right after creating a worktree (native EnterWorktree or `git worktree add`), or when a new worktree errors with "mise.toml not trusted", is missing secrets/.env, can't load the app, or has non-executable scripts. Also when parallel worktrees collide on the same dev-server port or database — opt into per-worktree ports + databases via a `.worktree-isolate.conf`. Pairs with using-git-worktrees (which creates the worktree; this provisions it).
mickzijdel/dev-hooks · ★ 0 · Data & Documents · score 71
Install: claude install-skill mickzijdel/dev-hooks
# worktree-setup A fresh worktree is a clean `git` checkout — and that's the problem. The committed files are there, but everything the working tree needs that git *doesn't* track is not: the `mise.toml` is untrusted, gitignored secrets/config (`config/master.key`, `.env`, service-account JSON) are absent, and `core.fileMode=false` checkouts can land shebang scripts without `+x`. So the app won't boot and the tooling errors until you fix each by hand — every single time. This skill closes those gaps in one step. It **provisions** a worktree; it does not create one (only the harness can switch the session into a worktree). Use it *with* [[using-git-worktrees]], not instead of it. ## Workflow 1. **Ensure `.worktrees/` is ignored.** Before creating any project-local worktree, confirm the directory is gitignored so its contents never get tracked: ```bash git check-ignore -q .worktrees || printf '.worktrees/\n' >>.gitignore # then commit it ``` (The native `EnterWorktree` tool uses `.claude/worktrees/`, which is already kept out of status; only the manual `git worktree add` fallback needs this.) 2. **Branch from local HEAD, not origin.** Your local `main` often leads or lags `origin`; a worktree branched from origin silently drops local commits. ```bash git config worktree.baseref head ``` (`setup-worktree.sh` also sets this, idempotently, for next time.) 3. **Create the worktree.** Prefer the native tool so the session switches into it: