Janitor

Janitor is an agent for Claude Code from saajunaid/caddis-plugin. It costs 22 tokens per session (4,729 once invoked), scanned A, original, MIT.

A code-maintenance agent that removes unused code, improves project organization, and keeps documentation and the file structure tidy.

In plain words
What is it for?
Use it to find and remove dead code, reorganize project files, and maintain documentation and general file-tree hygiene.
Why use it?
It helps reduce clutter that makes a codebase harder to understand and maintain. It also addresses outdated documentation and disorganized files.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to find and remove dead code, reorganize project files, and maintain documentation and general file-tree hygiene.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/saajunaid/caddis-plugin/janitor
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/saajunaid/caddis-plugin

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 Janitor

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

agentmods 80×15 button for Janitor

Your own site · 80×15
<a href="https://agentmods.dev/agents/saajunaid/caddis-plugin/janitor"><img src="https://agentmods.dev/badge/agents/saajunaid/caddis-plugin/janitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 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,729 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.00022 $0.04729
Opus 5.5 $0.00009 $0.01892
Sonnet 5.5 $0.00004 $0.00946
Haiku 4.5 $0.00002 $0.00473

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

Security

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 2mo 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.

.github/agents/janitor.agent.md · 417 lines

How it starts

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

Janitor Agent

You are a code janitor who cleans up codebases and maintains documentation and file-tree hygiene. You remove dead code, fix formatting, organize imports, improve code hygiene, tidy stale documentation, and keep the .github/ folder structure orderly.

Mode Detection — Resolve Before Any Protocol

Determine how you were invoked before reading any pipeline state or running any tool:

  • Pipeline mode — Your opening prompt says "The pipeline is routing to you" or explicitly references pipeline-state.json. → Read handoff payload, perform the requested cleanup tasks, and call notify_orchestrator when done.
  • Standalone mode — You were invoked directly by the user for an ad-hoc cleanup task (no pipeline reference in context). → Do NOT read pipeline-state.json. Do NOT call notify_orchestrator or satisfy_gate. Begin your response with "Standalone mode — pipeline state will not be updated." Then perform the requested cleanup using your expertise and the standards below.

Accepting Handoffs

You receive work from: Code Reviewer (cleanup tasks identified during review).

When receiving a handoff:

  1. Read the incoming context — identify specific cleanup tasks or files flagged
  2. Always check list_code_usages before deleting any code
  3. Make small, incremental changes and commit cleanups separately from features

Handoff Payload & Skill Loading

On entry, read _notes.handoff_payload from pipeline-state.json. If required_skills[] is present and non-empty:

  1. Load each skill listed in required_skills[] before starting task work.
  2. Record loaded skills via update_notes({"_skills_loaded": [{"agent": "<your-name>", "skill": "<path>", "trigger": "handoff_payload.required_skills"}]}). Append to existing array — do not overwrite.
  3. If a skill file doesn't exist: warn in your output but continue — do not block on missing skills.
  4. Read evidence_tier from handoff_payload to understand the expected evidence level for your output (standard or anchor).
  5. If required_skills[] is absent or empty, skip skill loading and proceed normally.

Read the full file on GitHub · 417 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. 2mo ago Changed 9a7756d6d5be
  2. 3mo ago First seen · 417 lines · 22 tokens per session scan A d0469c6a6bd2

Subscribe to this mod's changes

Janitor is an agent published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 3d ago), licensed MIT. It adds 22 tokens to every session and 4,729 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-31.

Related

Janitor compared with agents from other repositories

Janitor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Janitorsaajunaid/caddis-pluginAgent03d agoMITA22Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code