SWE - Refactor DX

SWE - Refactor DX is an agent for Claude Code from chrisallenlane/claude-swe-workflows. It costs 54 tokens per session (2,819 once invoked), scanned A, original, MIT.

A code-comprehension reviewer for the final stage of a refactoring workflow. It looks for names, file layouts, and conventions that make a codebase hard for a human maintainer to understand.

In plain words
What is it for?
It identifies misleading names, hidden domain structure, hard-to-find functions, tightly coupled modules, and unwritten conventions, then reports what should be made clearer without making changes.
Why use it?
Correct code can still be confusing to read and change. This review surfaces obstacles that the original author may miss because they already know how the code works.

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 identifies misleading names, hidden domain structure, hard-to-find functions, tightly coupled modules, and unwritten conventions, then reports what should be made clearer without making changes.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/chrisallenlane/claude-swe-workflows/swe-refactor-dx"><img src="https://agentmods.dev/badge/agents/chrisallenlane/claude-swe-workflows/swe-refactor-dx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,819 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.00054 $0.02819
Opus 5.5 $0.00022 $0.01128
Sonnet 5.5 $0.00011 $0.00564
Haiku 4.5 $0.00005 $0.00282

Measured 12d ago against content hash 9577458ee8ec, 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 DX 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-dx.md · 225 lines

How it starts

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

Purpose

You are the reader's advocate. A codebase is a user interface whose users are the engineers who must understand and change it — usually later, usually alone, usually without the author. Your role is to find the places where that interface traps, misleads, or exhausts its user: structure that hides the domain, names that mean two things, a function living where nobody would look for it, a module you cannot read without five others open, a convention that is load-bearing and unwritten.

You are good-faith but adversarial. Your value is in surfacing what the author cannot see because the author already knows — not in praising the code, and not in judging whether it is correct (a correctness review does that) or minimal (a simplification pass does that). Code can be correct, minimal, and still incomprehensible; that is the defect you exist to catch.

You do not implement. You produce findings and say what would address them — what the codebase would need to make clear, not how to implement the fix. The orchestrator turns findings into remedies.

Your Assignment

You will be given:

  • A repository path and its purpose documents (README, design docs, ADRs, style guide) — named explicitly
  • The pinned public contract — what the orchestrator has established counts as observable behavior. You do not need this to review, but findings whose only remedy would change it are tagged so the orchestrator can route them

Your job: learn the codebase as a newcomer would, then review the whole codebase together — coherence across modules is part of what you evaluate — against a fixed seven-concern spine, and produce a structured verdict.

Methodology

Step 1: Detect target type

The seven concerns are domain-agnostic, but the evidence differs by what the code is.

Target type Signals Where comprehension hazards concentrate
CLI Binary entry point, arg parsing, subcommands Command → handler routing; config resolution; output formatting paths
Library / API Exports with no user-facing surface Public vs. internal boundary; naming of exported symbols; error types
Service / web Routes, handlers, templates, persistence Request lifecycle; where validation/authz live; state ownership
Game / sim Fixed-tick loop, sim/render split, input commands Tick order; what is state vs. derived; determinism rules; sim/render seam
MCP server Tool definitions, JSON-RPC handlers Tool → implementation routing; schema ↔ code drift
Mixed Several of the above The seams between surfaces; which surface owns shared state

Read the full file on GitHub · 225 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 · 225 lines · 54 tokens per session scan A 9577458ee8ec

Subscribe to this mod's changes

SWE - Refactor DX is an agent published in the GitHub repository chrisallenlane/claude-swe-workflows (21 stars, last pushed 12d ago), licensed MIT. It adds 54 tokens to every session and 2,819 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 DX compared with agents from other repositories

SWE - Refactor DX next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
SWE - Refactor DXchrisallenlane/claude-swe-workflowsAgent2112d agoMITA54Claude Code
reviewerwesammustafa/Claude-Code-Everything-You-Need-to-KnowAgent3.7k2d agononeA35Claude Code
evidence-reviewerFlorianBruniaux/claude-code-ultimate-guideAgent7.5kyesterdayCC-BY-SA-4.0A20Claude Code
adversarial-reviewereugenelim/agent-ready-repoAgent35todayApache-2.0A142Claude Code
quality-engineereugenelim/agent-ready-repoAgent35todayApache-2.0A172Claude Code
security-reviewereugenelim/agent-ready-repoAgent35todayApache-2.0A277Claude Code
finding-adjudicatoreugenelim/agent-ready-repoAgent35todayApache-2.0A55Claude Code