worktree
Manage git worktrees using git gtr — create, copy files, list, remove, and navigate. Use when the user invokes /worktree.
What this skill does
# /worktree — Manage Git Worktrees with `git gtr` The user has invoked `/worktree`. Help them manage git worktrees using the `git gtr` CLI (git worktree runner). ## Pre-flight Before running any `git gtr` command, verify it is installed: ```bash git gtr version ``` If the command fails, tell the user: > `git gtr` is not installed. Install it from https://github.com/coderabbitai/git-worktree-runner Do NOT proceed with any worktree operations until `git gtr` is available. ## Parse intent Interpret the user's free-form input after `/worktree` and map it to one of these intents: | User says | Intent | |--------------------------------------------------------------|-----------------------------------------------| | `/worktree my-feature` | **create** a worktree for branch `my-feature` | | `/worktree new my-feature --from-current` | **create** with options | | `/worktree copy my-feature -- ".env*"` | **copy** files to a worktree | | `/worktree list` or `/worktree ls` | **list** worktrees | | `/worktree rm my-feature` or `/worktree remove my-feature` | **remove** a worktree | | `/worktree go my-feature` or `/worktree navigate my-feature` | **navigate** guidance | If the intent is ambiguous, ask the user to clarify. ## Creating worktrees Run `git gtr new <branch>` with any options the user specified. Common options: - `--from <ref>` — create from a specific branch/tag/commit - `--from-current` — create from the current branch (for parallel variants) - `--no-copy` — skip copying configured files to the new worktree - `--no-fetch` — skip `git fetch` before creation - `-e, --editor` — open in editor after creation - `-a, --ai` — start AI tool after creation Example: ```bash git gtr new my-feature git gtr new my-feature --from-current git gtr new my-feature --from main --no-copy ``` After successful creation, tell the user how to access the worktree: - Open in editor: `git gtr editor my-feature` - Start AI session: `git gtr ai my-feature` - Navigate in terminal: `cd "$(git gtr go my-feature)"` ## Copying files Use `git gtr copy <target> [-- <pattern>...]` to copy files from the main repo to a worktree. **Always preview first** with `--dry-run` before copying, unless the user explicitly asks to skip the preview: ```bash git gtr copy my-feature --dry-run -- ".env*" ``` Then run without `--dry-run` to execute: ```bash git gtr copy my-feature -- ".env*" ``` Useful variations: - Copy using configured patterns: `git gtr copy my-feature` - Copy specific patterns: `git gtr copy my-feature -- ".env*" "*.json"` - Copy to all worktrees: `git gtr copy --all -- ".env*"` - Copy from a different worktree: `git gtr copy my-feature --from other-branch` ## Listing worktrees ```bash git gtr list ``` Show the output to the user. ## Removing worktrees **Always ask the user for confirmation before removing a worktree.** Present the command you will run: ```bash git gtr rm my-feature ``` Optional flags (only use if the user requests): - `--delete-branch` — also delete the git branch - `--force` — force removal of a dirty worktree Do NOT use `--force` unless the user explicitly asks for it. ## Navigation guidance The agent cannot `cd` into a worktree — it is anchored to the current project directory. Instead, tell the user how to navigate: - **Terminal**: `cd "$(git gtr go my-feature)"` - **Editor**: `git gtr editor my-feature` - **AI session**: `git gtr ai my-feature` - **Run a command in the worktree**: `git gtr run my-feature <command>` If the user wants to run a one-off command in the worktree, use `git gtr run`: ```bash git gtr run my-feature git status git gtr run my-feature npm test ``` ## Safety rules 1. Always verify `git gtr` is installed before running commands 2. Use `--dry-run` to preview copy operations before executing 3. Always confirm with the user before `git gtr rm` 4. Never use `--force` on `rm` unless the user explicitly requests it 5. Never use `--yes` to skip confirmations — let the user review
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.