Agent skill

Disciplined Worktree Promotion

by nathanmcnulty in nathanmcnulty/nathanmcnulty

Guides agents working in isolated git worktrees or short-lived branches on what to keep, discard or promote, so the accepted baseline branch stays clean.

UnlicenseAuto-check passedDevelopment

Install Disciplined Worktree Promotion

skills CLI
$ npx skills add nathanmcnulty/nathanmcnulty --skill disciplined-worktree-promotion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nathanmcnulty/nathanmcnulty disciplined-worktree-promotion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nathanmcnulty/nathanmcnulty.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/disciplined-worktree-promotion .claude/skills/disciplined-worktree-promotion && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
disciplined-worktree-promotion
GitHub stars
441
Token cost
~2.1k tokens
SKILL.md length
1,204 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Unlicense

At a glance

Guides agents working in isolated git worktrees or short-lived branches on what to keep, discard or promote, so the accepted baseline branch stays clean.

  • Works in 11 steps: Inspect before adding → Reduce or fix code first → New helpers are a last resort → …
  • Evaluating several experimental approaches in separate worktrees
  • SKILL.md covers Operating posture, Core rules, Promotion ledger and Recommended workflow, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill sets a working posture for exploratory changes. Start from the accepted baseline branch rather than automatically the repository default, keep one work item per worktree or branch, and treat experiments, benchmark spikes and risky ideas as disposable until they earn promotion. Creating and detecting worktrees is left to a separate `using-git-worktrees` skill.

Its core rules ask the agent to read existing code and notes before adding anything, to prefer deleting or tightening code over adding helpers or new layers, and to split ideas into small phases that can each be kept or dropped alone. Stash is ruled out as a way to carry work between experiments. Subagents or swarms may be used to challenge assumptions or run independent health checks, and conclusions are summarized as keep, discard, defer or needs-human-judgment.

When your agent uses it

  • Evaluating several experimental approaches in separate worktrees
  • Deciding which parts of a spike branch deserve to reach the baseline branch
  • Keeping a performance experiment apart from a correctness fix
  • Cleaning up exploratory branches without using stash as a handoff

Example prompts

  • “I tried three caching approaches in separate worktrees. Tell me which changes to keep and which to throw away.”
  • “Review this spike branch and list what should be promoted to the baseline branch.”
  • “Separate my benchmark experiment from the bug fix so each can be kept or discarded on its own.”

Requirements

  • A Git repository

Workflow steps

11 steps, taken from the first numbered list in SKILL.md.

  1. Inspect before adding
  2. Reduce or fix code first
  3. New helpers are a last resort
  4. Keep phases small and promotable
  5. Do not carry work with stash or hidden state
  6. Use swarms for challenge, not for noise
  7. Evidence beats plausibility
  8. Keep or discard decisively
  9. Promotion workflow
  10. PR hygiene
  11. Archive aggressively

What it can do on your machine

Read from SKILL.md and the folder at commit 1c0a52f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Disciplined Worktree Promotion loads about 2.1k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 1,204 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nathanmcnulty/nathanmcnulty at commit 1c0a52f, republished under its Unlicense licence (© nathanmcnulty). 1,204 words, ~2,076 tokens.

