mthines/gw-tools
Overview
This skill configures and optimizes gw-tools for different project types and team needs. It guides setup of .gw/config.json, auto-copy patterns, update strategies, and cleanup policies so repositories and worktrees behave predictably. Use it to standardize onboarding, protect secrets, and automate routine worktree maintenance.
How this skill works
The skill inspects the repository's .gw/config.json and the git worktree layout to determine root, defaultBranch, autoCopyFiles, updateStrategy, cleanThreshold, and autoClean settings. It recommends values, generates or updates config.json, and validates auto-copy patterns and paths relative to the repository root. It also simulates init and gw add flows to catch offline/fetch fallbacks and common misconfigurations.
When to use it
- Setting up gw for a new repository or cloning with gw init.
- Configuring auto-copy for environment files and secrets before creating worktrees.
- Customizing gw behavior for Next.js, Node APIs, React SPAs, or monorepos.
- Troubleshooting gw add failures related to remote fetch, --from strictness, or missing defaultBranch files.
- Tuning auto-clean and cleanThreshold to manage stale worktrees across a team.
Best practices
- Keep secrets and env files in the defaultBranch worktree before using auto-copy.
- Prefer auto-detection (gw init) unless repository layout is nonstandard; set root only when required.
- Use directories with trailing / for recursive auto-copy and list explicit files for sensitive items.
- Choose updateStrategy per team: merge for shared branches, rebase for private linear history.
- Enable autoClean with a conservative cleanThreshold (7–14 days) and use dry-run before force-cleaning.
Example use cases
- Initialize a freshly cloned repo with gw init and auto-copy .env and secrets/ into new worktrees.
- Configure a monorepo to copy per-package .env.local files from the defaultBranch into feature worktrees.
- Set updateStrategy to rebase for individual contributors and merge for CI-managed shared branches.
- Troubleshoot gw add when remote fetch fails: recommend running without --from for lenient fallback or fix remote/auth for strict mode.
- Tune autoClean and prompt behavior for teams that create many short-lived feature worktrees.
FAQ
gw skips missing paths and emits a warning; ensure required secrets exist in the defaultBranch before creating worktrees if you rely on them.
When does gw fall back to local branches?
gw falls back to a local defaultBranch only when no --from is specified and remote fetch fails; --from disables fallback and will error if fetch fails.
2 skills
This skill helps you configure and optimize gw tooling for various project types, automating setup, auto-copy, and troubleshooting for Next.js, Node.js, and
This skill autonomously delivers complete feature work using isolated git worktrees, from intake to tested PR delivery, ensuring safe parallel development.