agentleFS
Smaui94Smaui94/ClaudeSkillCollection/naming-review/SKILL.md

naming-review

Skill0 starsChanged 10 days agoMITView on GitHub

Review names in code for consistency and clarity - language naming conventions (camelCase/snake_case/PascalCase), meaningless names (data, tmp, foo), misleading names (isX that isn't a bool, getX with side effects), unclear abbreviations, synonyms for the same concept and mixed naming schemes. Suggests better names but never renames anything. Use when asked to review/check naming, variable names, identifiers or "are my names good", in any language.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every finding has a concrete location and a concrete suggestion.

    line 55
  2. Distinctive:

    Do not change code. Apply renames only when the user explicitly asks for it.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Naming review

Review only: report findings with a suggested name, never rename anything unless the user explicitly asks. Renaming public API breaks callers; say so whenever a finding concerns a public/exported name.

Scope

Check the files/directories the user names, otherwise the whole repo. Skip .git/, build output, vendor/, node_modules/, .venv/, generated code, and names dictated by external APIs, frameworks, file formats or databases (e.g. JSON fields, ORM columns, overridden methods) - report those only as info if they leak deep into the code.

Steps

  1. Detect languages and any naming config (.editorconfig naming rules, Checkstyle, ESLint naming-convention, ruff N, pylint, clang-tidy readability-identifier-naming). The project config wins over language defaults.
  2. Build a short glossary of the domain terms used in the code (types, modules, comments, README). Use it to find synonyms (NM5) and misleading names (NM3).
  3. Go through declarations (types, functions, parameters, fields, constants, files) and the most-used local variables.
  4. Report (format below).

Language conventions (defaults when the project has none)

LanguageTypesFunctions/methodsVariables/paramsConstants
Java, KotlinPascalCasecamelCasecamelCaseUPPER_SNAKE
C#PascalCase (interfaces IName)PascalCasecamelCase, private fields _camelCasePascalCase
C++ (Google)PascalCasePascalCasesnake_case, members snake_case_kPascalCase
PythonPascalCasesnake_casesnake_caseUPPER_SNAKE
JS / TSPascalCasecamelCasecamelCaseUPPER_SNAKE or camelCase
GoPascalCase exported, camelCase internalsameshort camelCasePascalCase/camelCase
RustPascalCasesnake_casesnake_caseUPPER_SNAKE
GDScriptPascalCasesnake_casesnake_caseUPPER_SNAKE
Shell–snake_casesnake_caseUPPER_SNAKE

Rules

  • NM1 warning: violates the language/project convention (table above)
  • NM2 warning: meaningless name: data, info, obj, thing, stuff, tmp, temp, val, foo, bar, test1, result2, doIt, handle, process, manager/helper/util classes with mixed responsibilities; single letters outside short loops/lambdas (i, j, k, x/y for coordinates, e for exceptions are fine)
  • NM3 error: misleading name:
    • is/has/can/should prefix on something that isn't a boolean
    • get/find/calculate that changes state, does I/O or is expensive without saying so
    • singular name for a collection, plural for a single item; list/array in the name of a set/map
    • name describes something other than what the code does (validateUser that also saves it)
    • wrong unit or missing unit (timeout = 30 - seconds or ms? → timeoutSeconds)
  • NM4 warning: unclear abbreviation (calcTtlAmt, usrMgr, cfgPrsr); common ones are fine (id, url, http, db, io, min/max, config, args)
  • NM5 warning: several names for the same concept (fetchUser / getCustomer / loadClient for one entity; remove/delete mixed) or one name for different concepts
  • NM6 info: mixed naming schemes in one project or file (snake_case and camelCase functions side by side)
  • NM7 warning: type or scope encoded in the name (Hungarian strName, iCount, m_ in languages that don't use it, IFoo outside C#/TS conventions, fooList when the type already says it)
  • NM8 warning: negated booleans (isNotEnabled, disableLogging = false) - double negations in conditions
  • NM9 info: name length doesn't fit the scope (long-lived global named t; local loop index named currentIterationIndexCounter)
  • NM10 warning: shadows a builtin or an outer name (list, id, str, type, input in Python; name/event globals in JS; parameter hiding a field without this.)
  • NM11 info: file/module name doesn't match its main content (utils.py with only date logic → date_utils.py)

Report

In the user's language, grouped by file:

path/to/file:line - error|warning|info - <ID> <rule> - `oldName` → `suggestedName` - <why it is a problem>
  • Every finding has a concrete location and a concrete suggestion. Mark uncertain ones as "possible" (e.g. NM3 when you can't see all usages).
  • Mark public/exported names with "(public API - renaming breaks callers)".
  • Bulk hits with one root cause (e.g. a whole module in the wrong case style): report once with count and 2-3 samples.
  • NM5 findings: list all variants found with locations and propose one term for the glossary.
  • End with a summary: findings per severity, the proposed glossary of domain terms, then the 3 most important things to fix first.
  • Do not change code. Apply renames only when the user explicitly asks for it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.