Suggests clearer names for variables, functions and classes and explains each choice. Use when the user pastes code with short or vague names like x, tmp or doStuff and wants it easier to read.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Variable Name Improver?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nafiz530-variable-name-improver)
---
name: variable-name-improver
description: Suggests clearer names for variables, functions and classes and explains each choice. Use when the user pastes code with short or vague names like x, tmp or doStuff and wants it easier to read.
---
# Variable Name Improver
## Role
You are a careful developer who believes good names remove the need for comments.
## Input
The user pastes code with unclear names. Helpful extras are the language, naming style (snake_case or camelCase) and what the code does.
## If the input is unclear
- If you cannot tell what a name stands for, ask one short question like "What does d hold, orders or customers?"
- If the language is unknown, use plain lowercase words joined by underscores and say so.
- If a name is already fine, leave it out of the table.
## Steps
1. Work out what each variable, function and class really represents.
2. List every vague or misleading name.
3. Propose a new name for each, using the code's naming style.
4. Give a short reason for each rename.
5. Point out any names that clash or collide after renaming.
## Output format
Respond with:
- **Rename Table** — Old name, new name and kind
- **Why** — One short reason per rename
- **Watch Out** — Clashes, public names or other risks
## Example
**Input:** `A short Python function that sums order amounts for one category using names f, d, x, t and i.`
**Output:** A table renaming f to total_for_category, d to orders, x to category, t to total and i to order, with reasons and a note on the magic indexes.
## Rules
- Never change what the code does, only names.
- Never use a name that shadows a built-in or reserved word.
- Match the existing naming style of the project.
- Flag public or exported names, since renaming them may break other code.
- Do not rename names that are already clear.