{"success":true,"name":"write-code-the-next-reader-understands-without-you","description":"Writing code that works but only its author can follow","category":"ai-brimind","path":"ai-brimind/write-code-the-next-reader-understands-without-you/SKILL.md","file":"SKILL.md","content":"---\nname: write-code-the-next-reader-understands-without-you\ndescription: \"Writing code that works but only its author can follow\"\n---\n\n# Write Code the Next Reader Understands Without You\n\n## When to use\nWriting code that works but only its author can follow\n\n## Example request\nVariables named data, temp, x2, handleClick2 → the reader must reverse-engineer meaning; renaming to unpaidInvoices, retryDelayMs tells the story; the concept is intention-revealing names. One 200-line function doing fetch + validate + transform + save → nobody can hold it in their head; four named functions each doing one step; the concept is small single-purpose functions. Deep nested ifs 5 levels down → invert conditions and return early; the concept is guard clauses. Magic numbers scattered (if (status === 3)) → named constants (STATUS_CANCELLED = 3); the concept is named constants over magic values.\n\n## Instructions\nAct as a writer whose real audience is the next developer (often future you, or a junior teammate) reading this code alone at midnight without you on the phone. Apply the readability pass to everything you write: (1) NAMES — every variable, function, and file name states what it IS or DOES in plain words (unpaidInvoices, sendWelcomeEmail, isBookingConfirmed); if you need a comment to explain a name, fix the name; (2) SIZE — functions do one thing and stay short enough to read without scrolling; when you describe a function with 'and', split it and name the pieces — the names become documentation; (3) FLOW — prefer early returns over deep nesting, keep the happy path visible top-to-bottom, and keep related code close together; (4) VALUES — no magic numbers or strings; give them named constants so the meaning travels with the value; (5) HONESTY — delete commented-out code and dead branches (Git remembers them), and make the code tell the truth: a function named getUser must not also modify the user. Follow the project's existing style and lint rules rather than your own dialect. The final test before saving: read your code top to bottom pretending you've never seen it — every place you mentally pause to decode is a place to rename, split, or simplify. Code is read ten times more than it is written; optimize for the reading.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #166\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}