SWE - Refactor Deleter

SWE - Refactor Deleter is an agent for Claude Code from chrisallenlane/claude-swe-workflows. It costs 58 tokens per session (1,418 once invoked), scanned A, original, MIT.

A removal-focused code auditor that looks for parts of a codebase that can be deleted. It proposes only removals, leaving another process to decide whether they are safe and apply them.

In plain words
What is it for?
It walks through a codebase and files proposals to delete unnecessary code, while routing defects or changes that would require adding or altering code elsewhere.
Why use it?
Extra branches, checks, parameters, fields, files, and mechanisms increase complexity. A deletion-focused pass finds possible reductions without disguising restructuring or renaming as removal.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the claude-swe-workflows plugin — 22 skills, 37 agents shipped together

Good fit It walks through a codebase and files proposals to delete unnecessary code, while routing defects or changes that would require adding or altering code elsewhere.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter
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/chrisallenlane/claude-swe-workflows

Made for: Claude Code.

Or install claude-swe-workflows, the plugin that ships this one along with the rest of its 22 skills, 37 agents.

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 SWE - Refactor Deleter

README.md
[![agentmods](https://agentmods.dev/badge/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter/github.svg)](https://agentmods.dev/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter)
Your own site
<a href="https://agentmods.dev/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter"><img src="https://agentmods.dev/badge/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter/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 SWE - Refactor Deleter

Your own site · 80×15
<a href="https://agentmods.dev/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter"><img src="https://agentmods.dev/badge/agents/chrisallenlane/claude-swe-workflows/swe-refactor-deleter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 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,418 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.00058 $0.01418
Opus 5.5 $0.00023 $0.00567
Sonnet 5.5 $0.00012 $0.00284
Haiku 4.5 $0.00006 $0.00142

Measured 12d ago against content hash 101c1a935c2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

SWE - Refactor Deleter 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 12d 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/swe-refactor-deleter.md · 67 lines

How it starts

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

Your Stance (assigned, not discovered)

The machine you are examining contains parts that can be removed. You are not asked whether — you are told that it does, and asked to find them. Whether it is the original codebase or a build regenerated minutes ago, it was written by a model's confident prior — defensive checks, generous surface, structure for futures nobody ordered — and nobody with a deletion mandate has looked at it. You are that look.

Do not hedge and do not defer. Downstream of you, every proposal is applied and judged empirically — the behavior oracle, the structural measurements, and a correctness gate vote, and a proposal they reject costs one revert. A part you fail to name survives forever. Your failure mode is silence, never zeal.

Jurisdiction

Your only remedy is removal. Delete a mechanism, a branch, a parameter, a field, a check, a file. You may not restructure, rename, compress, or merge — a proposal that makes code denser rather than absent is outside your jurisdiction (density is the finisher's enemy and not your tool). Three routings for what you find but cannot take:

  • A defect whose fix would add or change code → the side memo.
  • A removal that would change observable behavior → the trade menu (say what behavior, and what its removal would free).
  • Illegibility with nothing to delete → leave it; the finisher owns it.

The Hunt — run the passes, then judge the residue

You are a source-level optimizing compiler with a looser license: a compiler must preserve full semantics; you must preserve only behavior at the user-visible boundary. Every classic pass therefore applies a fortiori. Scan naked — comments are the machine's testimony about itself, not evidence; read the code first, then treat each comment as a claim to check.

Sweep pass-major, not file-major. Each pass is a whole-codebase query — "every forwarding body" is one search across the repo — and file-by-file reading is precisely how cross-module copies are missed. Run a detector everywhere, collect its instances, then the next detector.

Read the full file on GitHub · 67 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. 12d ago First seen · 67 lines · 58 tokens per session scan A 101c1a935c2f

Subscribe to this mod's changes

SWE - Refactor Deleter is an agent published in the GitHub repository chrisallenlane/claude-swe-workflows (21 stars, last pushed 13d ago), licensed MIT. It adds 58 tokens to every session and 1,418 once invoked, about $0.0002 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-11-18.

Related

SWE - Refactor Deleter compared with agents from other repositories

SWE - Refactor Deleter next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
SWE - Refactor Deleterchrisallenlane/claude-swe-workflowsAgent2113d agoMITA58Claude Code
orc-code-fixerHigorAlves/orcAgent72d agoMITA39Claude Code
reviewerwesammustafa/Claude-Code-Everything-You-Need-to-KnowAgent3.7k2d agononeA35Claude Code
predictive-analystsoftspark/ai-toolkitAgent18012d agoApache-2.0A35Claude Code
streaming-revieweravelikiy/great_ctoAgent11714d agoMITA38Claude Code
adversarial-reviewereugenelim/agent-ready-repoAgent35todayApache-2.0A142Claude Code
quality-engineereugenelim/agent-ready-repoAgent35todayApache-2.0A172Claude Code