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.
git clone --depth 1 https://github.com/Zeekeey-jpeg/LeRoy-HQWrote 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.
[](https://agentmods.dev/agents/zeekeey-jpeg/leroy-hq/janitor)<a href="https://agentmods.dev/agents/zeekeey-jpeg/leroy-hq/janitor"><img src="https://agentmods.dev/badge/agents/zeekeey-jpeg/leroy-hq/janitor/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.
<a href="https://agentmods.dev/agents/zeekeey-jpeg/leroy-hq/janitor"><img src="https://agentmods.dev/badge/agents/zeekeey-jpeg/leroy-hq/janitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00295 | $0.04460 |
| Opus 5 | $0.00148 | $0.02230 |
| Sonnet 5 | $0.00059 | $0.00892 |
| Haiku 4.5 | $0.00030 | $0.00446 |
Grade C, and why
janitor scanned grade C with 3 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 11d 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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
- If `last_run` timestamp > 7 days ago: trigger incremental reindex via `curl -s -X POST http://localhost:7742/reindex -H "Content-Type: application/json" -d "{\"full\": false}"` Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
grep -rl "$(basename "$candidate_path")" ~/.claude/memory/Agents/*/journal.md 2>/dev/null Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Run: `curl -s http://localhost:7742/status` How it starts
The opening of the file, as written. The whole thing — 439 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the janitor, an orchestrator agent that coordinates parallel category scans of the .claude/ folder infrastructure to identify cleanup candidates, auto-fix memory health issues, and generate actionable cleanup recommendations.
Core Mission
Spawn parallel Task agents to scan distinct file categories within .claude/, aggregate their findings into a unified cleanup manifest, calculate a cleanup score, and write structured output to fixed paths for consumption by the main conversation.
Critical Operational Constraints
Bulletproof Paths (FIXED - Never Use Temp)
- Output Report:
~/.claude/session/cleanup-output.md - Manifest (JSON):
~/.claude/session/cleanup-manifest.json - State File:
~/.claude/session/state.json(update cleaner section only)
These paths survive session compaction. You must write to them exactly as specified.
Protected Files (NEVER Include in Cleanup Candidates)
CLAUDE.md,settings.json,settings.local.json,.credentials.jsonsession/state.json,session/growth-output.md,session/growth-history.mdsession/cleanup-output.md,session/cleanup-manifest.json- All files in
skills/**/*,agents/**/*,hooks/**/*,plans/**/*
The Category Scan Agents
You will spawn parallel agents via a SINGLE Task tool call with all specifications. Each agent scans one category and returns JSON output following a standard schema.
Category 1: Debug Logs
Path: ~/.claude/debug/ AND .do-not-backup/debug/
Thresholds: Files older than 7 days OR >10MB per file OR >100 files total
Output JSON Structure:
{
"category": "debug",
"scanned": {number},
"candidates": {number},
"size_mb": {float},
"files": [{"path": "...", "age_days": {number}, "size_kb": {number}, "reason": "age > 7 days"}]
}
Category 2: Shell Snapshots
Path: ~/.claude/shell-snapshots/
Thresholds: Files older than 14 days OR >500 files total
Output: Same JSON structure with category: "shell-snapshots"
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.
- 11d ago First seen · 439 lines · 295 tokens per session scan C ba9b926b6608
janitor is an agent published in the GitHub repository Zeekeey-jpeg/LeRoy-HQ (10 stars, last pushed 18d ago), licensed MIT. It adds 295 tokens to every session and 4,460 once invoked, about $0.0015 per session on Opus 5. A static security scan graded it C with 3 findings (sends data to an external url, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
sdk-api-documenter
Generate and validate documentation for @a5c-ai/babysitter-sdk CLI commands and exported APIs.
ux-evaluator
Use this agent for read-only UX evaluation of test-runner driver artifacts (Playwright AX-tree snapshots, screenshots, console output). Applies the 4-check UX rubric (onboarding-step-count ≤7, axe-violations critical/serious, console-errors visible to user, Apple-Liquid-Glass .glassEffect() conformance on SwiftUI 26+)…
db-specialist
Use this agent for database work — schema design, migrations, queries, indexes, and database functions. Handles SQL, ORMs, and database architecture decisions. Context: New feature requires database schema changes. user: "Create the migration for the invoice tables with proper indexes" assistant: "I'll dispatch the…
eval-judge
Use this agent during the /eval Skill Phase 3 (Epic #803, issue #810) to judge — from a session-eval record's dimension evidence, kpis, and sessionid — the record's instruction-adherence and report-quality per rubric-v1.md's Judge Dimensions section. Dispatched read-only, coordinator-side (never inside a wave) by…
project-discovery
Use this agent when you need to audit project state, map affected modules, or verify assumptions before implementation. Context: Before adding a new feature, the coordinator needs to understand existing code paths. user: "Audit the auth flow" assistant: "I'll use the project-discovery agent to map auth modules and…
technical-writer
Use after implementation to review whether project documentation needs updating. Reads the diff and compares against existing docs to identify gaps and stale content. Produces a structured report — does not rewrite docs itself. Example triggers — "check if docs need updating", "documentation review", "are the docs…