Agent skill · mindrally
clean-code
Clean, maintainable, human-readable code principles combined with anti-over-engineering discipline: naming, single responsibility, DRY, and scoping changes to exactly what was requested. Use when writing new code, refactoring existing code, reviewing code for quality, or deciding how much abstraction a change actually needs.
What it needs
About 5k tokens when loaded.
What this skill does
Clean Code This skill covers writing code that is easy to read and change, and — just as important — avoiding the over-engineering that makes code harder to read and change in the name of "best practices." Both halves matter together: clean code is simple code, not merely well-decorated code. Workflow for Writing or Reviewing Code 1. Scope the change — Identify exactly what was asked for. Note what's out of scope before writing anything. 2. Reach for the simplest solution first — Prefer the direct, obvious implementation over a general or configurable one, unless a concrete current need justifies more. 3. Name things for their purpose — Choose names that reveal intent before writing the body of a function or the shape of a type. 4. Keep functions single-purpose — If a function needs a comment to explain what it does, split it. 5. Remove duplication deliberately — Extract shared logic only once it's actually duplicated (see Rule of Three below), not preemptively. 6. Write or update tests — Cover the new behavior and the edge cases it introduces. 7. Verify scope before delivery — Confirm only the requested code changed, check for a simpler approach you might have missed, and confirm no unrequested files were touched. Meaningful Names Variables, functions, and classes should reveal their purpose from the name alone. Names should explain why something exists and how it's used, not just its type or contents (activeUserIds, not list1). Avoid abbreviations unless they're universally understood in the domain (id, url — fine; usrCfgTmp — not fine). Constants Over Magic Numbers Replace hard-coded values with named constants (MAXRETRYCOUNT = 3, not a bare 3 three call sites later). Use descriptive constant names that explain the value's purpose, not just its value. Keep constants at the top of the file or in a dedicated constants module when shared across files. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills mindrally/clean-code