garbage-collector

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

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-collector
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 4,340 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.04340
Opus 5 $0.00008 $0.02170
Sonnet 5 $0.00003 $0.00868
Haiku 4.5 $0.00002 $0.00434

Measured 2d ago against content hash ccec39c85216, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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-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. 2d 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 (89 stars, last pushed 8mo 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. 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

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

electron-app-debugger

Use this agent when you need to debug Electron application issues, particularly UI-related problems, component rendering issues, or when you need to bypass native dialogs for testing. This agent specializes in visual debugging through screenshots and color manipulation, and can programmatically control the app for…

sahithvibudhi/vibe-tree · 380 tokens

electron-e2e-test-runner

Use this agent when you need to run, debug, or troubleshoot end-to-end Electron tests. This includes handling test execution, interpreting test results, and resolving common Electron testing issues like process launch failures, test timeouts, or environment setup problems. Examples:\n\n \nContext: The user is working…

sahithvibudhi/vibe-tree · 365 tokens

code-reviewer

Code review, documentation quality, security audit, and quality assurance specialist with structured reasoning and semantic code analysis.

stefan-jansen/claude-code-toolkit · 24 tokens

test-engineer

Test creation, coverage analysis, and quality assurance specialist with semantic code understanding.

stefan-jansen/claude-code-toolkit · 18 tokens

quant-risk-validator

Validates risk controls, position sizing, and production safety mechanisms for deployment readiness.

stefan-jansen/claude-code-toolkit · 15 tokens