Craft, Code and Prose Quality (Universal)
Goal: code and docs that a teammate can trust at 2 a.m.
Non-goal: looking "less AI" on a detector. Detectors are not quality metrics.
Correctness, security, and clarity always beat stylistic camouflage.
Authority: naming and comment craft defer to standards/Clean-Code/ (especially
04, 06, 17, 19, 20, 30, 33, 36, 39, 41). If this skill and those lessons disagree,
Clean-Code wins.
1. Naming
- Prefer domain language over empty CS suffixes when the domain term is clear.
- Names should make the next line obvious. If you need a comment to explain the
name, rename.
- Consistency within a module beats clever variety. Do not introduce intentional
inconsistency to "look human."
- Match existing project conventions from
AGENTS.md and neighboring files.
Framework idioms (e.g. event handlers, controllers) are fine when they match the stack.
Smell: handleUserDataValidationResultProcessor
Better: validateUser or the verb the domain already uses
Smell: renaming a clear InventoryHandler to something vague mid-audit for style points
Better: leave idiomatic names; fix real bugs
2. Comments
- Keep why: constraints, workarounds, invariants, hazard warnings.
- Remove what: narration of the next statement, step lists that restate code.
- If removing a comment makes code unclear, rename symbols; do not put the comment back.
- TODOs need a condition or owner context when possible: what blocks removal.
- Full test for when a comment earns its keep:
skills/engineering/necessary-comments/SKILL.md.
3. Structure
- Flat until complexity demands a layer. Do not add repository/service/factory
stacks for a three-line operation.
- One module, one job. Dumping-ground
utils/ with unrelated helpers is a smell.
- Prefer the same abstraction level inside a function (Clean Code).
- Asymmetry across modules is fine when complexity differs. Symmetry for its own
sake is not a goal, and breaking symmetry on purpose is not a goal either.
4. Error handling and defense
- Guard boundaries and real failure modes. See
skills/engineering/errors/SKILL.md.
- Do not wrap every line in try/catch. Do not null-check values the type system
or caller already guarantees, unless you are at an untrusted boundary.
- Untrusted input (network, client, user, file) is always a boundary.
5. Prose (docs, PR text, commit messages)
Full rules live in skills/writing/prose/SKILL.md. Load it when writing or reviewing any
written material. The short version:
- Short sentences. Concrete verbs. No filler adjectives or discourse glue.
- No em dash as punctuation. Ordinary hyphens in compound words are fine.
- Watch the structural tells, not just the word list: binary contrast, negative listing,
rhetorical setup, fragments written for rhythm.
- Do not restate what a linked file already shows; link it.
- Commit/PR body: why and risk, not a narrative of every keystroke.
6. Review checklist (craft only)
If craft conflicts with security or correctness, craft loses.
1---2name: craft3description: Code and prose craft for maintainability and clarity. Use when reviewing naming, comments, structure, or written docs. Optimizes for humans who must debug and extend the system. Does not score "AI detection" and does not encourage fake inconsistency. Language-agnostic.4---56# Craft, Code and Prose Quality (Universal)78Goal: code and docs that a teammate can trust at 2 a.m. 9Non-goal: looking "less AI" on a detector. Detectors are not quality metrics.10Correctness, security, and clarity always beat stylistic camouflage.1112**Authority:** naming and comment craft defer to `standards/Clean-Code/` (especially1304, 06, 17, 19, 20, 30, 33, 36, 39, 41). If this skill and those lessons disagree,14**Clean-Code wins**.1516---1718## 1. Naming1920- Prefer domain language over empty CS suffixes when the domain term is clear.21- Names should make the next line obvious. If you need a comment to explain the22 name, rename.23- Consistency within a module beats clever variety. Do not introduce intentional24 inconsistency to "look human."25- Match existing project conventions from `AGENTS.md` and neighboring files.26 Framework idioms (e.g. event handlers, controllers) are fine when they match the stack.2728**Smell:** `handleUserDataValidationResultProcessor` 29**Better:** `validateUser` or the verb the domain already uses 3031**Smell:** renaming a clear `InventoryHandler` to something vague mid-audit for style points 32**Better:** leave idiomatic names; fix real bugs 3334---3536## 2. Comments3738- Keep *why*: constraints, workarounds, invariants, hazard warnings.39- Remove *what*: narration of the next statement, step lists that restate code.40- If removing a comment makes code unclear, rename symbols; do not put the comment back.41- TODOs need a condition or owner context when possible: what blocks removal.42- Full test for when a comment earns its keep: `skills/engineering/necessary-comments/SKILL.md`.4344---4546## 3. Structure4748- Flat until complexity demands a layer. Do not add repository/service/factory49 stacks for a three-line operation.50- One module, one job. Dumping-ground `utils/` with unrelated helpers is a smell.51- Prefer the same abstraction level inside a function (Clean Code).52- Asymmetry across modules is fine when complexity differs. Symmetry for its own53 sake is not a goal, and breaking symmetry on purpose is not a goal either.5455---5657## 4. Error handling and defense5859- Guard boundaries and real failure modes. See `skills/engineering/errors/SKILL.md`.60- Do not wrap every line in try/catch. Do not null-check values the type system61 or caller already guarantees, unless you are at an untrusted boundary.62- Untrusted input (network, client, user, file) is always a boundary.6364---6566## 5. Prose (docs, PR text, commit messages)6768Full rules live in `skills/writing/prose/SKILL.md`. Load it when writing or reviewing any69written material. The short version:7071- Short sentences. Concrete verbs. No filler adjectives or discourse glue.72- No em dash as punctuation. Ordinary hyphens in compound words are fine.73- Watch the structural tells, not just the word list: binary contrast, negative listing,74 rhetorical setup, fragments written for rhythm.75- Do not restate what a linked file already shows; link it.76- Commit/PR body: why and risk, not a narrative of every keystroke.7778---7980## 6. Review checklist (craft only)8182- [ ] Names match domain and local convention 83- [ ] Comments are why-only 84- [ ] No extra layers without a proven need 85- [ ] Failure paths have context; no silent swallow 86- [ ] Docs/PR text would pass a "senior engineer wrote this" bar without detector games 8788If craft conflicts with security or correctness, craft loses.