Agent skill

Nv Worktree Cleanup

by novuhq in novuhq/novu

Audits git worktrees and removes the ones that are safe to delete — merged into the base branch (including squash-merges via gh), missing on disk, or explicitly confirmed by the user — then deletes…

Custom licenceAuto-check passedDevelopment

Install Nv Worktree Cleanup

skills CLI
$ npx skills add novuhq/novu --skill nv-worktree-cleanup -a claude-code

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

GitHub CLI
$ gh skill install novuhq/novu nv-worktree-cleanup --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/novuhq/novu.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/nv-worktree-cleanup .claude/skills/nv-worktree-cleanup && 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
nv-worktree-cleanup
GitHub stars
40k
Token cost
~1.5k tokens
SKILL.md length
697 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
Custom licence

At a glance

Audits git worktrees and removes the ones that are safe to delete — merged into the base branch (including squash-merges via gh), missing on disk, or explicitly confirmed by the user — then deletes…

  • Works in 6 steps: Enumerate worktrees → Determine the base branch → Classify each worktree → …
  • The user asks to clean up worktrees
  • SKILL.md covers Hard rules, Workflow, Anti-patterns and Example session
  • Calls git and gh

What it does

Nv Worktree Cleanup is an agent skill from novuhq/novu. Audits git worktrees and removes the ones that are safe to delete — merged into the base branch (including squash-merges via gh), missing on disk, or explicitly confirmed by the user — then deletes the associated local branches and runs git worktree prune. Use when the user asks to clean up worktrees, prune worktrees, list stale worktrees, remove merged worktrees or branches, or reclaim disk space from old checkouts.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: The open-source communication infrastructure for agents and products.

When your agent uses it

  • The user asks to clean up worktrees
  • Prune worktrees
  • List stale worktrees
  • Remove merged worktrees

Example prompts

  • “Use the nv-worktree-cleanup skill to audit git worktrees and removes the ones that are safe to delete — merged into the base branch (including…”
  • “/nv-worktree-cleanup”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Enumerate worktrees
  2. Determine the base branch
  3. Classify each worktree
  4. Present the summary and get one consolidated approval
  5. Execute confirmed removals
  6. Finalize

What it can do on your machine

Read from SKILL.md and the folder at commit c4d3eda. 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

    Shell commands in SKILL.md call:

    • git
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    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

Nv Worktree Cleanup loads about 1.5k tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 697 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 697 words (~1,498 tokens).

“End state: stale, merged, and missing worktrees are removed; their local branches are deleted; git worktree prune has run; the user has signed off on every deletion.”

— opening of SKILL.md by novuhq, Custom licence
name
nv-worktree-cleanup
disable-model-invocation
true

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .cursor/skills/nv-worktree-cleanup of novuhq/novu.

Open the folder on GitHubat commit c4d3eda

Compare with similar skills

Nv Worktree Cleanup 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.

Nv Worktree Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nv Worktree Cleanup this skillnovuhq/novu40k—~1.5kAutomated safety check: PassCustom licence
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone

Similar skills

  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k 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
  • Worktree

    AgentsMesh/AgentsMesh

    Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

    2.4k GitHub stars~553 tokensUpdated 16 days ago
    DevelopmentAuto-check: notes
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    DevelopmentAuto-check passed

More from novuhq/novu

All 28 skills in this repo
  • Ink Tui Wizard

    novuhq/novu

    Build terminal user interfaces (TUIs) using Ink (React for CLIs) and @inkjs/ui with a reactive, session-driven wizard pattern.

    40k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Design notification workflows the Novu way — choose channels, set severity, decide when a workflow is critical, configure digests, and route based on subscriber state.

    40k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Integrate Novu's in-app notification inbox into web applications.

    40k GitHub stars~5.2k tokensUpdated today
    Auto-check passed
  • Configure notification preferences in Novu at the workflow and subscriber level.

    40k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Create, update, search, and delete subscribers in Novu. An agent skill from novuhq/novu.

    40k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Trigger Novu notification workflows to send messages across email, SMS, push, chat, and in-app channels.

    40k GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Nv Worktree Cleanup

What does Nv Worktree Cleanup do?

Audits git worktrees and removes the ones that are safe to delete — merged into the base branch (including squash-merges via gh), missing on disk, or explicitly confirmed by the user — then deletes…. Nv Worktree Cleanup is an agent skill from novuhq/novu. Audits git worktrees and removes the ones that are safe to delete — merged into the base branch (including squash-merges via gh), missing on disk, or explicitly confirmed by the user — then deletes the associated local branches and runs git worktree prune.

When should I use Nv Worktree Cleanup?

Nv Worktree Cleanup fits situations like: the user asks to clean up worktrees; prune worktrees; list stale worktrees; remove merged worktrees.

How do I install Nv Worktree Cleanup in Claude Code?

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

How do I install Nv Worktree Cleanup in Codex?

Run `npx skills add novuhq/novu --skill nv-worktree-cleanup -a codex`. Or copy the skill folder (.cursor/skills/nv-worktree-cleanup in novuhq/novu) into .agents/skills/nv-worktree-cleanup in your project. Codex loads it when a task matches its description.

Can I use Nv Worktree Cleanup 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 novuhq/novu --skill nv-worktree-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nv-worktree-cleanup, .gemini/skills/nv-worktree-cleanup, .github/skills/nv-worktree-cleanup and .opencode/skills/nv-worktree-cleanup in your project.

What does Nv Worktree Cleanup need to run?

Going by SKILL.md and its folder, Nv Worktree Cleanup needs the command-line tools its instructions call (git and gh).

Does Nv Worktree Cleanup access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Nv Worktree Cleanup 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 Nv Worktree Cleanup use?

Nv Worktree Cleanup has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Nv Worktree Cleanup use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Nv Worktree Cleanup?

Skills that share tags, products or a category with Nv Worktree Cleanup: Build Px4 macOS (PX4/PX4-Autopilot, 13k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars) and Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nv Worktree Cleanup?

novuhq (a GitHub organization) maintains it in novuhq/novu, which has 40,132 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 10, 2026.

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