Download SKILL.mdSave it as .claude/skills/disciplined-worktree-promotion/SKILL.md (or your agent's skills folder).
name
disciplined-worktree-promotion
description
Use when evaluating changes in isolated worktrees or short-lived branches and deciding what to promote back to a clean baseline branch.

Disciplined Worktree Promotion

Use this skill to keep exploratory work disposable, promotion decisions evidence-based, and the accepted baseline branch clean.

Use using-git-worktrees for worktree creation and detection. This skill governs what to keep, what to discard, and when a change has earned promotion.

Operating posture

  • Start from the accepted baseline branch, not automatically the repository default branch.
  • Keep one work item per worktree or short-lived branch.
  • Treat exploratory edits, benchmark spikes, and risky ideas as disposable until they earn promotion.
  • Keep the baseline branch clean. Promote only deltas that survive review, tests, and proof runs.
  • Prefer a narrow, understandable change over a broad rewrite.

Core rules

  1. Inspect before adding

    • Read the existing implementation and prior notes first.
    • Look for simplification, deletion, or a tighter use of current code before inventing new structure.
  2. Reduce or fix code first

    • Prefer removing code, narrowing code paths, or reusing the current structure over introducing new moving parts.
    • If a problem can be solved by deleting redundant logic, collapsing a branch, tightening a condition, or clarifying ownership, do that first.
  3. New helpers are a last resort

    • Do not add helpers, abstractions, wrappers, coordinators, or new layers by default.
    • Only introduce a helper when the existing code cannot be kept clear and duplication is both real and worth preserving.
    • If you add a helper, explain why in concrete terms and keep it tightly scoped.
  4. Keep phases small and promotable

    • Prefer one meaningful concern per branch or phase.
    • If several ideas exist, split them into separate experiments so each one can be kept or discarded independently.
    • Avoid bundling speculative performance work with correctness fixes unless they are inseparable.
  5. Do not carry work with stash or hidden state

    • Do not use stash as a handoff mechanism between experiments.
    • If a delta is worth keeping, prove it and promote it.
    • If it is not worth keeping, discard the worktree or branch.
  6. Use swarms for challenge, not for noise

    • Use subagents or swarms to challenge assumptions, inspect code from fresh angles, or run independent health checks.
    • Do not use them to create churn or duplicate local investigation.
    • Summarize conclusions as keep, discard, defer, or needs-human-judgment.
  7. Evidence beats plausibility

    • Do not keep a change because it sounds faster or cleaner.
    • Run the focused tests for the touched area.
    • Run the repository validation that already exists.
    • When a change affects live service paths, run the smallest real-target proof that can disconfirm the change.
    • If the change only touches a narrow tagged or selectable slice, use that same narrow slice for the cloud or hosted proof first.
    • Widen from targeted cloud proof to broader proof only when the narrow proof is ambiguous, shared infrastructure changed, or the benchmark comparison is not trustworthy.
    • For reliability or performance work, compare against the accepted benchmark and judge results in this order:
      1. correctness and completeness
      2. warnings and failure behavior
      3. memory impact
      4. wall-clock time
  8. Keep or discard decisively

    • Keep a change only if the net result is clearly worth the complexity.
    • Discard experiments that introduce correctness ambiguity, regress memory materially, or add design weight without durable payoff.
    • Record future ideas instead of forcing them into the current branch.
  9. Promotion workflow

    • Do exploratory work on isolated branches or sessions.
    • When a delta proves itself, replay or preserve only the kept change on a clean baseline-derived branch.
    • Re-run the relevant proof on the promoted branch, not only on the experimental branch.
    • Do not drag discarded experiments, noisy commits, or convenience hacks into the promoted branch.
  10. PR hygiene

  • Explain the final kept changes in plain language.
  • Fix CI at the root cause; never bypass shared tooling just to get green.
  • Treat review threads as unfinished until you have replied and resolved them.
  • Keep the branch merge-ready, but do not merge unless explicitly asked.
  1. Archive aggressively
    • Once an exploratory branch has been promoted or discarded, it is safe to archive its worktree and conversation.
  • Keep only the active promotion context and anything still needed to complete the current review.

Promotion ledger

For each work item, record:

  • baseline branch name and baseline commit
  • worktree or branch name
  • concise hypothesis
  • focused local validation commands
  • targeted cloud or hosted proof command and selected tests or tags
  • benchmark used for correctness, memory, and time comparison
  • keep, discard, or defer decision

If work spans more than one repository, package, or deployable unit, record every relevant baseline SHA or version and the exact artifact or bundle used for proof.

Show full SKILL.md (458 more words)Show less
  1. Start from a clean worktree on the accepted baseline branch, unless this is explicitly stacked work.
  2. Read the current code, prior notes, and existing tests before deciding on structure changes.
  3. Write down the smallest viable change that could solve the problem.
  4. Challenge that plan:
    • Can existing code be reduced instead?
    • Can a branch be removed?
    • Can a current helper be reused?
    • Is a new abstraction actually necessary?
  5. If the work is risky or subtle, use subagents for code review, idea scouting, or benchmark-plan validation.
  6. Implement the smallest viable delta.
  7. Run focused tests first, then the repo validation that already exists.
  8. If the change touches a narrow tagged or selectable slice, run the matching narrow cloud or hosted proof before any broader proof.
  9. For shared-runtime, live-service, perf, or reliability changes, compare against the current accepted benchmark for correctness, memory, and time.
  10. Make a keep/discard call:
    • Keep if correctness is solid and the tradeoff is worth it.
    • Discard if the gain is noisy, marginal, or correctness becomes less trustworthy.
    • Defer if the idea is real but adds too much complexity for the current branch.
  11. If kept, promote the clean delta, rerun proof on the promoted branch, then commit.
  12. If the narrow cloud proof or benchmark regresses, stop and report the regression before promoting.
  13. Clean up the experimental worktree or branch before starting the next work item.

Cleanup gate

Do not start the next work item until all of these are true:

  • baseline branch is clean
  • current worktree or branch has a final keep, discard, or defer decision
  • no leftover stash is carrying unresolved work
  • temporary worktree or branch cleanup is complete, or there is an explicit reason it must stay open
  • promotion ledger is updated

Decision heuristics

  • Prefer reliability over raw speed.
  • Prefer clarity over cleverness.
  • Prefer local edits over framework-building.
  • Prefer a proven small win over a larger uncertain redesign.
  • Prefer recording a future idea over shipping half of a design.

What to avoid

  • Broad rewrites when a local fix exists.
  • New helpers created only to move code around.
  • Bundling unrelated changes to save time.
  • Starting a second work item before the first has a keep/discard decision.
  • Using stash to shuttle unfinished work between branches.
  • Treating flaky or suspicious output as success.
  • Treating unexercised live-service paths as proven.
  • Keeping a performance change that increases risk without durable benefit.
  • Making CI pass by weakening tests or bypassing tooling.

Output style for this skill

When reporting progress or results:

  • Lead with the keep/discard/result.
  • Say plainly what changed and why it was worth keeping.
  • If something is deferred, label it clearly as future work, not hidden scope.
  • When uncertain, say what evidence is missing instead of guessing.

© nathanmcnulty, Unlicense. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/disciplined-worktree-promotion of nathanmcnulty/nathanmcnulty.

Open the folder on GitHubat commit 1c0a52f

Compare with similar skills

Disciplined Worktree Promotion next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Disciplined Worktree Promotion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Disciplined Worktree Promotion this skillnathanmcnulty/nathanmcnulty441—~2.1kAutomated safety check: PassUnlicense
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
Git Worktree Managermicrosoft/WindowsAppSDK4.7k—~2kAutomated safety check: PassMIT
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Manager

    microsoft/WindowsAppSDK

    Official

    Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.

    4.7k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Git Commit

    tisfeng/Easydict

    起草、创建或汇报 Angular-style 本地 Git 提交。用于明确的提交交付;分支集成使用 worktree-rebase-merge,不 push。

    15k GitHub stars~535 tokensUpdated 4 days ago
    DevelopmentAuto-check passed

Works with

Categories

Questions about Disciplined Worktree Promotion

What does Disciplined Worktree Promotion do?

Guides agents working in isolated git worktrees or short-lived branches on what to keep, discard or promote, so the accepted baseline branch stays clean. The skill sets a working posture for exploratory changes. Start from the accepted baseline branch rather than automatically the repository default, keep one work item per worktree or branch, and treat experiments, benchmark spikes and risky ideas as disposable until they earn promotion.

When should I use Disciplined Worktree Promotion?

Disciplined Worktree Promotion fits situations like: evaluating several experimental approaches in separate worktrees; deciding which parts of a spike branch deserve to reach the baseline branch; keeping a performance experiment apart from a correctness fix; cleaning up exploratory branches without using stash as a handoff.

How do I install Disciplined Worktree Promotion in Claude Code?

Run `npx skills add nathanmcnulty/nathanmcnulty --skill disciplined-worktree-promotion -a claude-code`. Or copy the skill folder (skills/disciplined-worktree-promotion in nathanmcnulty/nathanmcnulty) into .claude/skills/disciplined-worktree-promotion in your project. Claude Code loads it when a task matches its description.

How do I install Disciplined Worktree Promotion in Codex?

Run `npx skills add nathanmcnulty/nathanmcnulty --skill disciplined-worktree-promotion -a codex`. Or copy the skill folder (skills/disciplined-worktree-promotion in nathanmcnulty/nathanmcnulty) into .agents/skills/disciplined-worktree-promotion in your project. Codex loads it when a task matches its description.

Can I use Disciplined Worktree Promotion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nathanmcnulty/nathanmcnulty --skill disciplined-worktree-promotion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/disciplined-worktree-promotion, .gemini/skills/disciplined-worktree-promotion, .github/skills/disciplined-worktree-promotion and .opencode/skills/disciplined-worktree-promotion in your project.

What does Disciplined Worktree Promotion need to run?

SKILL.md names no scripts, command-line tools or credentials: Disciplined Worktree Promotion is instructions for the agent only. Our summary lists: A Git repository.

Does Disciplined Worktree Promotion access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Disciplined Worktree Promotion safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Disciplined Worktree Promotion use?

Disciplined Worktree Promotion is published under the Unlicense licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Disciplined Worktree Promotion use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Disciplined Worktree Promotion?

Skills that share tags, products or a category with Disciplined Worktree Promotion: Finishing a Development Branch (obra/superpowers, 297k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Git Worktree Manager (microsoft/WindowsAppSDK, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Disciplined Worktree Promotion?

nathanmcnulty (a GitHub user) maintains it in nathanmcnulty/nathanmcnulty, which has 441 GitHub stars. The repository was last updated on September 20, 2026.

Source: nathanmcnulty/nathanmcnulty on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.