refactor-cleaner

refactor-cleaner is an agent for Claude Code from Nmor/the-claude-council. It costs 51 tokens per session (1,365 once invoked), scanned A, original, no licence file.

A cleanup reviewer for finding and removing code that is unused, duplicated, or no longer needed. It uses analysis tools to identify possible dead files, dependencies, and exports.

In plain words
What is it for?
Use it for dead-code cleanup, duplicate consolidation, unused dependency checks, and focused refactoring with tools such as knip, depcheck, and ts-prune.
Why use it?
It helps reduce maintenance work and makes it easier to see which parts of a codebase are still active.

Agent for Claude Code

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

Good fit Use it for dead-code cleanup, duplicate consolidation, unused dependency checks, and focused refactoring with tools such as knip, depcheck, and ts-prune.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nmor/the-claude-council/refactor-cleaner
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/Nmor/the-claude-council

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 refactor-cleaner

README.md
[![agentmods](https://agentmods.dev/badge/agents/nmor/the-claude-council/refactor-cleaner.svg)](https://agentmods.dev/agents/nmor/the-claude-council/refactor-cleaner)
Your own site
<a href="https://agentmods.dev/agents/nmor/the-claude-council/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/nmor/the-claude-council/refactor-cleaner.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,365 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 unknown 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.00051 $0.01365
Opus 5 $0.00026 $0.00682
Sonnet 5 $0.00010 $0.00273
Haiku 4.5 $0.00005 $0.00136

Measured 8d ago against content hash ebf6dc4d5a38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

refactor-cleaner 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 8d 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.

agents/refactor-cleaner.md · 146 lines

The source is not reproduced here

A licence we could not identify

The repository carries a LICENSE file, but it is custom or dual enough that GitHub cannot name it and neither can this catalogue. Unknown terms are not permission, so the body is not copied here. Read the licence at the source and decide for yourself.

Read it on GitHub

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. 8d ago First seen · 146 lines · 51 tokens per session scan A ebf6dc4d5a38

Subscribe to this mod's changes

refactor-cleaner is an agent published in the GitHub repository Nmor/the-claude-council (9 stars, last pushed today), with no licence file. It adds 51 tokens to every session and 1,365 once invoked, about $0.0003 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-31.

Related

Other agents, from other repositories

code-quality-reviewer

Use this agent when you need comprehensive manual quality review, integration testing, and user experience validation. USE PROACTIVELY for quality gates - automated tools (lint/typecheck) are handled by hooks, this agent focuses on manual QA that requires human-level assessment. Examples: Context: User has just…

bwads001/claude-code-agents · 264 tokens

file-refactor-organizer

Use this agent when you need to break down large files into smaller, more maintainable components or modules. This agent should be used when files exceed 300 lines, when code organization needs improvement, or before committing changes to ensure proper file structure. Examples: Context: User has a large React…

bwads001/claude-code-agents · 253 tokens

mb-reviewer

Code review agent for /mb work review-loop. Reads stage diff + pipeline.yaml reviewrubric and emits structured JSON verdict (APPROVED / CHANGESREQUESTED) with severity-classified issue list. Drives the severity-gate decision.

fockus/skill-memory-bank · 53 tokens

spec-reviewer

Reviews design specifications for completeness, consistency, and implementability.

greglas75/zuvo · 16 tokens

blind-scorer

Blind quality scorer for skill-improver runs. Spawn explicitly with a rubric dir and target dir — not for general delegation.

air-gapped/skills · 30 tokens

typescript-code-reviewer

A read-only code reviewer for TypeScript, TSX, React, and Next.js projects. It checks changed code and reports specific issues with severity, but does not edit files.

oikon48/claudecode-book · 157 tokens