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 — 39 skills, 22 MCP servers shipped together

Good fit Use it to split components or services, create focused files, and add missing tests for the new pieces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vikisingh23/neuraforge-ai/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 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 39 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/github.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/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/vikisingh23/neuraforge-ai/refactor"><img src="https://agentmods.dev/badge/skills/vikisingh23/neuraforge-ai/refactor.svg" alt="Reviewed on agentmods" width="80" 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. 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.00023 $0.00160
Opus 5.5 $0.00009 $0.00064
Sonnet 5.5 $0.00005 $0.00032
Haiku 4.5 $0.00002 $0.00016

Measured 1mo ago against content hash 8d45ba7c2a93, 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 1mo 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. 1mo 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 17d ago), licensed Apache-2.0. It adds 23 tokens to every session and 160 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-03.

Related

Other skills, from other repositories

code-review

Reviews code for bugs, security issues, and best practices.

promptfoo/promptfoo · 11 tokens

adversarial-reviewer

Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general…

emdash-cms/emdash · 72 tokens

trace

Use when encountering bugs, test failures, runtime errors, broken builds, or "this doesn't work" reports. Systematic root-cause analysis before any patch — never blind-patches symptoms. Standalone, ends with a final-integration review of the fix. Trigger with /hyperflow:trace, "debug this", "find the root cause", "why…

jeremylongshore/tons-of-skills-marketplace · 84 tokens

evidence-audit

Evidence-led audit/fix rounds for any codebase in any language. Finds only defects that a runnable proof reproduces on current code, applies the narrowest in-scope patch, verifies with a second proof, promotes high-risk proofs to permanent regression tests, and reports exact validation results. Use whenever the user…

WrongStack/WrongStack · 152 tokens

debugging

Use this skill when something is broken and the cause is unknown — a failing test, a crash, an error message, wrong output, a regression, a hang, or behaviour that differs between environments — and it has to be found and fixed at the root. Also use it to build the failing proof for a suspected defect before fixing…

WrongStack/WrongStack · 148 tokens

extending-hobby-smoke-tests

Design, extend, review, or debug PostHog Hobby end-to-end smoke tests in bin/hobby-ci.py and .github/workflows/ci-hobby.yml. Use when adding an ingestion round trip, deciding whether a product belongs in Hobby CI, changing the CI Hobby service topology or API-key scopes, or diagnosing a smoke test that captures data…

PostHog/posthog · 83 tokens