Agent skill

Clean Merged Branch Folders

by jtenniswood in jtenniswood/espcontrol

Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main.

Custom licenceAuto-check passedDevelopment

Install Clean Merged Branch Folders

skills CLI
$ npx skills add jtenniswood/espcontrol --skill clean-merged-branch-folders -a claude-code

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

GitHub CLI
$ gh skill install jtenniswood/espcontrol clean-merged-branch-folders --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/jtenniswood/espcontrol.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clean-merged-branch-folders .claude/skills/clean-merged-branch-folders && 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
clean-merged-branch-folders
GitHub stars
1.1k
Token cost
~813 tokens
SKILL.md length
347 words
Files
3 (incl. scripts)
Skills in repo
14
Repo updated
First seen
Licence
Custom licence

At a glance

Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main.

  • Works in 4 steps: Check the Repository → Preview Cleanup Candidates → Remove Merged Worktree Folders → …
  • The user asks to remove merged branch folders
  • SKILL.md covers Overview, Workflow and Safety Rules
  • Runs Python scripts from its folder; calls git and python3

What it does

Clean Merged Branch Folders is an agent skill from jtenniswood/espcontrol. Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main. Use when the user asks to remove merged branch folders, tidy local worktrees, clean old feature branch directories, prune merged PR worktrees, or clean up local development folders without impacting main.

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `agents/openai.yaml` and `scripts/clean_merged_worktrees.py`).

It sits in Development, covering Git worktrees. It works with Git and GitHub. The repository describes itself as: Esphome based smart home control panel.

When your agent uses it

  • The user asks to remove merged branch folders
  • Tidy local worktrees
  • Clean old feature branch directories
  • Prune merged PR worktrees

Example prompts

  • “/clean-merged-branch-folders”

Requirements

  • Python 3

Workflow steps

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

  1. Check the Repository
  2. Preview Cleanup Candidates
  3. Remove Merged Worktree Folders
  4. Validate the Result

What it can do on your machine

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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python3

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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

Clean Merged Branch Folders loads about 813 tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 347 words of instructions outside code blocks.

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

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); the scripts in this folder 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 347 words (~813 tokens).

“Remove only local Git worktree folders whose branch is already merged to main. Keep main, the current worktree, dirty worktrees, detached worktrees, and unmerged branches untouched.”

— opening of SKILL.md by jtenniswood, Custom licence
name
clean-merged-branch-folders

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files (scripts) in .agents/skills/clean-merged-branch-folders of jtenniswood/espcontrol.

  • SKILL.md
  • agents/openai.yaml
  • scripts/clean_merged_worktrees.py

Open the folder on GitHubat commit 72cf82c

Compare with similar skills

Clean Merged Branch Folders 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.

Clean Merged Branch Folders compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clean Merged Branch Folders this skilljtenniswood/espcontrol1.1k—~813Automated safety check: PassCustom licence
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Ff Worktreesdamus-io/damus2.1k—~451Automated safety check: PassGPL-3.0
Fixexercism/website549—~1.2kAutomated safety check: NotesAGPL-3.0
Kanvibe Release Deployrookedsysc/kanvibe144—~12kAutomated safety check: NotesAGPL-3.0
Kc Issueimran31415/kube-coder388—~1.9kAutomated safety check: NotesMIT

Similar skills

  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Ff Worktrees

    damus-io/damus

    Fast-forward master and every git worktree branch up to a target ref (default github/master), skipping any worktree with unmerged commits.

    2.1k GitHub stars~451 tokensUpdated 29 days ago
    DevelopmentAuto-check passed
  • Fix

    exercism/website

    Fix a GitHub issue end-to-end — fetches issue, creates worktree, plans and implements fix, runs validation, opens PR, cleans up.

    549 GitHub stars~1.2k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Kanvibe Release Deploy

    rookedsysc/kanvibe

    A skill your agent uses whenever releasing or deploying KanVibe desktop from a clean, up-to-date dev checkout: ask only for the target version and release-note approval, then let the AI update…

    144 GitHub stars~12k tokensUpdated today
    DevelopmentAuto-check: notes
  • Kc Issue

    imran31415/kube-coder

    Spin up an isolated agent to work a GitHub issue of kube-coder or any other repo checked out in the workspace.

    388 GitHub stars~1.9k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Git Worktree Runner

    dyoshikawa/rulesync

    Manages git worktrees using git-worktree-runner (gtr). An agent skill from dyoshikawa/rulesync.

    1.5k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check: notes

More from jtenniswood/espcontrol

All 14 skills in this repo
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    Auto-check passed
  • Flash Displays

    jtenniswood/espcontrol

    Flash EspControl display firmware from this repository using ESPHome.

    1.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • PR

    jtenniswood/espcontrol

    Review a new or open pull request for this repository with an adversarial security and quality lens.

    1.1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Release

    jtenniswood/espcontrol

    Create and safely publish a new GitHub release for this repository through a verified draft build, then confirm the related GitHub Actions run.

    1.1k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Review All

    jtenniswood/espcontrol

    Review every open pull request authored by the user in this repository and address actionable unresolved review feedback.

    1.1k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Tech Debt Scan

    jtenniswood/espcontrol

    Research-only technical debt scan for this EspControl repository.

    1.1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Clean Merged Branch Folders

What does Clean Merged Branch Folders do?

Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main. Clean Merged Branch Folders is an agent skill from jtenniswood/espcontrol. Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main.

When should I use Clean Merged Branch Folders?

Clean Merged Branch Folders fits situations like: the user asks to remove merged branch folders; tidy local worktrees; clean old feature branch directories; prune merged PR worktrees.

How do I install Clean Merged Branch Folders in Claude Code?

Run `npx skills add jtenniswood/espcontrol --skill clean-merged-branch-folders -a claude-code`. Or copy the skill folder (.agents/skills/clean-merged-branch-folders in jtenniswood/espcontrol) into .claude/skills/clean-merged-branch-folders in your project. Claude Code loads it when a task matches its description.

How do I install Clean Merged Branch Folders in Codex?

Run `npx skills add jtenniswood/espcontrol --skill clean-merged-branch-folders -a codex`. Or copy the skill folder (.agents/skills/clean-merged-branch-folders in jtenniswood/espcontrol) into .agents/skills/clean-merged-branch-folders in your project. Codex loads it when a task matches its description.

Can I use Clean Merged Branch Folders 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 jtenniswood/espcontrol --skill clean-merged-branch-folders -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clean-merged-branch-folders, .gemini/skills/clean-merged-branch-folders, .github/skills/clean-merged-branch-folders and .opencode/skills/clean-merged-branch-folders in your project.

What does Clean Merged Branch Folders need to run?

Going by SKILL.md and its folder, Clean Merged Branch Folders needs Python for the scripts in its folder and the command-line tools its instructions call (git and python3). Our summary lists: Python 3.

Does Clean Merged Branch Folders access the network?

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

Is Clean Merged Branch Folders 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Clean Merged Branch Folders use?

Clean Merged Branch Folders 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 Clean Merged Branch Folders use?

About 813 tokens (SKILL.md is roughly 3.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 Clean Merged Branch Folders?

Skills that share tags, products or a category with Clean Merged Branch Folders: Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Ff Worktrees (damus-io/damus, 2.1k stars), Fix (exercism/website, 549 stars) and Kanvibe Release Deploy (rookedsysc/kanvibe, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Merged Branch Folders?

jtenniswood (a GitHub user) maintains it in jtenniswood/espcontrol, which has 1,091 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 11, 2026.

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