Home / Market / naming analyzer

naming analyzer

Suggest better variable, function, and class names based on context and conventions.

skill★ 348000 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

Naming Analyzer Skill

A skill for Claude Code that analyzes code naming conventions and suggests better variable, function, class, and other identifier names based on context and industry standards.

Purpose

Good naming is one of the most important aspects of readable, maintainable code. This skill helps developers:

Poor naming leads to bugs, confusion, and wasted time. This skill acts as an expert code reviewer focused specifically on naming quality.

When to Use

Use this skill when you want to:

Trigger phrases:

How It Works

  1. Analysis Phase: The skill examines all identifiers in the target code:
  1. Issue Detection: Each identifier is evaluated for common problems:
  1. Convention Checking: The skill validates against language-specific standards:
  1. Report Generation: A structured report is produced with:

Key Features

Multi-Language Support

Understands naming conventions for JavaScript, TypeScript, Python, Java, Go, and more. Automatically adapts recommendations to the language being analyzed.

Severity Classification

Issues are categorized by impact:

| Severity | Description | Example | |----------|-------------|---------| | Critical | Misleading names that could cause bugs | getUser() that also modifies data | | Major | Unclear names requiring mental effort to understand | proc(data) instead of processApiResponse(response) | | Minor | Convention violations that affect consistency | API_url instead of API_URL |

Boolean Naming Guidance

Enforces clear boolean prefixes:

Magic Number Detection

Identifies unnamed numeric literals and suggests meaningful constant names:

// Before
if (age > 18) { }
setTimeout(callback, 3600000);

// After
const LEGAL_AGE = 18;
const ONE_HOUR_IN_MS = 60 * 60 * 1000;

if (age > LEGAL_AGE) { }
setTimeout(callback, ONE_HOUR_IN_MS);

Refactoring Support

Can generate refactoring scripts to apply naming changes across the codebase while maintaining git history.

Usage Examples

Analyze a single file:

@naming-analyzer UserService.js

Analyze an entire directory:

@naming-analyzer src/

Show naming conventions reference:

@naming-analyzer --conventions

Analyze and suggest fixes for all issues:

@naming-analyzer --fix-all

General invocation:

@naming-analyzer

Then provide the code or file path when prompted.

Output

The skill produces a detailed markdown report containing:

Summary Section

## Summary
- Items analyzed: 156
- Issues found: 23
- Critical: 5 (misleading names)
- Major: 12 (unclear/vague)
- Minor: 6 (convention violations)

Issue Details

Each issue includes:

Suggested Renaming

Prioritized list of all recommended changes:

Best Practices

Do

Don't

Acceptable Abbreviations

Some abbreviations are well-known and acceptable:

Naming Decision Tree

Is it a boolean?
├─ Yes → Use is/has/can/should prefix
└─ No → Is it a function?
    ├─ Yes → Use verb phrase (action)
    └─ No → Is it a class?
        ├─ Yes → Use noun (PascalCase)
        └─ No → Is it a constant?
            ├─ Yes → Use UPPER_SNAKE_CASE
            └─ No → Use descriptive noun (camelCase/snake_case)

Notes