Post-checkout git hook for automatic worktree setup. Use when: (1) Setting up automatic configuration for new git worktrees, (2) Creating post-checkout hooks that detect new worktrees and run setup tasks, (3) Configuring worktrees to automatically copy env files and install dependencies
Provides a post-checkout git hook template that automatically configures new git worktrees by detecting new worktree creation and running setup tasks.
The hook detects when a new worktree is created (not a regular checkout) and automatically:
Install the hook template:
cp .cursor/skills/worktree-setup-hook/assets/hook-templates/post-checkout .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
The hook will automatically run after git worktree add completes.
The hook detects new worktrees by checking if the previous HEAD is the null-ref (0000000000000000000000000000000000000000). This is how git indicates a new worktree creation.
.env.example to .env, .env.local.example to .env.local, or copies env files from the main worktreepackage.json → npm or yarnrequirements.txt → pipCargo.toml → cargogo.mod → goGemfile → bundlesetup.sh or scripts/setup.sh if present and executableSee setup-guide.md for detailed installation instructions, including:
The hook is a standard POSIX shell script. Edit .git/hooks/post-checkout to add custom setup steps or modify behavior.
assets/hook-templates/post-checkout - The main hook scriptreferences/setup-guide.md - Detailed installation and configuration instructionsnpx skills add lambda-curry/worktree-setup-hook下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer