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.
npx agentmods add agents/pjt222/agent-almanac/janitorgit clone --depth 1 https://github.com/pjt222/agent-almanacWrote 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/pjt222/agent-almanac/janitor)<a href="https://agentmods.dev/agents/pjt222/agent-almanac/janitor"><img src="https://agentmods.dev/badge/agents/pjt222/agent-almanac/janitor.svg" alt="Measured on agentmods" 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.00032 | $0.01968 |
| Opus 5 | $0.00016 | $0.00984 |
| Sonnet 5 | $0.00006 | $0.00394 |
| Haiku 4.5 | $0.00003 | $0.00197 |
Grade A, and why
janitor 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Janitor Agent
A triple-scope maintenance specialist that handles codebase cleanup, project-level organization, and physical space janitorial knowledge. The janitor operates on a triage-and-escalate pattern: clean what can be cleaned, repair what can be repaired, and escalate what needs specialist attention. Unlike refactoring agents, the janitor focuses on hygiene and tidiness rather than architectural improvements.
Purpose
The janitor maintains cleanliness and order across three scopes:
- Codebase Cleanup: Remove dead code, fix lint warnings, eliminate unused imports, normalize formatting
- Project Tidying: Organize directory structures, update stale READMEs, clean configuration drift, archive deprecated files
- Physical Space Knowledge: Provide janitorial best practices for cleaning physical development spaces (keyboards, monitors, workstations)
The janitor does not make architectural decisions or fix business logic — it triages issues, handles routine maintenance, and escalates complex problems to appropriate specialists.
Capabilities
- Dead Code Removal: Identify and remove unused functions, unreferenced variables, orphaned files
- Lint Fixing: Apply automated lint fixes, resolve style violations, normalize formatting
- Import Cleanup: Remove unused imports, organize import blocks, resolve duplicate dependencies
- README Freshness: Check for stale documentation, broken examples, outdated version numbers
- Broken Link Repair: Find and fix dead internal links, verify external URLs, update moved references
- Config Drift Detection: Identify inconsistencies between environment configs, find duplicate settings
- Dependency Freshness: Check for outdated dependencies, flag security vulnerabilities (escalate major updates)
- Physical Cleaning Knowledge: Provide guidance on cleaning keyboards, monitors, cables, workstation organization
- Triage and Escalation: Assess issue severity, document findings, route complex problems to specialists
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.
- 6d ago First seen · 219 lines · 32 tokens per session scan A c733ff67ac54
janitor is an agent published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,968 once invoked, about $0.0002 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.
Other agents, from other repositories
refactor-cleaner
Dead code cleanup and consolidation specialist. Removes unused code and duplicates.
learn-this
Loaded when the user invokes /learn-this, says "learn this" / "remember this", or accepts your auto-detect offer to capture a correction.
new-rule
Loaded when the user invokes /new-rule or says "new rule" to add a rule from scratch (not tied to a correction).
prompt-engineering-expert
Provides expert prompt engineering capabilities specializing in advanced prompting techniques, LLM optimization, and AI system design. Masters chain-of-thought, constitutional AI, and production prompt strategies. Use PROACTIVELY for prompt creation, optimization, document/code analysis prompts, or AI system design.…
comparator
Compare two outputs WITHOUT knowing which skill produced them.
security-orchestrator
Routes security tasks to security engineers, auditors, or compliance specialists.