BehindTheMusicTree

Cleanup Session — DevOps skill for Claude Code

DevOps community

After a feature/fix/release is done, remove this repo's dev leftovers — merged branches, their worktrees, and docker containers/networks/images.

How to install Cleanup Session

Installs to ~/.claude/skills/behindthemusictree-agent-config-cleanup-session/SKILL.md

Terminal
mkdir -p ~/.claude/skills/behindthemusictree-agent-config-cleanup-session && curl -fsSL https://raw.githubusercontent.com/BehindTheMusicTree/agent-config/HEAD/commands/cleanup-session.md -o ~/.claude/skills/behindthemusictree-agent-config-cleanup-session/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Cleanup Session does


description: After a feature/fix/release is done, remove this repo's dev leftovers — merged branches, their worktrees, and docker containers/networks/images. model: sonnet

Clean up the current repo after a finished session. Everything runs through `scripts/cleanup-session.sh` (branch/worktree logic is `clean-repos.sh` scoped to this repo, then docker). Always confirm before deleting.

Optional flags: **$ARGUMENTS** — pass through as-is: `--local-only`, `--remote-only`, `--exclude

Alternatives in DevOps

  • Composio Split — Manage Split feature flags and experiments 44.6k ★
  • Ship Release — Systematic release workflow for RTK: build verification, version bump, changelog update, git tag, and push to 11.9k ★
  • Packer Builders — Create machine images with HashiCorp Packer 465 ★

Full documentation available on GitHub

View Source Repository