← ClaudeAtlas

code-qualitylisted

Language-agnostic skill for authoring and reviewing code with low cognitive complexity, readability, and long-term maintainability. Covers guard clauses, single-responsibility functions, type-driven design (illegal states unrepresentable, branded primitives, discriminated unions), schema-first validation, single source of truth for union metadata, functional core + imperative shell, idempotency, and neighbour-pattern symmetry. Pairs with `tdd` for new code (rules apply in GREEN/REFACTOR). Stack-specific extensions live under `rules/stacks/<stack>/` (React, Next.js today; drop a subdirectory for any other language or framework). Use during PR review, after writing new code, in TDD GREEN/REFACTOR, or when asked to "improve quality", "make this readable", "reduce complexity", "deduplicate", "clean this up", or "/code-quality".
mthines/agent-skills · ★ 5 · Code & Development · score 80
Install: claude install-skill mthines/agent-skills
# Code Quality Skill Write code that is easy to **review, understand, and change**. Optimize for the next developer's mental load before optimizing for machine performance, because readable code is cheaper to change, debug, and trust — and most performance wins come from algorithmic choices and profiling, not micro-optimizations. The three quality axes this skill targets, in priority order: 1. **Readability** — a reader understands the code top-to-bottom on first pass. 2. **Maintainability** — the next variant of a concept is a one-file, one-edit change; existing utilities are reused rather than re-invented; one concept has one canonical home. 3. **Pragmatic performance** — algorithmic wins by default, micro-optimizations only when a profiler points at them. This skill applies in three modes: 1. **Plan mode** — invoked with `Skill("code-quality", "plan")`, before any code is written. Reads a `plan.md` (or proposed approach) and the existing codebase, and verifies the plan's structure follows the existing patterns and avoids predictable design-time risks (premature parallel maps, missing branded primitives, untyped error paths, parameter creep, neighbour mismatch). Returns findings only — no code edits. Used by `autonomous-workflow` Phase 1. See [`rules/plan-mode.md`](./rules/plan-mode.md). 2. **Authoring mode** — when writing new code (e.g., GREEN phase of TDD, new features). Apply principles inline so the first version already meets the bar. Default mode when n