init-worktrees
Restructures a git project's directories so all worktrees (including main) are siblings under a common parent. Use when setting up a project for the sibling-worktree layout.
What this skill does
# Initialize Sibling Worktree Layout
Restructures a project so that all worktrees (including the main one) live as sibling directories under a common parent:
```
~/projects/my-repo/ # parent container (not a git repo)
main/ # primary worktree
feature-branch/ # linked worktree
bugfix/ # linked worktree
```
## Current State
Current directory:
!`pwd`
Git root:
!`git rev-parse --show-toplevel`
Git common dir:
!`git rev-parse --git-common-dir`
Worktree list:
!`git worktree list`
.git type:
!`test -f .git && echo "file (linked worktree)" || echo "directory (main worktree)"`
## Workflow
### Step 1: Detect Scenario
Determine which scenario applies:
1. **Already structured** -- The parent directory of the current git root contains at least one sibling directory that is a worktree of the same repo (check sibling `.git` files pointing to the same git common dir). Report this and stop.
2. **Simple clone** -- `.git` is a directory and `git worktree list` shows only one entry. Needs wrapping in a parent directory.
3. **Clone with external worktrees** -- `.git` is a directory and `git worktree list` shows multiple entries. Needs wrapping plus relocation of linked worktrees.
If the current directory is a linked worktree (`.git` is a file), resolve the main worktree location from the git common dir and assess from there.
### Step 2: Confirm with User
Present the detected scenario and the planned directory moves. For scenarios 2 and 3, list every move that will happen. Warn about:
- IDE/editor workspace paths needing manual update after the restructure
- Submodules (if `.gitmodules` exists) potentially needing re-initialization
Ask the user to confirm before proceeding. For scenario 1, just report and stop.
### Step 3: Execute
First, `cd` to the parent directory of the repo so that CWD remains valid throughout the moves.
```bash
REPO_DIR=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_DIR")
PARENT_DIR=$(dirname "$REPO_DIR")
TEMP_NAME="${REPO_NAME}__init_worktrees_tmp"
cd "$PARENT_DIR"
mv "$REPO_NAME" "$TEMP_NAME"
mkdir -p "$REPO_NAME"
mv "$TEMP_NAME" "$REPO_NAME/main"
```
**If there are linked worktrees** (scenario 3), continue with these additional phases:
**Phase A: Record worktree info.** Before the moves above, parse `git worktree list --porcelain` to collect each linked worktree's absolute path and branch.
**Phase B: Fix linked worktree references.** After moving main, each linked worktree's `.git` file contains a `gitdir:` path pointing to the old main location. Update each one:
```bash
# For each linked worktree at $LINKED_PATH:
OLD_GITDIR=$(cat "$LINKED_PATH/.git" | sed 's/gitdir: //')
NEW_GITDIR=$(echo "$OLD_GITDIR" | sed "s|$OLD_REPO_DIR/.git|$NEW_MAIN_DIR/.git|")
echo "gitdir: $NEW_GITDIR" > "$LINKED_PATH/.git"
```
**Phase C: Move linked worktrees.** From the new main directory, use `git worktree move` for each linked worktree:
```bash
cd "$NEW_MAIN_DIR"
git worktree move "$OLD_LINKED_PATH" "$NEW_PARENT/$DIRNAME"
```
Directory names use the final segment of the branch name (e.g., `feat/login` becomes `login`). Append a numeric suffix if the name collides with an existing directory.
**Phase D: Clean up.** Remove empty directories left behind by the moves using `rmdir` (non-recursive, safe to fail).
### Step 4: Verify
From the new main directory:
```bash
cd "$NEW_MAIN_DIR"
git worktree list
git status
```
For each linked worktree, verify `git status` works from within it.
### Step 5: Report
Tell the user:
- The new directory structure (list all worktree paths)
- How to navigate to main: `cd <new-main-path>`
- Reminder to update IDE/editor workspace settings pointing to the old location
- That `/create-worktree` will now place new worktrees as siblings automatically
## Guidelines
- Always confirm with the user before making changes.
- `cd` to the parent directory before starting moves so CWD stays valid throughout.
- If any `mv` or `git worktree move` command fails, stop and report the error. Do not attempt partial rollback.
- Directory names for linked worktrees use the final segment of the branch name. Append a numeric suffix on collision.
- Never run from inside a linked worktree -- resolve to the main worktree first.
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.