refactor

refactor is a skill for Claude Code from vikisingh23/neuraforge-ai. It costs 23 tokens per session (160 once invoked), scanned A, original, Apache-2.0.

A refactoring assistant that breaks a complex file or folder into smaller, focused pieces and updates the related imports.

In plain words
What is it for?
Use it to split components or services, create focused files, and add missing tests for the new pieces.
Why use it?
It helps make code easier to test and maintain when one file has too many responsibilities.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the neuraforge-ai plugin — 38 skills, 22 MCP servers shipped together

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 skills/vikisingh23/neuraforge-ai/refactor
Any agent
npx skills add vikisingh23/neuraforge-ai --skill refactor
Clone the repo
git clone --depth 1 https://github.com/vikisingh23/neuraforge-ai

Made for: Claude Code.

Or install neuraforge-ai, the plugin that ships this one along with the rest of its 38 skills, 22 MCP servers.

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/vikisingh23/neuraforge-ai/refactor.svg)](https://agentmods.dev/skills/vikisingh23/neuraforge-ai/refactor)
Your own site
<a href="https://agentmods.dev/skills/vikisingh23/neuraforge-ai/refactor"><img src="https://agentmods.dev/badge/skills/vikisingh23/neuraforge-ai/refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00023 $0.00160
Opus 5 $0.00012 $0.00080
Sonnet 5 $0.00005 $0.00032
Haiku 4.5 $0.00002 $0.00016

Measured 2d ago against content hash 8d45ba7c2a93, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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 · 25 lines

What it actually says

Break down complex files into focused, testable pieces.

How to use

Point at a file: "Refactor src/services/OrderService.ts"

The agent will:

  1. Analyze responsibilities (how many things does it do?)
  2. Plan the split with file names and line estimates
  3. Generate focused files, update all imports
  4. Generate missing tests for new files

Rule: Components <150 lines, Services <300 lines.

For full instructions, read agents/refactor.md.

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. 2d ago First seen · 25 lines · 23 tokens per session scan A 8d45ba7c2a93

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository vikisingh23/neuraforge-ai (4 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 23 tokens to every session and 160 once invoked, about $0.0001 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-03.