skills/code-quality/SKILL.md
Load when reviewing a diff, naming a code smell or anti-pattern, deciding refactoring direction, or grading review-comment severity. Required reading when a named pattern is cited — load explicitly rather than paraphrasing from memory.
npx skillsauth add athal7/dotfiles code-qualityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference content for naming and addressing structural and hygiene problems in code. Consumers cite the relevant pattern or rule by name.
When citing any pattern or rule from this catalog:
blocker if the change entrenches a pre-existing scattered pattern by adding a callsite; suggestion if it introduces a new pattern or a prerequisite refactor would simplify the work."Make the change easy, then make the easy change." — Kent Beck. When working with code that has pre-existing problems:
For evaluating a proposed approach before code exists.
For scanning a concrete diff for structural problems.
Callsites pulling state out of an object to make a decision the object should make itself.
Signals: multiple files checking the same attribute chain (record.status == :locked, record.full_lock?); same conditional duplicated across services/controllers/views/helpers; new method replicating a check already in another layer.
When found: name the violated object, list every callsite, suggest where the logic belongs (policy, model method, service). Adding another callsite to an already-scattered pattern is a blocker.
A specific Tell-Don't-Ask: authorization or validation enforced in multiple places independently. Access decisions in controller AND service AND view; policy methods partially redundant with service-layer guards; lock/state checks in helpers and views duplicating service rules.
Flag: "Enforced in N places — [list]. Any new callsite should go through [central point]."
One logical change requires edits across 5+ unrelated files. The rule isn't encapsulated.
Primitives passed together repeatedly where a value object would clarify intent. Domain concepts as raw strings or magic numbers. A parameter hash that grows beyond 3-4 keys and always travels together.
Business logic in a view or controller. Persistence logic in domain objects (queries in presenters/helpers). View conditionals encoding business rules.
Rich service classes doing all the work, model is a data bag. Methods that only do self.field = value; save. New service files reconstructing domain knowledge already implicit in the model. Only flag when the diff adds to this pattern.
New if/elsif/case on type/state/role where polymorphism or strategy would eliminate future N+1 branching. Existing case extended with another arm — flag "this case has N arms now; consider a table or strategy pattern."
New cross-module dependency where modules had no prior relationship. New parameter threaded through multiple layers. New shared mutable structure (global config, class-level state) creating hidden coupling.
For diff review beyond named patterns.
data, info, handle, process, temp) or domain-opaque (internal, app, type, status without qualification).Check version-control history to confirm an issue is from the current diff, not pre-existing. Apply the pre-existing pattern rule above.
development
Zoom meeting captions — file locations and format
tools
macOS dictation custom vocabulary — sync knowledge base names and terms to the system spelling dictionary
testing
Look up people, projects, products, and decisions locally first: contact info (email, Slack ID, GitHub handle), titles and teams, project/product status, who works on what, and past decisions. Check before searching Slack, email, calendar, or GitHub — this is the first stop for any contact detail, project context, or decision-history question.
testing
Communication style, audience awareness, and AI-authorship markers for human-facing prose — load when composing chat messages, review comments, merge request descriptions, emails, doc bodies, or ticket descriptions