Automate Laravel Herd Worktrees with This Claude Code Skill

Automate Laravel Herd Worktrees with This Claude Code Skill

I just open-sourced Laravel Herd Worktree, a Claude Code skill I built to automate git worktree setup for Laravel projects running on Herd. If you've ever felt the pain of context switching between branches—stashing changes, reconfiguring environment files, dealing with broken session cookies—this is for you.

With a single command (/laravel-herd-worktree), the skill creates an isolated
worktree, links it to Herd at http://your-branch.test, configures your .env file
with the correct APP_URL, SESSION_DOMAIN, and SANCTUM_STATEFUL_DOMAINS settings, installs Composer and npm dependencies, and starts Vite with proper CORS configuration. Each worktree runs as a fully independent development environment. No more stashing. No more broken sessions. Just work on multiple branches simultaneously.

When you're done, it handles the cleanup too by creating PRs directly from the
worktree, transferring changes back to your main directory, or removing everything with proper Herd unlinking. It's free and open source. You can install it from the Claude Code marketplace with
/plugin install laravel-herd-worktree@harrisrafto-laravel-tools or check out the code on https://github.com/harris21/laravel-herd-worktree.

Let me know what you think!

Subscribe to Harris Raftopoulos

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe