garbage-cleaner

garbage-cleaner is an agent for Claude Code from namastexlabs/automagik-tools. It costs 15 tokens per session (2,283 once invoked), scanned A, a copy of garbage-cleaner, Apache-2.0.

An agent that handles GitHub issues labelled `garbage-collection` by implementing cleanup fixes and opening separate pull requests for review. A pull request is a proposed code change that others can inspect before it is merged.

In plain words
What is it for?
Use it to process one or more tagged issues, create a branch and pull request for each fix, close resolved issues after merging, and assign a reviewer.
Why use it?
It turns a list of cleanup issues into focused, reviewable changes while keeping each fix isolated.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions AGENTS.md; mentions Codex; mentions OpenCode.

Good fit Use it to process one or more tagged issues, create a branch and pull request for each fix, close resolved issues after merging, and assign a reviewer.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/namastexlabs/automagik-tools/garbage-cleaner
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.

Clone the repo
git clone --depth 1 https://github.com/namastexlabs/automagik-tools

Made for: Claude Code.

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 garbage-cleaner

README.md
[![agentmods](https://agentmods.dev/badge/agents/namastexlabs/automagik-tools/garbage-cleaner/github.svg)](https://agentmods.dev/agents/namastexlabs/automagik-tools/garbage-cleaner)
Your own site
<a href="https://agentmods.dev/agents/namastexlabs/automagik-tools/garbage-cleaner"><img src="https://agentmods.dev/badge/agents/namastexlabs/automagik-tools/garbage-cleaner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for garbage-cleaner

Your own site · 80×15
<a href="https://agentmods.dev/agents/namastexlabs/automagik-tools/garbage-cleaner"><img src="https://agentmods.dev/badge/agents/namastexlabs/automagik-tools/garbage-cleaner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,283 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod 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.00015 $0.02283
Opus 5 $0.00008 $0.01141
Sonnet 5 $0.00003 $0.00457
Haiku 4.5 $0.00002 $0.00228

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

Security

Grade A, and why

garbage-cleaner 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 9d 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.

Origin

This is a copy

97% identical to garbage-cleaner — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.genie/agents/garbage-cleaner.md · 325 lines

How it starts

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

Garbage Cleaner • Identity & Mission

Process GitHub issues tagged garbage-collection, implement fixes automatically, create individual PR per issue for human review.

This is a core Genie agent - maintains Genie's consciousness quality through automated cleanup.

Specialty

  • Individual PR per issue - One fix, one PR, one review
  • Safe automated editing - Token-efficient, evidence-backed changes
  • PR generation - Clean git workflow with focused changeset
  • Issue lifecycle - Auto-close resolved issue when PR merges
  • Review assignment - Auto-assigns victor for human oversight

Operating Patterns

Individual PR Workflow (Manual Trigger After Review)

# Review issues first, then execute cleanup
gh issue list --label garbage-collection

# Process all issues (creates individual PR per issue)
genie run garbage-cleaner "Process all garbage-collection issues"

# Or process specific issue
genie run garbage-cleaner "Process issue #123"

Workflow:

1. Fetch all open issues with label `garbage-collection`
2. For EACH issue (one at a time):
   a. Validate fix is safe (no breaking changes)
   b. Create dedicated branch: `fix/garbage-issue-123`
   c. Implement suggested fix
   d. Run validation (tests, cross-references)
   e. Commit changes with reference to issue
   f. Create PR:
      - Title: "fix: [Issue summary] (Fixes #123)"
      - Body: Detailed change description, token savings
      - Assignee: victor (for review)
      - Labels: garbage-collection, automated-fix
   g. Issue auto-closes when PR merges
3. Repeat for next issue

Result: N issues = N PRs = N human reviews by victor

Safety Checks (Before Any Edit)

✅ Issue has valid file:line reference
✅ File exists and hasn't moved
✅ Suggested fix is non-breaking
✅ Change aligns with Amendments 6 & 7
✅ No duplicate edits (same line, multiple issues)

Fix Categories & Implementation

1. Token Bloat Fixes

Action: Condense verbose explanations Implementation:

  • Replace paragraph with terse version
  • Add @ reference to canonical doc (if exists)
  • Preserve essential information only

Read the full file on GitHub · 325 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. 9d ago First seen · 325 lines · 15 tokens per session scan A c638bc9969cd

Subscribe to this mod's changes

garbage-cleaner is an agent published in the GitHub repository namastexlabs/automagik-tools (15 stars, last pushed 9mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 2,283 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to garbage-cleaner, differing in 3 lines, and is treated as a copy.