clean-codejs-naming

SKILL.md

Clean Code JavaScript – Naming Patterns

Table of Contents

  • Principles
  • Variables
  • Functions
  • Booleans
  • Bad vs Good Examples

Principles

  • Names should reveal intent
  • Avoid abbreviations and mental mapping
  • Use domain language consistently

Variables

// ❌ Bad
const d = 86400000;

// ✅ Good
const MILLISECONDS_PER_DAY = 86400000;

Functions

// ❌ Bad
function getUser(u) {}

// ✅ Good
function fetchUserById(userId) {}

Booleans

// ❌ Bad
if (!user.isNotActive) {}

// ✅ Good
if (user.isActive) {}

Bad vs Good Examples

// ❌ Bad
const data = getData();

// ✅ Good
const usersResponse = fetchUsers();
Weekly Installs
8
First Seen
Feb 7, 2026
Installed on
opencode8
gemini-cli8
github-copilot8
codex8
kimi-cli8
amp8