garbage-cleaner

An automated agent for handling GitHub issues labelled `garbage-collection` in the Genie project. It reviews each issue, implements a fix, and prepares a separate pull request for human review.

In plain words
What is it for?
Finding matching GitHub issues, validating and implementing safe fixes, creating one branch and pull request per issue, assigning a reviewer, and closing resolved issues after merging.
Why use it?
It turns a list of cleanup issues into individually reviewable code changes with a documented issue-to-pull-request process.

Agent

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 agents/automagik-dev/forge/garbage-cleaner
Clone the repo
git clone --depth 1 https://github.com/automagik-dev/forge
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,276 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 $0.00015 $0.02276
Opus 5 $0.00008 $0.01138
Sonnet 5 $0.00003 $0.00455
Haiku 4.5 $0.00002 $0.00228

Measured 2d ago against content hash 3d8f5a9e6cd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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

Copies of this mod

1 near-identical copy found in the catalogue:

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

How it starts

The opening of the file, as written. The whole thing — 324 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 · 324 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. 2d ago First seen · 324 lines · 15 tokens per session scan A 3d8f5a9e6cd6

Subscribe to this mod's changes

garbage-cleaner is an agent published in the GitHub repository automagik-dev/forge (89 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 2,276 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-30.