Problem:
When Claude creates worktrees, it sometimes calls `git worktree add` directly
instead of using the worktree-manager.sh script. This means .env files don't
get copied to the new worktree, causing the app to fail on startup.
Solution:
1. Add copy_env_files() function to worktree-manager.sh that copies all .env*
files (except .env.example) from main repo to new worktree
2. Call copy_env_files() automatically during worktree creation
3. Add new 'copy-env' command to manually copy env files to existing worktrees
4. Update SKILL.md with CRITICAL section instructing Claude to NEVER call
git worktree add directly - always use the manager script
5. Update all code examples to use ${CLAUDE_PLUGIN_ROOT} for portability
6. Add troubleshooting section for missing .env files
Features:
- Automatically copies .env, .env.local, .env.test, etc.
- Skips .env.example (should be in git)
- Creates .backup if destination already exists
- New 'copy-env' command for manual copying to existing worktrees
Update all documentation to show the correct command syntax:
- `/plan`, `/review`, `/work`, `/codify` (short form, autocompletes)
Previously showed `/workflows:plan` etc. which doesn't work.
The `name:` field in frontmatter determines the short command name.
Fixes#19🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>