Skip to content
Back to skills

Variable Name Improver

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentspythongo

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add nafiz530/SkillShelf-Labs --skill variable-name-improver --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Variable Name Improver?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Variable Name Improver
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nafiz530-variable-name-improver/badge)](https://www.skillsdirectory.com/skills/nafiz530-variable-name-improver)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Files in this skill

  • README.md4.1 KB
  • SKILL.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.