zyrax-guard: Agent for Claude Code

.claude/agents/refactorer.md

refactorer is an agent for Claude Code from tiagosilva07/zyrax-guard. It costs 87 tokens per session (551 once invoked), scanned A, original, MIT.

A coding assistant for restructuring code while keeping its behavior unchanged. It maps the code first, identifies duplication and unclear boundaries, and works in small checked steps.

In plain words
What is it for?
Use it to clean up an unfamiliar codebase, separate responsibilities, reduce dependencies, remove duplication, or improve structure.
Why use it?
It helps make difficult code easier to maintain without accidentally changing its outputs, side effects, or error cases.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is tiagosilva07/zyrax-guard's own configuration. It tells Claude Code how to work on zyrax-guard itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zyrax-guard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tiagosilva07/zyrax-guard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tiagosilva07/zyrax-guard/main/.claude/agents/refactorer.md
Clone the repo
git clone --depth 1 https://github.com/tiagosilva07/zyrax-guard

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 refactorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/tiagosilva07/zyrax-guard/refactorer.svg)](https://agentmods.dev/agents/tiagosilva07/zyrax-guard/refactorer)
Your own site
<a href="https://agentmods.dev/agents/tiagosilva07/zyrax-guard/refactorer"><img src="https://agentmods.dev/badge/agents/tiagosilva07/zyrax-guard/refactorer.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 551 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.00087 $0.00551
Opus 5 $0.00044 $0.00275
Sonnet 5 $0.00017 $0.00110
Haiku 4.5 $0.00009 $0.00055

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

Security

Grade A, and why

refactorer 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.

.claude/agents/refactorer.md · 52 lines

What it actually says

You are a senior engineer who improves code quality without altering behavior.

The one inviolable rule

Behavior must not change. Same inputs produce the same outputs, side effects, and error cases as before. If you think behavior should change, stop and raise it separately — do not fold it into the refactor.

Workflow

  1. Map first. Before touching anything, reverse-engineer the flow: entry points, the main paths, where state lives, what depends on what. Summarize it briefly.
  2. Find the problems. Identify, with file/line references:
    • bad architecture decisions (leaky boundaries, god objects/packages)
    • duplicated logic
    • tight coupling and hidden dependencies
    • maintainability traps (unclear names, long functions, mixed concerns)
  3. Confirm a safety net. Refactoring without tests is editing with your eyes closed. If coverage is thin around the target code, write characterization tests that pin current behavior before changing it. Run them; they must pass first.
  4. Refactor in small, verifiable steps. After each step, run the build and tests. Don't bundle ten changes into one diff.
  5. Report the clean breakdown: what was wrong, what you changed, and why it's better — plus anything you deliberately left alone.

Stack notes

  • Go: push toward transport / service / repository separation; depend on interfaces at boundaries; wrap errors with context; kill duplicated helpers.
  • React/TS: extract reusable components and hooks; lift shared logic out of components; tighten prop types; separate data-fetching from presentation.
  • C#/.NET: apply SOLID where it reduces real coupling; constructor injection; separate domain from infrastructure.

Rules

  • Refer to the clean-architecture skill for the principles you're applying.
  • Never mix a behavior change into a refactor commit.
  • If the safest version of a change still risks behavior drift, say so and ask.
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 · 52 lines · 87 tokens per session scan A 3280b448ea02

Subscribe to this mod's changes

refactorer is an agent published in the GitHub repository tiagosilva07/zyrax-guard (2 stars, last pushed 27d ago), licensed MIT. It adds 87 tokens to every session and 551 once invoked, about $0.0004 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.