Refactoring Expert

Refactoring Expert is a skill for Claude Code, Codex from ahmadrrrtx/xr. It costs 25 tokens per session (332 once invoked), scanned A, a copy of Architecture Reviewer, MIT.

A code-refactoring guide for improving internal code structure without changing its expected behavior.

In plain words
What is it for?
Use it to plan structural code improvements, preserve public APIs, identify risks, and choose focused tests.
Why use it?
It helps reduce complicated or fragile code while protecting existing interfaces and checking for regressions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan structural code improvements, preserve public APIs, identify risks, and choose focused tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ahmadrrrtx/xr/refactoring_expert
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.

Any agent
npx skills add ahmadrrrtx/xr --skill refactoring_expert
Clone the repo
git clone --depth 1 https://github.com/ahmadrrrtx/xr

Made for: Claude Code, Codex.

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 Refactoring Expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/ahmadrrrtx/xr/refactoring_expert.svg)](https://agentmods.dev/skills/ahmadrrrtx/xr/refactoring_expert)
Your own site
<a href="https://agentmods.dev/skills/ahmadrrrtx/xr/refactoring_expert"><img src="https://agentmods.dev/badge/skills/ahmadrrrtx/xr/refactoring_expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 332 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 86% copy Near-identical to another mod 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.00025 $0.00332
Opus 5 $0.00013 $0.00166
Sonnet 5 $0.00005 $0.00066
Haiku 4.5 $0.00003 $0.00033

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

Security

Grade A, and why

Refactoring Expert 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 7d 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.

Origin

This is a copy

86% identical to Architecture Reviewer — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/refactoring_expert/SKILL.md · 40 lines

What it actually says

Refactoring Expert

Professional Identity

You are XR's Refactoring Expert Skill. You should feel like hiring a careful professional, not installing a prompt.

Mission

Refactoring Expert delivers production-grade technical work with clear architecture, tests, maintainability, and operational awareness.

Operating Rules

  • Prefer simple, maintainable designs over clever abstractions.
  • Preserve existing public APIs unless the user approves a breaking change.
  • Run or recommend focused tests and explain unverified assumptions.
  • Never run destructive shell commands without explicit approval.

Default Workflow

  1. Clarify the objective, user constraints, available inputs, and success criteria.
  2. Create a compact plan with risks and required approvals.
  3. Execute with domain best practices and clear artifacts.
  4. Validate the output against the criteria, safety constraints, and edge cases.
  5. Handoff with decisions, residual risks, and next steps.

Output Standard

  • Use structured headings.
  • Be specific and actionable.
  • Call out assumptions.
  • Include verification steps.
  • If files, shell, network, memory, voice, providers, MCP, plugins, or computer-control actions are needed, respect XR approvals and permissions.
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. 7d ago First seen · 40 lines · 25 tokens per session scan A 398ce5c30812

Subscribe to this mod's changes

Refactoring Expert is a skill published in the GitHub repository ahmadrrrtx/xr (5 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 332 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to Architecture Reviewer, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

cuj-guardian

Run and triage AI Atelie's Critical User Journey (CUJ) for every PR — the single end-to-end test that proves a user can open the app, create a project, drive the Claude Code agent, and see the canvas render. Before running, gate by inspecting the PR diff for changes that plausibly affect the journey (routes…

aiatelie/ai-atelie · 137 tokens

pr-evidence

Run AI Atelie's journey suite and inject inline-rendering evidence (per-journey video + screenshot, in a 4-column markdown table) into the current PR's body. Use whenever the user says "post evidence", "run journeys", "update PR with videos", or after ship-task opens a PR. Wraps bun run journeys; idempotent — re-runs…

aiatelie/ai-atelie · 93 tokens

design-critique

Run a structured anti-slop audit on the design just produced before declaring done. Catches the recognizable AI-default patterns (Tailwind indigo, two-stop trust gradients, emoji-as-icons, generic display fonts, rounded-card-with-left-border, and 20+ more) so they can be fixed before the user sees them.

aiatelie/ai-atelie · 70 tokens

design-md-author

Read or write a Google-spec DESIGN.md at the project root — the cross-tool aesthetic spec that grounds every prompt in this project. Use when the user asks to capture, update, or import a design system, or when starting a project that should have a documented aesthetic direction.

aiatelie/ai-atelie · 59 tokens

export

Export a selected element from the canvas as PNG, JPEG, OGraf bundle, Lottie, or video. Saves to the project's exports/ folder; the chat renders the result inline as an artifact card.

aiatelie/ai-atelie · 43 tokens

interactive-prototype

Build a clickable, hi-fi prototype of a product or flow — not a wireframe, not a static mock. The user can navigate, toggle states, and feel the interaction. Reach for this whenever the design has flows, multi-screen states, or many-option situations.

aiatelie/ai-atelie · 58 tokens