refactor

refactor is a skill for Claude Code, Codex from reidemeister94/development-skills. It costs 18 tokens per session (713 once invoked), scanned A, original, MIT.

A skill for checking an existing project against its engineering standards and applying approved improvements without changing user-visible behaviour.

In plain words
What is it for?
Use it to inspect a selected area or the whole project, then improve an approved set of files while preserving existing behaviour.
Why use it?
It separates a read-only audit from later edits, helping find quality, data-access, performance, and documentation issues before changes are made.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disallowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: names the NotebookEdit tool.

Part of the development-skills plugin — 22 skills, 1 agent, 2 hooks shipped together

Good fit Use it to inspect a selected area or the whole project, then improve an approved set of files while preserving existing behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/reidemeister94/development-skills/refactor
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 reidemeister94/development-skills --skill refactor
Clone the repo
git clone --depth 1 https://github.com/reidemeister94/development-skills

Made for: Claude Code, Codex.

Or install development-skills, the plugin that ships this one along with the rest of its 22 skills, 1 agent, 2 hooks.

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 refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/reidemeister94/development-skills/refactor/github.svg)](https://agentmods.dev/skills/reidemeister94/development-skills/refactor)
Your own site
<a href="https://agentmods.dev/skills/reidemeister94/development-skills/refactor"><img src="https://agentmods.dev/badge/skills/reidemeister94/development-skills/refactor/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 refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/reidemeister94/development-skills/refactor"><img src="https://agentmods.dev/badge/skills/reidemeister94/development-skills/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 713 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.00018 $0.00713
Opus 5.5 $0.00007 $0.00285
Sonnet 5.5 $0.00004 $0.00143
Haiku 4.5 $0.00002 $0.00071

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

Security

Grade A, and why

refactor 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 27d 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.

skills/refactor/SKILL.md · 83 lines

How it starts

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

Refactor

Bring an existing project closer to its standards without changing user-visible behavior. This is the repository-convergence exception in the development loop. It can inspect the whole target but can change only an approved tranche.

$ARGUMENTS is a free-text focus, such as database queries, src/orders, or a planned feature. With a focus, audit that area and its required dependencies. Without one, audit the whole project. The audit is always read-only. The user chooses what to change afterwards.

The audit changes nothing in the target. The frontmatter withholds write tools during the audit, but the rule holds even when the harness exposes them.

1. Audit

Apply the loop's Standards gate and the engineering contract. Record the source paths you selected.

Use focused owners where their signal exists:

  • align-docs in inspection-only mode for repository context and documentation;
  • staff-review for code quality inside the scope.

Then inspect what these owners do not cover. Check the data model, query access paths, batching, indexes, repeated work, held resources, retries, recomputation, and behavior with multiple owners.

Exclude generated code and dependencies. Record inspected surfaces and gaps. Confirm disputed library behavior in official documentation for the installed version.

Every finding includes evidence, location, severity, expected result, impact, effort, change risk, dependencies, confidence, and required proof.

2. Rank

Do not invent a score. Put security and data-loss risks before normal impact-to-effort ordering. Severity measures defect risk. Impact over effort orders the roadmap.

Use repository history to weight code that changes often. Group findings with one root cause into one item. Label each item strong, worth exploring, or speculative. Mark estimated values as estimates. Diagnose only. Do not design the fix yet.

Read the full file on GitHub · 83 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 27d ago First seen · 83 lines · 18 tokens per session scan A 428fb4e790ac

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository reidemeister94/development-skills (12 stars, last pushed 26d ago), licensed MIT. It adds 18 tokens to every session and 713 once invoked, about $0.0001 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-09-20.

Related

Other skills, from other repositories

debug

Systematic bug investigation with a five-phase framework: reproduce, narrow, diagnose, fix, verify. Supports automated regression bisect via --regression flag. Produces a structured debug report with root cause analysis, regression test, and CQ/Q self-evaluations.

greglas75/zuvo · 55 tokens

ai-development-guide

Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.

shinpr/claude-code-workflows · 43 tokens

ring:searching-code

Forensic code search and analysis with optional Chain of Draft (CoD) ultra-concise mode. Five-phase methodology (clarification, planning, execution, analysis, synthesis) with severity assessment. Use for targeted investigation of specific patterns, bugs, or vulnerabilities. Skip for broad architecture mapping (use…

LerianStudio/ring · 74 tokens

ring:using-assert

Using lib-observability/assert, Lerian's runtime assertion package, in two modes. Sweep Mode detects panic()/log.Fatal zero-panic violations, DIY invariant checks, hand-rolled domain predicates, and missing InitAssertionMetrics. Reference Mode catalogs the asserter lifecycle, domain predicates, observability trident…

LerianStudio/ring · 99 tokens

ring:fixing-lint

Fixing lint to a clean state: runs the linter, groups reported issues into independent streams, and dispatches one parallel fixer agent per stream (ring:backend-go for Go, ring:general-purpose otherwise), iterating until clean. Use when a codebase has lint errors across multiple files. Skip for a single error (fix…

LerianStudio/ring · 96 tokens

ring:detecting-goroutine-leaks

Detecting goroutine leaks in Go: greps for goroutine patterns, audits goleak coverage (VerifyTestMain/VerifyNone), runs goleak, and dispatches ring:backend-go to fix leaks and add regression tests. Use after implementation or during review when code spawns goroutines or a leak is suspected. Runs before…

LerianStudio/ring · 109 tokens