Agent skill
using-git-worktrees
Repo-local workflow for isolated workspaces in this dotfiles repo. Prefer `issue-worktree-create` for issue execution, `pr-worktree-create` for PR review, `worktree-remove` for cleanup, and use `vde-worktree` only as supporting generic tooling (`list`, `status`, `path`, `cd`, `switch`). Use when work needs an isolated worktree, a clean review workspace, worktree status/path inspection, or safe cleanup.
Install this agent skill to your Project
npx add-skill https://github.com/i9wa4/dotfiles/tree/main/nix/home-manager/agents/skills/using-git-worktrees
SKILL.md
Using Git Worktrees
Use this skill to work in an isolated workspace without guessing the repo's entrypoint.
1. Core Defaults
- Prefer repo wrappers before generic
git worktreeorvde-worktreecreation flows. - Treat
config/vde/worktree/config.ymlas the local worktree policy source of truth. - Assume the managed root is
.worktrees, even if generic tool help mentions a different default. - Report the final worktree path and branch in handoff or status messages.
- Keep this skill focused on workspace isolation and inspection, not runtime activation or Nix switching.
2. Primary Repo Flows
Issue execution
- Run
issue-worktree-create <issue_number>from the repo. - Expect it to:
- fetch
origin - refresh
main - reuse an existing matching branch when present
- create a new linked worktree when needed
- copy
.envrcwhen available - run
repo-setupwhen available
- fetch
PR review
- Run
pr-worktree-create <pr_number>from the repo. - Expect it to:
- fetch
origin - refresh
main - resolve the PR head branch from GitHub
- create or reuse a linked review worktree
- copy
.envrcwhen available - run
repo-setupwhen available
- fetch
Cleanup
- Run
worktree-remove <path>for linked-worktree cleanup. - Accepted path styles:
- ghq-style path
- absolute path
- relative path
- Expect it to remove only linked worktrees, not a regular repository clone.
3. Supporting Generic Tooling
Use vde-worktree only as supporting generic tooling after checking whether the
wrapper flow already covers the task.
- Inspect all worktrees:
vde-worktree list --json
- Inspect one worktree:
vde-worktree status [branch] --json
- Resolve a branch to its absolute path:
vde-worktree path <branch> [--json]
- Pick a worktree interactively and
cdinto it:cd "$(vde-worktree cd)"
- Reuse or create a branch worktree as a generic fallback:
vde-worktree switch <branch>
Do not use vde-worktree as the primary issue or PR entrypoint in this repo.
4. Baseline Verification
After entering the chosen worktree, run the cheapest checks that prove you are in the right place before changing files.
pwdgit branch --show-currentgit status --short
Use one of these when the lane needs broader worktree visibility:
git worktree list --porcelainvde-worktree list --json
5. Repo Fit Notes
- This repo already exposes cleanup ergonomics through shell snippets, so keep
cleanup guidance aligned with
worktree-remove. - The repo may contain detached linked worktrees, so do not assume every linked worktree is a simple branch-only case.
- If the task is actually about changing worktree scripts or config, read those files in full and treat that as a code-change task, not a normal use of this skill.
6. Do Not Do These By Default
- Do not ask the user to choose an arbitrary worktree directory.
- Do not teach or rely on
vde-worktree extract,absorb,unabsorb,adopt, orgoneas part of the normal repo flow. - Do not edit
.gitignore,config/vde/worktree/config.yml, or the wrapper scripts unless the task is explicitly about those files.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
subagent-review
Argument-driven code/design review wrapper. Invokes reviewer sub-skills for each specified engine+tier label. Defaults to 'cc cx' (10 reviewers) if no arguments given. Argument format: space-separated labels from {cc, cc-deep, cx, cx-deep} Examples: 'cc cx' (default), 'cc-deep cx-deep', 'cc', 'cx-deep' Use when: - Running code reviews on PRs, commits, or branches - Running design reviews on issues or documents - Need multi-perspective review (security, architecture, code, QA, historian)
brainstorming
Ambiguity-reduction workflow for requests that are not yet plan-ready or implementation-ready. Use when there are multiple plausible approaches, the task is user-facing or design-shaping, requirements are fuzzy, or Codex needs to compare 2-3 options with trade-offs before choosing a direction.
databricks-local
Databricks local additions - Queries API, VARIANT/JSON, Dashboard API, dbt integration, Jupyter kernel Supplements the official `databricks` skill with project-specific patterns. Use when: - Working with Databricks Queries API (saved queries) - Handling VARIANT type or JSON operations - Working with Lakeview Dashboard API - Integrating dbt with Databricks JSON/VARIANT columns - Running Jupyter notebooks with Databricks kernel
codex-prompting-local
Portable Codex prompt, review-contract, and resume-handoff guidance adapted from codex-plugin-cc for this repo's Nix-managed Codex CLI and Claude Code setup. Use when: - Composing prompts for Codex or GPT-5.4-based subagents - Designing structured review or adversarial-review prompt contracts - Writing resumable task prompts or result handoffs - Re-expressing useful old slash-command workflows on the skills side instead of reviving slash commands
nix
Nix commands and package management guide. Use when: - Using nurl for hash acquisition
bigquery-local
BigQuery local additions - cost-aware query patterns and project conventions. Supplements general BigQuery knowledge with guardrails. Use when: - Running bq commands - Writing GoogleSQL queries - Designing partitioned/clustered tables
Didn't find tool you were looking for?