refactor-scan

Use this agent proactively to guide refactoring decisions during code improvement and reactively to assess refactoring opportunities after tests pass (TDD's third step). Invoke when tests are green, when considering abstractions, or when reviewing code quality.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/tae0y/python-project-template/refactor-scan
Clone the repo
git clone --depth 1 https://github.com/tae0y/python-project-template

Made for: Claude Code.

Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,572 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00052 $0.03572
Opus 5 $0.00026 $0.01786
Sonnet 5 $0.00010 $0.00714
Haiku 4.5 $0.00005 $0.00357

Measured today against content hash 96ce851cd71a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

refactor-scan 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 today.

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.

.claude/agents/refactor-scan.md · 509 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

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. today First seen · 509 lines · 52 tokens per session scan A 96ce851cd71a

Subscribe to this mod's changes

refactor-scan is an agent published in the GitHub repository tae0y/python-project-template (14 stars, last pushed 24d ago), with no licence file. It adds 52 tokens to every session and 3,572 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-09-01.

Related

Other agents, from other repositories

buildkite-expert

Comprehensive Buildkite CI/CD expert for status checks, build introspection, and failure diagnosis. Handles everything from simple status queries to deep error analysis. Examples: Context: User wants to know the current build status. user: 'What's the status of my PR in Buildkite?' assistant: 'I'll use the…

dagster-io/dagster · 358 tokens

pr-update-expert

Expert agent for updating GitHub PRs through optimized AI workflow. Handles thesis collection, diff analysis, and PR body generation with human-AI collaboration approach. Examples: Context: User wants to update their PR with latest changes. user: '/aiupdatepr' assistant: 'I'll use the pr-update-expert agent to update…

dagster-io/dagster · 184 tokens

code-standards-enforcer

Use this agent when you need to audit changed files for compliance with coding standards defined in CLAUDE.md. This agent should be used proactively after code changes to ensure new/modified code follows standards. Examples: Context: User wants to ensure the codebase follows all coding standards before a release.…

dagster-io/dagster · 252 tokens

agent-coach

Use this agent when you want to analyze and improve agent performance after any agent invocation. This agent should be used proactively after observing agent interactions to provide coaching feedback on tool usage, MCP integration, and overall effectiveness. Examples: Context: User has just used a code-review agent to…

dagster-io/dagster · 213 tokens

qa

Use this agent when you need a strict, independent quality gate review of recently written code against the PRD and API documentation. This agent acts as a ruthless test engineer who reads only the PRD and API docs, then verifies whether the implementation meets every requirement — functional completeness, edge cases…

weiyi88/cc-code · 375 tokens

prd-plan

Use this agent when the user describes a feature idea, product requirement, or technical initiative and needs a comprehensive plan developed from it. This agent transforms rough concepts and PRDs into detailed, actionable implementation plans that account for edge cases, dependencies, and risks.\n\n \nContext: The…

weiyi88/cc-code · 407 tokens