refactor-rename

refactor-rename is a skill for Claude Code from helmedeiros/clean-code-skills. It costs 53 tokens per session (792 once invoked), scanned A, original, MIT.

A coding skill for replacing unclear, misleading, or overly generic names with names that explain what code elements are for.

In plain words
What is it for?
Use it when renaming variables, methods, classes, or modules, or when reviewing code with confusing identifiers.
Why use it?
Clear names make code easier to understand and reduce the need to inspect implementation details or add explanatory comments.

Skill for Claude Code

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

Part of the clean-code-skills plugin — 21 skills, 2 commands shipped together

Good fit Use it when renaming variables, methods, classes, or modules, or when reviewing code with confusing identifiers.

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

Made for: Claude Code.

Or install clean-code-skills, the plugin that ships this one along with the rest of its 21 skills, 2 commands.

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-rename

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/refactor-rename"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/refactor-rename.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 792 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.00053 $0.00792
Opus 5 $0.00026 $0.00396
Sonnet 5 $0.00011 $0.00158
Haiku 4.5 $0.00005 $0.00079

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

Security

Grade A, and why

refactor-rename 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 8d 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-rename/SKILL.md · 67 lines

How it starts

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

Refactoring: Meaningful Rename

Apply clear, intention-revealing names to variables, methods, classes, and modules so that code communicates its purpose without comments.

When This Skill Applies

  • Variable, method, or class names are abbreviations or single characters
  • Names are misleading or do not match current behavior
  • A reader needs to look at the implementation to understand a name
  • The user asks to improve readability or naming
  • During code review when names cause confusion

Core Principle

A name should tell you why something exists, what it does, and how it is used. If a name requires a comment to explain it, the name is wrong. Good names reduce the need for documentation and make code changes safer because intent is explicit.

Workflow

Step 1: Identify Naming Violations

Scan for single-character variables (outside trivial loops), abbreviations, generic names (data, info, temp, result, manager, handler), misleading names, or names that do not match current behavior.

Step 2: Understand the Purpose

Read how the identifier is used. What does it represent in the domain? What role does it play? The name should match the domain language, not the implementation mechanism.

Step 3: Choose a Better Name

Apply the naming rules: use nouns for variables and classes, verbs for methods, adjective phrases for booleans. Be specific. Prefer customerEmailAddress over email, isExpired over flag.

Step 4: Rename Across the Codebase

Use IDE rename refactoring or search-and-replace to update all references. Check test files, configuration, documentation, and API boundaries.

Step 5: Verify

Run the test suite. Check that no references were missed. Confirm the new name reads naturally in context.

Detection / Indicators

  • Single-letter variables outside loop counters: x, d, t
  • Generic names: data, info, result, temp, obj, val
  • Misleading names: isEnabled when it means isVisible
  • Abbreviated names: usr, mgr, btn, cfg
  • Names that include type: userList, nameString (the type system handles this)
  • Encoded names: m_name, str_value, i_count (Hungarian notation)

Read the full file on GitHub · 67 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. 8d ago First seen · 67 lines · 53 tokens per session scan A a31038d4f53c

Subscribe to this mod's changes

refactor-rename is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 53 tokens to every session and 792 once invoked, about $0.0003 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

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens

sip

After you create or change an artifact or skill, taste-test it with our own skills instead of trusting your in-session judgment — recursive self-improvement, made automatic. Use right after writing or editing anything, before calling it done, committing, or handing it off.

LilMGenius/paperthin · 55 tokens

prism

Split one artifact — a claim, plan, or file — across 2 to 5 independent lenses, one per genuinely distinct failure mode (correctness, security, readability, cost, adversarial-user), and return their convergence: where they agree, where they disagree, and the single next question that resolves the disagreement. Use…

LilMGenius/paperthin · 98 tokens

hate

Attack a plan, design, or argument like you want it to fail before you commit real effort — return the single load-bearing objection and the cheapest experiment that would prove it matters, not a checklist. User-invoked on purpose: a hate-it reflex always in the agent's reach would bias it toward demolition. Weighs…

LilMGenius/paperthin · 79 tokens

issue-analyze

GitHub Issue and PR review thread deep analysis with Codex blind verdict. Use when: analyzing issue root cause, classifying problems, investigation planning, triaging PR review comments for actionability. Not for: fixing bugs (use bug-fix), code exploration (use code-explore). Output: classified analysis + verdict…

sd0xdev/sd0x-harness · 73 tokens

load-pr-review

Load GitHub PR review comments into AI session — analyze, triage, plan. Default: analysis-only (no auto-fix). Use when: reviewing PR feedback, planning fixes, addressing review comments, replying to reviewers. Not for: creating reviews (use codex-review-fast), creating PRs (use create-pr), viewing PR status (use…

sd0xdev/sd0x-harness · 77 tokens