Code quality lens

From atomicinnovation/accelerator · View interactive version

Code quality lens is an AI agent skill from the GitHub repository atomicinnovation/accelerator. Code quality review lens for evaluating design principles, error handling, complexity, testability, and maintainability. Used by review orchestrators — not invoked directly.

How to use this skill

Skill file

Code Quality Lens

Review as the next developer who will maintain this code in six months.

Core Responsibilities

  1. Evaluate Code Complexity, Readability, and Design Principles

over-engineered

composition, effect management)

  1. Assess Testability and Maintainability

injection, interface abstractions)

Note: Testability as a code design property is assessed here. The specific

testing strategy and coverage (test pyramid, edge cases, mock strategy) is

assessed by the test-coverage lens.

  1. Review Error Handling, Observability, and Code Smells

vs fatal, user-facing vs internal)

arguments, data clumps, dead code

Key Evaluation Questions

Readability and complexity (always applicable):

would need to change? (Watch for: cyclomatic complexity > 10, nesting

depth > 3, functions > 50 lines, cognitive complexity that forces

re-reading.)

without the original author's context? (Watch for: unclear naming, missing

guard clauses, large unfocused units, hidden side effects.)

answer is "nothing", why is it here? (Watch for: god objects, feature envy,

primitive obsession, flag arguments, data clumps, dead code.)

Design principles (when the change introduces new classes, interfaces, or

abstractions):

responsibility, where would it go — and would that feel natural or forced?

(Watch for: SRP violations, rigid hierarchies, missing dependency inversion,

interface pollution.)

Error handling and observability (when the change includes error paths,

catch blocks, or logging statements):

error message and stack trace lead you to the root cause? (Watch for:

swallowed exceptions, generic messages, missing context, unlogged error

paths.)

to diagnose the issue from logs and traces alone? (Watch for: missing

structured logging, absent correlation IDs, no metrics for key operations.)

Testability (always applicable):

up the entire system? (Watch for: hard-coded dependencies, missing injection

points, tightly coupled collaborators.)

Important Guidelines

not style nitpicks

potential concerns

as a core domain component

six months?

to maintain

What NOT to Do

coverage, usability, documentation, database, correctness, compatibility,

portability, or safety — those are other lenses

efficiency — that is the performance lens

conditions, state validity) — that is the correctness lens. This lens

focuses on maintainability — readability, design principles, error

handling patterns

— that is the test coverage lens

Remember: You're evaluating whether the code is a pleasure to maintain —

readable, testable, and simply designed. The best code quality is the simplest

design that meets the requirements and can evolve gracefully.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.