← ClaudeAtlas

code-conventionslisted

Project-wide coding standards for naming, formatting, error handling, security, and testing. Load this when writing or reviewing code. Covers all layers (files, functions, classes, constants, database columns) and languages in use. Do not duplicate these rules in agent prompts — load this skill instead.
telus-labs/stagecraft · ★ 0 · AI & Automation · score 70
Install: claude install-skill telus-labs/stagecraft
# Code Conventions This skill contains project-wide coding standards. Agents load this when writing or reviewing code. Do not duplicate these rules in agent prompts. Each rule is paired with a concrete example. Reviewers cite the rule name (e.g. "BLOCKER: code-conventions #magic-number") so the author can find the rule and the example without context-switching. ## General - **#explicit-over-clever** — Code is read more than it is written. ```ts // BAD: clever — what does the !! do? what's the precedence? const isReady = !!user && !!user.config && !!user.config.ready; // GOOD: explicit — reads top-to-bottom. const isReady = user != null && user.config != null && user.config.ready === true; ``` - **#docstring** — Every exported function has a docstring/JSDoc. - **#magic-number** — Use a named constant when a literal would otherwise be unexplained. ```ts // BAD: what is 86400000? setTimeout(reload, 86400000); // GOOD: const MS_PER_DAY = 24 * 60 * 60 * 1000; setTimeout(reload, MS_PER_DAY); ``` - **#no-commented-code** — No commented-out code in commits. Use git history if you need to remember what was there. ## Naming | Layer | Convention | Example | |---|---|---| | Files | `kebab-case` (all languages) | `user-store.ts`, `user_store.py`, `UserStore.kt` is wrong | | Classes / Types | `PascalCase` | `UserStore`, `OrderId` | | Functions / variables | `camelCase` | `getUser`, `orderCount` | | Constants | `SCREAMING_SNAKE_CASE` | `MAX_RETRIES`, `JWT_