Expert code naming review and refactoring. Reviews variables, functions, and classes to improve readability and maintainability using master-level naming principles. Use when: (1) User asks to review naming/variable names in code, (2) User wants to improve code readability, (3) User requests naming suggestions or refactoring, (4) User mentions code quality or maintainability concerns related to naming, (5) User asks to apply best practices to naming
Expert-level code naming review that analyzes variables, functions, and classes, then applies master programming principles to improve readability and maintainability.
Ask the user to specify what code to review:
Before reviewing, load the comprehensive naming guidelines:
references/naming-principles.md for master-level naming principlesreferences/antipatterns.md for common mistakes to detectThese references contain detailed examples and language-specific conventions.
Systematically review all identifiers in the specified code:
Variables:
Functions/Methods:
Classes:
General:
Cross-reference findings with references/antipatterns.md to identify:
Check for project conventions:
Common project-specific considerations:
Directly produce refactored code with:
Format:
# Original code snippet for reference
[original code]
# Refactored code with improved naming
[refactored code]
# Summary of changes:
- oldName → newName: [reason]
- ...
For each significant rename, provide:
Example:
process() → parseJsonAndValidate()
Why: Generic verb "process" doesn't reveal intent. New name describes specific actions.
Principle: Use specific verbs over generic ones (naming-principles.md, section 4)
If code mixes languages (e.g., JavaScript and Python), apply appropriate conventions to each:
When reviewing established codebases:
Respect specialized terminology:
When multiple valid approaches exist:
Structure your response as:
Executive Summary:
Refactored Code:
Detailed Changes:
Recommendations:
Every rename should:
Avoid:
Load these before beginning any review to ensure comprehensive, consistent analysis.