wt-create
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates an isolated git worktree with smart directory selection and safety verification
What this skill does
# Create Git Worktree
## Script Location
**Scripts live next to this SKILL.md, not in the user's project.** Before
running any script, determine the directory containing this SKILL.md file. Use
that absolute path as `{SKILL_DIR}` when constructing script paths below.
## Overview
Git worktrees create isolated workspaces sharing the same repository, allowing
work on multiple branches simultaneously without switching.
**Announce at start:** "I'm using the wt-create skill to set up an
isolated workspace."
## Script Reference
This skill uses a single unified CLI script for all worktree operations:
| Script | Description | Reference |
| --------------------- | ----------------------------------------------------------------- | ------------------------ |
| `scripts/worktree.py` | Creates worktrees, syncs config files, and runs post-create hooks | `references/worktree.md` |
This script must be run with `uv` because it requires extra dependencies.
```bash
uv run {SKILL_DIR}/scripts/worktree.py <subcommand> [args...]
```
You should read the reference file for specifics about a subcommand's arguments,
output format, and error handling.
## Prerequisites
This skill accepts a **branch name** as the only argument. The branch can be
new (will be created) or existing (will be checked out).
All prerequisite checks (default branch detection, branch verification, and
freshness against origin) are handled by the `scripts/worktree.py create`
subcommand.
The `create` subcommand must be run as the first step in the process of creating
a worktree.
## Directory Selection Process
### 1. Worktree Directories Location
Worktree directories should be created in the parent directory of the primary
git repository, not inside it. This prevents pollution of the main workspace.
For example, if the current repository is at
`/Users/jesse/Code/myproject/myproject`, the new worktree directory should be
created in `/Users/jesse/Code/myproject/<worktree-dir-name>`.
### 2. Ask User If New Directory Doesn't Follow Conventions
If following the convention outlined above will result in a new worktree
directory that is outside of the project or in a directory that does not seem
right, prompt the user with information about your concern and ask where they
would like to create the worktree directory. For example:
```text
Creating a worktree directory at <path> does not conform to worktree directory conventions because <reason>.
Where should I create worktrees?
```
The directory is specified with the `--parent-dir` argument to the `create`
subcommand.
## Creation Steps
**Important:** Do not run any git commands directly (e.g., `git rev-parse`,
`git branch`). The `scripts/worktree.py` script handles all git operations
internally and its JSON output provides everything needed for this skill.
**Steps must be executed sequentially.** Each step depends on the previous
step completing successfully. Do not run any steps in parallel.
### 1. Setup & Create Worktree
```bash
uv run {SKILL_DIR}/scripts/worktree.py create <BRANCH_NAME> [--parent-dir <path>]
```
The script outputs JSON to stdout. Parse the result and handle accordingly:
| `status` | Meaning | Action |
| --------------- | ------------------------------- | ----------------------------------------------------------- |
| `success` | Worktree created | Continue to step 2. Use `worktree_path` from the output. |
| `wrong_branch` | Not on the default branch | Ask user to switch to `default_branch`, then re-run step 1. |
| `error` | Something else went wrong | Show `message` to the user and stop. |
### 2. Setup Worktree (Sync + Hooks)
```bash
uv run {SKILL_DIR}/scripts/worktree.py setup <worktree_path>
```
Where `<worktree_path>` is the `worktree_path` value from step 1's JSON output.
Combines sync and post-create hooks into one invocation:
1. Reads the `copy` list from `.worktreerc.yml` (or `.worktreerc.yaml`) in the
main worktree and copies matching files (e.g., `.env`, IDE settings) that are
gitignored but needed for the project.
2. Reads the `post_create` list and executes each command in the new worktree
directory. Stops on first failure.
Safe to skip if there is no `.worktreerc.yml`/`.yaml` — the script handles that
gracefully.
### 3. Report Location
```text
Worktree ready at <full-path>
Branch: <branch> (<new branch|existing branch> based on <default_branch> at <base_sha>)
```
## Quick Reference
| Situation | Action |
| ----------------------------------- | -------------------------------------------------- |
| Not on default branch | Script returns `wrong_branch` — ask user to switch |
| Branch name has slashes | Script sanitizes: replaces `/` with `-` in path |
| `.worktreerc.yml`/`.yaml` exists | Sync matching files and run post-create hooks |
| `.worktreerc.yml`/`.yaml` not found | Sync and hooks skip gracefully (exit 0) |
| Branch already exists | Script checks out existing branch instead of `-b` |
| Hook command fails | Stops immediately, reports which command failed |
## Common Mistakes
### Creating worktree from non-default branch
- **Problem:** Worktree diverges from a stale base, not the latest mainline
- **Fix:** The setup script enforces this — handle `wrong_branch` status
## Red Flags
**Never:**
- Ignore `wrong_branch` or `error` status from the setup script
- Run git commands directly — the script handles all git operations
- Run `{SKILL_DIR}/scripts/worktree.py sync` with `python` directly — it requires `uv` for
dependencies
- Run steps in parallel — each step depends on the previous one completing
**Always:**
- Use `{SKILL_DIR}/scripts/worktree.py create` for creation (handles branch verification +
freshness)
- Run `{SKILL_DIR}/scripts/worktree.py setup` after creating the worktree
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.