refactor-guide

refactor-guide is a skill for Claude Code, Codex from mohitmishra786/anti-vibe-skills. It costs 88 tokens per session (1,461 once invoked), scanned A, original, MIT.

A code-smell guide that names structural problems in source code and explains their effects without providing replacement code or prescribing a fix.

In plain words
What is it for?
Use it when code feels hard to work with and you need concrete, named problems to discuss before making changes.
Why use it?
It helps developers understand why code is becoming difficult to maintain while leaving the design decision to them.

Skill for Claude CodeCodex

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

Good fit Use it when code feels hard to work with and you need concrete, named problems to discuss before making changes.

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

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 refactor-guide

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/anti-vibe-skills/refactor-guide"><img src="https://agentmods.dev/badge/skills/mohitmishra786/anti-vibe-skills/refactor-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,461 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.00088 $0.01461
Opus 5 $0.00044 $0.00731
Sonnet 5 $0.00018 $0.00292
Haiku 4.5 $0.00009 $0.00146

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

Security

Grade A, and why

refactor-guide 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 11d 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/process-quality/refactor-guide/SKILL.md · 127 lines

How it starts

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

refactor-guide

Purpose

Identify code smells by name and describe their impact on the codebase — never show the refactored version, never write the replacement code, never prescribe which refactoring to apply.

Hard Refusals

  • Never show refactored code — not even "it could look something like this." The human must write the improvement.
  • Never name a specific refactoring technique and tell the human to apply it — "extract this into a method" is a prescription. Name the smell instead and let the human decide.
  • Never say the code is clean — code always has tradeoffs; approval without full context is not useful.
  • Never prioritize the refactoring backlog for the human — ordering which smells to fix first is a judgment call that belongs to the human.
  • Never refactor in service of aesthetics — only engage with smells that have a named, concrete cost.

Triggers

  • "This code needs refactoring / cleaning up"
  • "This feels wrong but I don't know why"
  • "How do I make this better?"
  • "This is getting hard to work with"
  • Code pasted with a request for structural improvement

Workflow

1. Get the context before reading the code

Before examining code, ask the human for context.

AI Asks Purpose
"What is this code supposed to do?" Establishes intent to assess deviation
"What makes it hard to work with right now? What's the pain?" Surfaces the human's felt problem
"How often does this code change? Who changes it?" Establishes the change frequency context for smell severity
"What's changed recently that made this feel wrong?" Often points directly to the smell

Gate 1: Human has described intent, pain, change frequency, and recent context.

Memory note: Record the pain description in SKILL_MEMORY.md.

2. Identify and name code smells

Read the code and produce a list of named code smells. Each entry must follow this format:

Smell: [name of the smell]
Location: [where in the code — function name, line range, pattern]
Impact: [what becomes harder because of this smell — reading, testing, changing, debugging]

Read the full file on GitHub · 127 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. 11d ago First seen · 127 lines · 88 tokens per session scan A babf85814d42

Subscribe to this mod's changes

refactor-guide is a skill published in the GitHub repository mohitmishra786/anti-vibe-skills (5 stars, last pushed 6mo ago), licensed MIT. It adds 88 tokens to every session and 1,461 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.

Related

Other skills, from other repositories

refactoring-workflow

Improve the structure of existing code without changing its behaviour, in small verified steps under a green test suite. Use when the user asks to refactor, clean up, restructure or simplify code, wants to reduce duplication or coupling, is preparing a codebase for a feature it cannot currently accommodate, or when…

personamanagmentlayer/pcl · 83 tokens

code-quality-review

A code-review guide for judging whether software stays easy to understand, change, test, and extend.

bahayonghang/my-ai-cli-toolkit · 149 tokens

codebase-organizer

Universal codebase operations: analyze, organize, and architecturally deepen any repo. Two commands: /organize for read-only analysis and /deepen for multi-agent refactoring. Use when the user wants a codebase scan, deep module scoring, dependency mapping, architectural improvement, or code-to-skill conversion.…

AnkitClassicVision/ankit_shared_skills · 116 tokens

arch-optimize

A software architecture review workflow that scans a codebase for structural risks and measures code quality. It checks issues such as overly complex code, repeated knowledge, changes spreading across many files, circular dependencies, and distorted domain models.

bfxh/arch-optimize · 103 tokens

improve-codebase-architecture

Use when surfacing architectural friction inside a single EVOKORE bounded context and proposing deepening refactors (shallow modules, leaky seams, low locality) that turn shallow modules into deep ones — informed by ADR-0005 bounded contexts and the project's domain language.

mattmre/EVOKORE-MCP-PUBLIC · 61 tokens

improve-codebase-architecture

Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.

sakuradairong/omp-config · 68 tokens