using-git-worktrees
Chooses single-branch or wt-stack review topology and uses task-specific Git worktrees before changing files in a repository.
Skill by chadxz
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/chadxz-using-git-worktrees
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/using-git-worktrees
What's inside
- Skill name
using-git-worktrees- Description
- Chooses single-branch or wt-stack review topology and uses task-specific Git worktrees before changing files in a repository. Use for repository edits, non-trivial work with ordered review units, and workspaces managed by Conductor.build, Cursor, Codex.app, Claude Code, or other coding agents.
- License
- MIT
- Instructions
- 262 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- openai.yaml · agents/
- resolve-worktree · scripts/
- test-resolve-worktree · scripts/
SKILL.md (first lines)
# Using Git Worktrees Use this before changing files in a Git repo. The goal is to keep each task in its own working tree, branch, dependencies, and verification state. Chad's repositories use the bare container layout owned by the `cloning-repositories` skill: a bare repository at `<repo>/.git` with worktrees directly under `<repo>/`, and the default branch worktree at `<repo>/main`. Read that skill for clone commands and layout details. Do not use a normal checkout at the repository root and do not put task worktrees under `.worktrees/`. ## When to use this Use the workflow for file-changing work inside a Git repository. Skip it for read-only tasks, discussion, research, or commands that do not modify repo files. ## Start with the current state Resolve an existing worktree before running status, diff, build, test, or file-changing commands. Run the bundled read-only resolver from this skill's directory: ```bash scripts/resolve-worktree --cwd "$PWD" --mode write ``` When the task names a repository, branch, or pull request, pass it directly: ```bash scripts/resolve-worktree \ --repo ~/src/convergint/ee-monorepo \ --branch agent/fix-sftp-tenant-validation \ --mode write scripts/resolve-worktree \ --pr convergint/ee-monorepo#5678 \ --mode write ``` The resolver never creates a branch or worktree. It reports the repository container, selected worktree, branch, head SHA, dirty state, default-branch status, mise trust state, and whether a pull request worktree matches the current PR head. Use its absolute `worktree` value as the working directory for every later command. The resolver requires Bash and Git. JSON output requires `jq`, and pull request resolution also requires `gh`. Write mode refuses the default-branch worktree unless `--allow-main` is explicitly provided. If no matching worktree exists, continue through the topology decision below and create one only after choosing a single branch or Stack. Re-run the resolver after creation to verify the selected checkout. Treat unrelated dirty work as user-owned. Do not move, stage, revert, clean, or overwrite another checkout's changes unless the user explicitly asks. ## Keep the default worktree current Fetch the remote default branch before using it as the base for a new task worktree. Also fetch whenever status, branch comparisons, or another command shows that the default-branch worktree may be behind: ```bash git -C <repo-container> fetch origin <default-branch> git -C <main-worktree> status --short --branch git -C <main-worktree> rev-list --left-right --count \ <default-branch>...origin/<default-branch> ``` The counts are local-ahead and local-behind, in that order. When the default worktree is clean and the counts are `0 N`, where `N` is greater than zero, update it immediately without waiting for another request: ```bash scripts/resolve-worktree \ --repo <repo-container> \ --main \ --mode write \ --allow-main git -C <main-worktree> merge --ff-only origin/<default-branch> ``` `--allow-main` applies only to this synchronization. Do not make task changes in the default worktree. If the default worktree is dirty, ahead, or diverged, do not stash, reset, rebase, merge, or overwrite it. Treat its state as user-owned and report why a safe fast-forward was not possible. Base new work on the fetched remote default branch when that lets the task continue without modifying the blocked worktree. ## Choose the necessary scope Before choosing branches, state the observed failure and the behavior the user needs after the fix. Find the boundary responsible for that failure and check its existing configuration and supported interfaces first. Choose the smallest safe change that delivers that behavior. For each proposed migration, abstraction, helper script, release change, test harness, or operating procedure, ask whether the requested fix would still work without it. Leave out work that isn't needed for the outcome. Keep prerequisites required for correctness, safety, or compatibility in scope and explain why they're needed. A dependency bot that can't look up a private Terraform provider may only need a registry URL override and scoped credentials. Changing the application's provider source, installation workflow, state, and release pipeline requires a separate reason; sharing the same provider doesn't make those changes necessary. If a narrow fix starts requiring a migration guide, a new wrapper, or several layers of validation scaffolding, reconsider the boundary before adding more. Prefer existing validation commands and a focused check of the failed behavior. Complete the requested fix and surface useful broader improvements separately; don't make them prerequisites or create follow-up work without a request. ## Choose the review topology Decide how reviewers should receive the work before creating the first task
From chadxz/prompts, MIT.
More from chadxz/prompts
- 0.609score
briefing-engineering-leadership
chadxz
Creates a manager-facing weekly engineering outcomes brief as a one-page PDF after a research-informed interview.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
developing-temporal-applications
chadxz
Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
generating-narrated-audio
chadxz
Generates narrated MP3 audio from text or Markdown files by first producing a TTS-friendly intermediate version, then using Kokoro through oMLX in one…
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reporting-work-activity
chadxz
Builds, refreshes, or visually redesigns the bundled Convergint activity report runtime under `assets/activity-report-runtime`.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reviewing-agent-sessions
chadxz
Reviews a calendar month of local Codex sessions and their follow-up tasks to improve agent interactions.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reviewing-complex-work
chadxz
Runs one independent, read-only peer-agent review through an alternate CLI.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
writing-diataxis-documentation
chadxz
Uses Diataxis to classify reader needs and write or revise tutorials, how-to guides, technical reference, explanations, and documentation sets.
SkillAFreshness: A★ 3Claude Code +9 - 0.606score
building-go-applications
chadxz
Build, modify, review, and debug Go applications using Convergint Go conventions.
SkillAFreshness: A★ 3Claude Code +9 - 0.605score
managing-datadog
chadxz
Manages Datadog dashboards, SLOs, monitors, and synthetic tests as code — push (create/update), pull (download), and list resources via the Datadog API.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
creating-skills
chadxz
Creates and updates portable Agent Skills across Codex, Claude, Zed, Pi, and other agent runtimes.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
managing-stacked-changes
chadxz
Plans, creates, updates, publishes, merges, and retires dependent GitHub pull requests with wt-stack in Chad's bare sibling-worktree layout.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
managing-temporal-cloud-resources
chadxz
Manage Convergint Temporal Cloud resources from a local machine using Chad's configured Temporal CLI profiles and Temporal Cloud API keys.
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 16, 2026 (13 days ago)
- Last release
- Oct 15, 2026 (15 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/chadxz/prompts
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from chadxz
- 0.609score
generating-narrated-audio
chadxz
Generates narrated MP3 audio from text or Markdown files by first producing a TTS-friendly intermediate version, then using Kokoro through oMLX in one…
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reviewing-agent-sessions
chadxz
Reviews a calendar month of local Codex sessions and their follow-up tasks to improve agent interactions.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
briefing-engineering-leadership
chadxz
Creates a manager-facing weekly engineering outcomes brief as a one-page PDF after a research-informed interview.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
developing-temporal-applications
chadxz
Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reporting-work-activity
chadxz
Builds, refreshes, or visually redesigns the bundled Convergint activity report runtime under `assets/activity-report-runtime`.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
reviewing-complex-work
chadxz
Runs one independent, read-only peer-agent review through an alternate CLI.
SkillAFreshness: A★ 3Claude Code +9
Cite this page
using-git-worktrees skill. Agent Mart. https://agentmart.dev/skills/chadxz-using-git-worktrees (last updated 2026-10-24)