# Clean Codejs Naming

> Naming patterns and conventions based on Clean Code JavaScript principles.

- Skill: `damianwrooby/clean-codejs-naming` (Agent Skill)
- Install (CLI): `npx skillmds@latest add damianwrooby/clean-codejs-naming`
- Raw SKILL.md: https://api.skillmd.com/api/skills/damianwrooby/clean-codejs-naming/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: damianwrooby (https://skillmd.com/u/damianwrooby)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/damianwrooby/clean-codejs-naming

---


# 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

```js
// ❌ Bad
const d = 86400000;

// ✅ Good
const MILLISECONDS_PER_DAY = 86400000;
```

## Functions

```js
// ❌ Bad
function getUser(u) {}

// ✅ Good
function fetchUserById(userId) {}
```

## Booleans

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

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

## Bad vs Good Examples

```js
// ❌ Bad
const data = getData();

// ✅ Good
const usersResponse = fetchUsers();
```

