From code-quality
Check variable names in project source files for appropriateness and suggest improvements
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-quality:check-namingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scan source files for poorly named variables, functions, parameters, and other identifiers, then suggest clearer
Scan source files for poorly named variables, functions, parameters, and other identifiers, then suggest clearer
alternatives. The user can optionally specify a scope — a single file path, a package/directory path, or project
(the default) to check everything.
Determine scope: Parse the optional argument to decide what to scan.
src/main/kotlin/Foo.kt), scan only that file.src/main/kotlin/com/example/api), scan all source files under
that directory.project is given or no argument is provided, scan all source files in the project.Discover source files: Based on the scope, glob for source files. Use language-appropriate patterns for the
project (e.g., **/*.kt, **/*.java, **/*.ts, **/*.py, **/*.go). Exclude generated code, build output,
and node_modules.
Read every file in the scope to understand the full context before making judgments. Variable names that seem unclear in isolation may make perfect sense within their surrounding code.
Evaluate identifier names by checking for these issues:
Single-letter or overly short names (outside of conventional uses like i/j for loop indices, e for
exceptions, x/y for coordinates):
a, b, s, t, m that carry no meaningmgr, ctx, val, btn — unless idiomatic for
the language/framework)Overly long or verbose names:
numberOfItemsInTheShoppingCart vs cartItemCount)userDataInfo, stringValue)Misleading or inaccurate names:
status vs isActive)List named item instead of items)Inconsistent conventions:
camelCase mixed with snake_case in a language
where one is standard)user in one file and account in another for the
same entity)Generic or meaningless names:
data, result, value, item, temp, obj, thing, stuff, info, tmp when a more descriptive
name is possiblehandle, process, manage, do as function prefixes that don't convey specific behaviorCompile findings: For each issue found, record:
Report: Present the findings grouped by file. For each file, list the identifiers with issues in a table:
### path/to/file.kt
| Line | Current Name | Issue | Suggested Name(s) |
|------|--------------|--------------------|--------------------------|
| 12 | `s` | Too short | `searchQuery`, `input` |
| 34 | `processIt` | Vague function name| `validateOrder` |
End with a summary line: how many files scanned, how many identifiers flagged, and a breakdown by issue category.
n in a well-known algorithm
implementation may be perfectly appropriate._ for unused variables in Go/Kotlin, self/cls in Python, and $ prefixes
in shell scripts are all conventional and should not be flagged.ctx in Go's context.Context
or req/res in Express handlers).npx claudepluginhub mattbobambrose/mattbobambrose-claude-skills --plugin code-qualitySuggests improved names for variables, functions, classes, files, DB tables, and API endpoints using language-specific conventions like camelCase or snake_case.
Enforces precise naming for variables, functions, classes, files, and identifiers. Bans vague names like data/temp/result/info/handle/manager; promotes semantic accuracy and domain-specific terms via specificity ladder.
Critiques identifier names (variables, functions, types, files) for clarity, concreteness, and weight. Uses a rubric catalog from Martin/Beck/Karlton for PR review and refactoring.