Automate git worktree creation and copy private files (not tracked in git) to new workdirs. Use when creating a new git worktree for this Flutter project that requires untracked private files like secrets.dart, Firebase configs, etc.
Automates the creation of git worktrees and copies untracked private files to the new work directory. This skill handles the setup process for worktrees that require development-only files not committed to git (e.g., API keys, Firebase configs).
Create a new worktree with private files copied:
scripts/setup_worktree.sh <worktree-name> [branch-name]
Or copy private files to an existing worktree:
scripts/setup_worktree.sh <existing-worktree-name>
Example:
# Create worktree for "feature-auth" branch
scripts/setup_worktree.sh feature-auth feature/auth
# Create worktree using main branch (default)
scripts/setup_worktree.sh hotfix-123
# Copy private files to an existing worktree
scripts/setup_worktree.sh feature-auth
The script:
worktree/<worktree-name> directory (if it doesn't exist)references/manifest.md from the main repo (always runs)Edit references/manifest.md and add file paths relative to the repo root:
- lib/common/secrets.dart
- ios/firebase_app_id_file.json
- macos/firebase_app_id_file.json
- android/app/google-services.json
cd worktree/<worktree-name>
# Make changes, commits, etc.
git worktree remove worktree/<worktree-name>
git worktree list
If you've updated private files in the main repo and want to sync them to an existing worktree:
scripts/setup_worktree.sh <existing-worktree-name>
The script will detect the existing worktree and skip the creation step, only copying the files from references/manifest.md. This is useful when:
The setup_worktree.sh script automatically:
Directory exists but is not a git worktree
ERROR: Directory exists but is not a git worktree: worktree/<name>
Remove the directory with rm -rf worktree/<name> or create a proper git worktree manually
Syncing to existing worktree fails
ERROR: Not in a git repository
Make sure you're running the script from within the main git repository
Source file not found
WARN: Source file not found: lib/common/secrets.dart, skipping...
The file is missing from your main repo; add it or remove from manifest
Executable shell script that creates git worktrees and copies private files. Execute directly without loading into context.
Configuration file listing all private files to copy. Read this file to add or remove files that should be copied to new worktrees.
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