team-cleanup

team-cleanup is a skill for Claude Code from bryanweaver/claude-agent-kit. It costs 19 tokens per session (779 once invoked), scanned A, original, MIT.

A guided code-maintenance workflow for finding technical debt—older or awkward code that makes changes harder—and improving it through focused refactoring.

In plain words
What is it for?
Use it to inspect a chosen area for code smells, slow points, and refactoring opportunities, then apply, test, document, and submit the improvements.
Why use it?
It gives code cleanup a review step, separates application and data-layer work, and checks that the changes still pass the tests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the team plugin — 17 skills, 7 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/bryanweaver/claude-agent-kit/team-cleanup
Any agent
npx skills add bryanweaver/claude-agent-kit --skill team-cleanup
Clone the repo
git clone --depth 1 https://github.com/bryanweaver/claude-agent-kit

Made for: Claude Code.

Or install team, the plugin that ships this one along with the rest of its 17 skills, 7 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for team-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/bryanweaver/claude-agent-kit/team-cleanup.svg)](https://agentmods.dev/skills/bryanweaver/claude-agent-kit/team-cleanup)
Your own site
<a href="https://agentmods.dev/skills/bryanweaver/claude-agent-kit/team-cleanup"><img src="https://agentmods.dev/badge/skills/bryanweaver/claude-agent-kit/team-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00779
Opus 5 $0.00010 $0.00390
Sonnet 5 $0.00004 $0.00156
Haiku 4.5 $0.00002 $0.00078

Measured 6d ago against content hash e4e7c0e5a1a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

team-cleanup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/team-cleanup/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cleanup — Technical Debt and Refactoring

Improve code quality, performance, and maintainability through targeted refactoring.

Area to clean up: $ARGUMENTS

Execution

With Agent Teams (recommended)

Enable with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

Create a team and spawn teammates:

  1. Create team named cleanup-<area-slug>
  2. Spawn teammates: shipper, reviewer, full-stack-developer, database-admin (if data layer), documentor

Create the following task list with dependencies:

# Task Owner Blocked By
1 Create branch refactor/<area> from main shipper
2 Analyze code for smells, bottlenecks, and refactoring opportunities reviewer 1
3 Refactor application code based on review findings full-stack-developer 2
4 Refactor data layer based on review findings (if needed) database-admin 2
5 Commit refactoring changes shipper 3, 4
6 Run full test suite and validate shipper 5
7 Update documentation for refactoring changes documentor 6
8 Create PR to main with before/after summary shipper 6, 7

Parallelism: Tasks 3 and 4 can run simultaneously after the review completes.

Without Agent Teams (fallback)

Execute sequentially using the Task tool:

  1. Task(shipper, "Create branch refactor/<area> from main")
  2. Task(reviewer, "Analyze $ARGUMENTS for code smells, bottlenecks, refactoring opportunities")
  3. Task(full-stack-developer, "Refactor based on review findings: <findings>")
  4. Task(database-admin, "Refactor data layer: <findings>") — only if needed
  5. Task(shipper, "Commit changes: refactor: <description>")
  6. Task(shipper, "Run full test suite, validate no regressions")
  7. Task(documentor, "Update docs for refactoring changes in: $ARGUMENTS")
  8. Task(shipper, "Create PR to main with before/after summary")

Workflow Diagram

┌─────────┐     ┌──────────┐     ┌──────────────────┐     ┌─────────┐     ┌─────────┐     ┌────────────┐     ┌─────────┐
│ Shipper │────►│ Reviewer │────►│ Full Stack Dev   │────►│ Shipper │────►│ Shipper │────►│ Documentor │────►│ Shipper │
│ Branch  │     │ Analyze  │     │ + DB Admin (||)  │     │ Commit  │     │  Test   │     │ Update Docs│     │  PR     │
└─────────┘     └──────────┘     │ Refactor         │     └─────────┘     └─────────┘     └────────────┘     └─────────┘
                     │           └──────────────────┘
              [Identify Issues]
              [Prioritize]

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 65 lines · 19 tokens per session scan A e4e7c0e5a1a9

Subscribe to this mod's changes

team-cleanup is a skill published in the GitHub repository bryanweaver/claude-agent-kit (2 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 779 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.