laravel-herd-worktrees

Installation
SKILL.md

Laravel Herd + Git Worktrees

Run multiple branches of a Laravel project in parallel, each reachable at its own *.test URL through Laravel Herd, with isolated dependencies, env, database, and caches.

Mental Model

  • A worktree is a sibling directory of the main checkout with its own HEAD. Composer/Node deps, vendor/, node_modules/, storage/, and bootstrap/cache/ are per-worktree — never share via symlink.
  • Herd's parked directory auto-serves every immediate subdirectory as <dir>.test. Park the parent of all worktrees once and every new worktree gets a URL for free.
  • .env is untracked, so it must be re-created in each worktree. APP_URL, DB_DATABASE, cache prefixes must differ per worktree to prevent cross-branch bleed.

When to Use This Skill

  • User asks to create a worktree for a Laravel app served by Herd.
  • User reports vendor/, migrations, cache, or .env problems after switching worktrees.
  • User wants per-branch URL like myapp-feat.test without manual Nginx/Valet config.
  • User wants the same Laravel project on multiple PHP versions simultaneously.

Workflow

Installs
3
GitHub Stars
3
First Seen
Jun 24, 2026
laravel-herd-worktrees — leek/agent-skills