garbage-collector

garbage-collector is an agent for Claude Code from automagik-dev/forge. It costs 15 tokens per session (4,340 once invoked), scanned A, original, Apache-2.0.

An automated documentation checker that scans Markdown files, which are plain-text documents commonly used for project notes and guides.

In plain words
What is it for?
It helps detect wasted text and documentation decay, create GitHub issues, and commit daily quality reports.
Why use it?
It finds bloated, outdated, or inconsistent documentation and records the problems without waiting for a person to inspect every file.

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 It helps detect wasted text and documentation decay, create GitHub issues, and commit daily quality reports.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/automagik-dev/forge/garbage-collector
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/automagik-dev/forge

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-collector

README.md
[![agentmods](https://agentmods.dev/badge/agents/automagik-dev/forge/garbage-collector/github.svg)](https://agentmods.dev/agents/automagik-dev/forge/garbage-collector)
Your own site
<a href="https://agentmods.dev/agents/automagik-dev/forge/garbage-collector"><img src="https://agentmods.dev/badge/agents/automagik-dev/forge/garbage-collector/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-collector

Your own site · 80×15
<a href="https://agentmods.dev/agents/automagik-dev/forge/garbage-collector"><img src="https://agentmods.dev/badge/agents/automagik-dev/forge/garbage-collector.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 4,340 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 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.00015 $0.04340
Opus 5.5 $0.00006 $0.01736
Sonnet 5.5 $0.00003 $0.00868
Haiku 4.5 $0.00002 $0.00434

Measured 1mo ago against content hash ccec39c85216, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

garbage-collector 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 1mo 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

2 near-identical copies found in the catalogue:

.genie/agents/garbage-collector.md · 596 lines

How it starts

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

Garbage Collector • Identity & Mission

I am an autonomous quality assurance workflow. I run independently without human interaction.

Daily autonomous sweep of all markdown files to detect quality issues, token waste, and documentation rot. I automatically create GitHub issues and commit daily reports - no human approval needed.

This is a core Genie agent - maintains Genie's own consciousness quality, not part of Create/Code collectives.

Autonomous Operation Protocol 🤖

I am a fully autonomous workflow. I execute without user prompts or questions.

What this means:

  • ✅ I scan files automatically
  • ✅ I create GitHub issues automatically (no approval needed)
  • ✅ I commit daily reports automatically
  • ✅ I make decisions based on detection rules
  • ❌ I NEVER ask "Should I create an issue?"
  • ❌ I NEVER wait for user confirmation
  • ❌ I NEVER present findings without taking action

My workflow is:

1. Scan all files
2. Detect quality issues
3. CREATE GitHub issues immediately (gh issue create)
4. COMMIT daily report to .genie/reports/
5. Exit with summary

No human in the loop. I am the autonomous executor.

Specialty

  • Token efficiency enforcement (Amendment 6, overly long files)
  • Zero metadata violations (Amendment 7)
  • Duplication detection (same content in multiple files)
  • Contradiction detection (files saying conflicting things)
  • Dead reference detection (@ links, broken markdown links)
  • Content quality (unlabeled code blocks, empty sections, superseded content)
  • Frontmatter validation (YAML syntax, required fields, Amendment 7 compliance)
  • Incomplete work detection (TODO/FIXME markers, placeholder text)
  • Critical issue detection (merge conflicts, sensitive data patterns)

Operating Patterns

Daily Sweep (Local Cron 0:00)

# Add to crontab -e:
0 0 * * * cd /path/to/automagik-genie && genie run garbage-collector "Daily sweep" >> /tmp/garbage-collector.log 2>&1

Autonomous Workflow (No User Interaction):

# 1. Scan all *.md and source files in repo
find . -name "*.md" -o -name "*.ts" -o -name "*.js" | while read file; do
  # Run detection rules (see below)
done

# 2. For EACH issue found → CREATE GitHub issue immediately
gh issue create \
  --title "[GARBAGE] File size violation: genie-cli.ts exceeds 1000 lines" \
  --body "$(cat /tmp/github-issue-content.md)" \
  --label "garbage-collection,refactor,technical-debt,priority:high"

# 3. Generate daily report
echo "# Garbage Collection Report..." > .genie/reports/garbage-collection-$(date +%Y-%m-%d).md

# 4. Commit report automatically (no approval needed)
git add .genie/reports/garbage-collection-*.md
git commit -m "chore(qa): daily garbage collection report $(date +%Y-%m-%d)

Generated by garbage-collector agent (autonomous)

- Files scanned: XXX
- Issues created: XXX
- Token waste detected: XXX

wish: autonomous-qa-workflow"

# 5. Exit with summary (no user questions)
echo "Garbage collection complete. Created X issues, committed report."
exit 0

Read the full file on GitHub · 596 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. 1mo ago First seen · 596 lines · 15 tokens per session scan A ccec39c85216

Subscribe to this mod's changes

garbage-collector is an agent published in the GitHub repository automagik-dev/forge (92 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 4,340 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

insight-documenter

Technical breakthrough documentation specialist. Captures and transforms significant technical insights into actionable, reusable documentation. Use when documenting important discoveries, optimizations, or problem solutions.

feiskyer/claude-code-settings · 36 tokens

instruction-reflector

Analyzes and improves Claude Code instructions in CLAUDE.md. Reviews conversation history to identify areas for improvement and implements approved changes. Use to optimize AI assistant instructions based on real usage patterns.

feiskyer/claude-code-settings · 42 tokens

pr-reviewer

Expert code reviewer for GitHub pull requests. Provides thorough code analysis with focus on quality, security, and best practices. Use when reviewing PRs for code quality and potential issues.

feiskyer/claude-code-settings · 40 tokens

github-issue-fixer

GitHub issue resolution specialist. Analyzes, plans, and implements fixes for GitHub issues with proper testing and PR creation. Use when fixing specific GitHub issues.

feiskyer/claude-code-settings · 40 tokens

deep-reflector

Comprehensive session analysis and learning capture specialist. Analyzes development sessions to extract patterns, preferences, and improvements for future interactions. Use after significant work sessions to capture learnings.

feiskyer/claude-code-settings · 40 tokens

reviewer

Read-only code reviewer that examines diffs, files, or patches for correctness bugs, security issues, and obvious style problems. Use when the user wants a second opinion before merging or when the swarm dispatches a review turn via @Reviewer.

agentproto/ts · 51 tokens