Agent skill

Cleanup Complete Branches

by jtenniswood in jtenniswood/esphome-media-player

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

Custom licenceAuto-check passedDevelopment

Install Cleanup Complete Branches

skills CLI
$ npx skills add jtenniswood/esphome-media-player --skill cleanup-complete-branches -a claude-code

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

GitHub CLI
$ gh skill install jtenniswood/esphome-media-player cleanup-complete-branches --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/esphome-media-player.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cleanup-complete-branches .claude/skills/cleanup-complete-branches && 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
cleanup-complete-branches
GitHub stars
234
Token cost
~670 tokens
SKILL.md length
257 words
Files
3 (incl. scripts)
Skills in repo
8
Repo updated
First seen
Licence
Custom licence

At a glance

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

  • Works in 3 steps: Start With A Preview → Apply The Cleanup → Optional Cases
  • The user says /cleanup-complete-branches
  • SKILL.md covers Workflow, Safety Rules and Reporting
  • Runs Python scripts from its folder; calls python3

What it does

Cleanup Complete Branches is an agent skill from jtenniswood/esphome-media-player. Clean up completed Git branches and worktrees for this repository, both locally and on GitHub. Use when the user says "/cleanup-complete-branches", "$cleanup-complete-branches", "clean up complete branches", "remove merged branches", "delete completed worktrees", "prune old worktrees", or asks to remove local and remote branches after pull requests are merged or closed.

Its SKILL.md is about 670 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/cleanup_complete_branches.py`).

It sits in Development, covering Git worktrees, Git workflow and Pull requests. It works with GitHub. The repository describes itself as: Touch screen display for showing cover artwork from any Home Assistant media entity.

When your agent uses it

  • The user says /cleanup-complete-branches
  • $cleanup-complete-branches
  • Clean up complete branches
  • Remove merged branches

Example prompts

  • “/cleanup-complete-branches”
  • “$cleanup-complete-branches”
  • “clean up complete branches”
  • “/cleanup-complete-branches”

Requirements

  • Python 3

Workflow steps

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

  1. Start With A Preview
  2. Apply The Cleanup
  3. Optional Cases

What it can do on your machine

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

    • python3

    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

Cleanup Complete Branches loads about 670 tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 257 words of instructions outside code blocks.

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

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 257 words (~670 tokens).

“Remove completed worktrees, local branches, and GitHub branches without touching active work.”

— opening of SKILL.md by jtenniswood, Custom licence
name
cleanup-complete-branches

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files (scripts) in .agents/skills/cleanup-complete-branches of jtenniswood/esphome-media-player.

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

Open the folder on GitHubat commit 8ab172b

Compare with similar skills

Cleanup Complete Branches 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.

Cleanup Complete Branches compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cleanup Complete Branches this skilljtenniswood/esphome-media-player234—~670Automated safety check: PassCustom licence
Codewhale Landing Workflowcodewhale-hq/Codewhale41k—~1.6kAutomated safety check: PassMIT
Clean Complete Branchesjtenniswood/espcontrol1.1k—~820Automated safety check: PassCustom licence
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • 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
    DevelopmentAuto-check passed
  • 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
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from jtenniswood/esphome-media-player

All 8 skills in this repo
  • Compile

    jtenniswood/esphome-media-player

    Test compile ESPHome firmware for all devices using Docker and fix any YAML or configuration errors until every device compiles successfully.

    234 GitHub stars~779 tokensUpdated 1 mo ago
    Auto-check passed
  • Expert Reset

    jtenniswood/esphome-media-player

    Reimagine this repository from first principles using the current product and user experience as the target.

    234 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Expertreview

    jtenniswood/esphome-media-player

    Provide an expert codebase review for this repository. An agent skill from jtenniswood/esphome-media-player.

    234 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Flash Devices

    jtenniswood/esphome-media-player

    Flash ESPHome firmware to physical EspControl devices. An agent skill from jtenniswood/esphome-media-player.

    234 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • PR Review

    jtenniswood/esphome-media-player

    Address GitHub pull request feedback for this repository. An agent skill from jtenniswood/esphome-media-player.

    234 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Release

    jtenniswood/esphome-media-player

    Create and publish a new GitHub release for this repository, then verify that the related GitHub Actions firmware release build starts.

    234 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Cleanup Complete Branches

What does Cleanup Complete Branches do?

Clean up completed Git branches and worktrees for this repository, both locally and on GitHub. Cleanup Complete Branches is an agent skill from jtenniswood/esphome-media-player. Clean up completed Git branches and worktrees for this repository, both locally and on GitHub.

When should I use Cleanup Complete Branches?

Cleanup Complete Branches fits situations like: the user says /cleanup-complete-branches; $cleanup-complete-branches; clean up complete branches; remove merged branches.

How do I install Cleanup Complete Branches in Claude Code?

Run `npx skills add jtenniswood/esphome-media-player --skill cleanup-complete-branches -a claude-code`. Or copy the skill folder (.agents/skills/cleanup-complete-branches in jtenniswood/esphome-media-player) into .claude/skills/cleanup-complete-branches in your project. Claude Code loads it when a task matches its description.

How do I install Cleanup Complete Branches in Codex?

Run `npx skills add jtenniswood/esphome-media-player --skill cleanup-complete-branches -a codex`. Or copy the skill folder (.agents/skills/cleanup-complete-branches in jtenniswood/esphome-media-player) into .agents/skills/cleanup-complete-branches in your project. Codex loads it when a task matches its description.

Can I use Cleanup Complete Branches 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/esphome-media-player --skill cleanup-complete-branches -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cleanup-complete-branches, .gemini/skills/cleanup-complete-branches, .github/skills/cleanup-complete-branches and .opencode/skills/cleanup-complete-branches in your project.

What does Cleanup Complete Branches need to run?

Going by SKILL.md and its folder, Cleanup Complete Branches needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Cleanup Complete Branches 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 Cleanup Complete Branches 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 Cleanup Complete Branches use?

Cleanup Complete Branches 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 Cleanup Complete Branches use?

About 670 tokens (SKILL.md is roughly 2.7k 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 Cleanup Complete Branches?

Skills that share tags, products or a category with Cleanup Complete Branches: Codewhale Landing Workflow (codewhale-hq/Codewhale, 41k stars), Clean Complete Branches (jtenniswood/espcontrol, 1.1k stars), Finishing a Development Branch (obra/superpowers, 297k stars) and Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cleanup Complete Branches?

jtenniswood (a GitHub user) maintains it in jtenniswood/esphome-media-player, which has 234 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on August 20, 2026.

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