Naming Variables

Generate descriptive, domain-aligned identifiers for variables, functions, classes, and parameters across languages.

41|27|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/obra/clank --skill naming-variables-obra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Naming Variables
Source: https://github.com/obra/clank/tree/main/skills/coding/naming-variables
Command: npx skills add https://github.com/obra/clank --skill naming-variables-obra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates confusing, cryptic variable names that make code hard to understand, maintain, and debug.

Core Features & Use Cases

  • Naming Principles: Apply 7 core principles for descriptive, accurate variable names.
  • Language Adaptations: Consistent naming patterns across Python, JavaScript, TypeScript, and Go.
  • Use Case: When reviewing code with vague names like temp, data, or x1, use this Skill to transform them into meaningful names like discriminant, customerCount, or isValid.

Quick Start

Use the Naming Variables skill to review and improve the variable names in this Python function that currently uses confusing temporary names.

Frequently Asked Questions about Naming Variables

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve variable names to make code more readable?

Use descriptive, domain-aligned identifiers that clearly convey purpose instead of cryptic abbreviations like `temp` or `x1`. Apply naming principles such as avoiding single letters, using qualifiers like `Count` or `Total` for numeric values, and adopting consistent conventions for booleans, constants, and collections across your codebase.

What makes a variable name clear and maintainable?

Clear variable names balance specificity with conciseness, reflect the problem domain, and follow language conventions. Problem-oriented names describe what the variable represents, obvious words convey intent, and consistent patterns for booleans (is-, has-), constants (UPPER_CASE), and collections (plural forms) reduce cognitive load during code review and maintenance.

How do I apply consistent naming conventions across Python, JavaScript, TypeScript, and Go?

Naming Variables guides language-specific conventions while preserving core principles: camelCase in JavaScript and TypeScript, snake_case in Python, and capitalized identifiers in Go. Core patterns—meaningful domain terms, qualifiers for aggregates, and clear boolean prefixes—translate across languages to maintain consistency in multi-language projects.

When should I refactor cryptic variable names in existing code?

Refactor during code review when vague names like `data`, `temp`, or single-letter variables appear, or proactively when maintaining legacy code. Naming Variables helps teams identify and replace confusing identifiers systematically, improving debuggability and reducing onboarding friction for new developers encountering the codebase.

Can I use this approach across different project types?

Yes. Naming Variables principles apply universally across project types—web applications, libraries, data processing scripts, and APIs. The approach addresses naming clarity whenever variable, function, class, or parameter names risk ambiguity, making it adaptable to any language or development context.

What naming patterns help avoid common mistakes?

Use qualifiers (Max, Min, Index, Total, Count) to clarify numeric intent, adopt boolean-specific prefixes (is-, has-), spell out abbreviated terms, and align names with domain vocabulary. Avoiding obvious misnomers—like naming unrelated data `temp`—and maintaining consistent capitalization conventions prevents confusion during development and code review.