agentleFS
asker26asker26/agent-skills/skills/readable-ultra/SKILL.md

readable-ultra

Skill0 starsChanged 5 months agoMITView on GitHub

Deep readability review of a PR with finder + adversarial validator agents, based on Clean Code / The Art of Readable Code principles. Usage: /readable-ultra <PR#> [repo]

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. asker26/claude-task-framework★ 499% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test names that don't state the behavior under test

    line 63
  2. Distinctive:

    Every finding must name the principle it violates AND the concrete reader cost

    line 107
  3. Distinctive:

    Prefer a cached diff in /tmp over re-fetching per agent on large PRs

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Readable Ultra

Multi-agent readability review. Finds code that compiles fine and works fine but slows the next reader down. Companion to /reviewer-ultra (which hunts regressions/bugs/smells) — this skill hunts comprehension cost only. Can run standalone or as an extra finder inside a reviewer-ultra run.

Core metric (The Art of Readable Code): minimize time-to-understand for a new reader. A finding is only valid if it materially slows a reader down or misleads them — not because it violates a rule in the abstract.

Arguments

  • <PR#> (required): PR number to review
  • [repo] (optional): org/repo slug. If omitted, detect from git remote get-url origin.

Round 1: Discovery (1–3 parallel finder agents)

For PRs under ~30 changed files, one finder. Larger PRs: split file list into 2–3 batches by directory/module, one finder per batch. Each finder reads the PR diff (gh pr diff <PR#> --repo <repo>, or a pre-cached copy in /tmp) and may grep the local clone read-only for surrounding context and sibling-file conventions.

Each finder checks ONLY new/changed code against this checklist:

Naming

  • Vague/generic names on non-trivial scopes: tmp, data, result, info, handle(), process(), manager
  • Names that can be misread or lie about what the thing does/holds
  • Missing units or qualifiers: timeout vs timeoutSeconds, size vs sizeMb
  • Booleans not named is/has/can/should, or negated (notDisabled, skipValidation = false)
  • Inconsistent vocabulary for one concept within the PR (fetch/get/load/retrieve for the same kind of operation)
  • Unsearchable names: single letters or magic numbers where a named constant is warranted

Functions & structure

  • Function does several unrelated things (name contains "and", or wants to)
  • Mixed abstraction levels in one body (business rule next to byte-twiddling)
  • Long parameter lists (>3) or boolean flag parameters that fork behavior
  • Surprising side effects (a getter/checker that mutates or writes)
  • Copy-paste blocks with slight variations that should be one extracted helper (DRY)
  • Speculative generality: abstraction/config/indirection nothing uses yet (YAGNI)

Control flow & expressions

  • Deep nesting where guard clauses / early returns would flatten it
  • Complex boolean expressions needing "explaining variables" or De Morgan simplification
  • Clever one-liners requiring mental simulation to verify
  • Redundant else after return/throw; positive case not first

Comments

  • Comments restating the code; noise comments; commented-out code
  • Stale or wrong comments (worse than none)
  • Surprising/counterintuitive code with NO why-comment ("director's commentary" missing)
  • TODOs with no context, owner, or condition

Error handling readability

  • Happy path buried inside error handling
  • Silently swallowed exceptions
  • Returning null/sentinels that force checks at every call site

Consistency

  • Deviates from this codebase's established patterns (always check 1–2 sibling files before flagging)
  • Inconsistent response/DTO/format shapes introduced within the PR itself

Tests

  • Test names that don't state the behavior under test
  • Multiple unrelated assertions in one test; no arrange/act/assert shape

Out of scope: pure formatter territory (indentation, spacing, import order — linters/formatters own that), bugs/regressions (that's /reviewer-ultra), and personal style preferences with no comprehension cost.

For each finding: file + line range, the issue, why it slows a reader down, suggested fix, severity:

  • high — actively misleading (name/comment lies; will cause maintenance bugs)
  • medium — real comprehension cost, should fix in this PR
  • low — nice-to-have polish

Round 2: Validation (adversarial, chunked)

Spawn validators with ≤5 findings each (never more than 6 per validator). Each validator tries to refute every finding:

  • Re-read the actual diff hunk and surrounding code
  • Grep the local clone (read-only) — if the "violation" is the project-wide convention, it's a FALSE POSITIVE
  • Verdict per finding: CONFIRMED, FALSE_POSITIVE (reason), or ADJUSTED (new severity + reason)
  • Flag high-confidence readability issues Round 1 MISSED

Final Report

## PR #<N> Readability Review: <title>
**Repo:** <org/repo> | **Files:** <N> | **Changes:** +<adds>/-<dels>

### High (misleading)
| # | File:Line | Finding | Fix | Status |

### Medium (should fix)
| # | File:Line | Finding | Fix | Status |

### Low (polish)
| # | File:Line | Finding | Fix | Status |

### False positives removed
(what Round 1 flagged, why Round 2 rejected it)

**Verdict:** READABLE / NEEDS_WORK / HARD_TO_MAINTAIN
**Summary:** 1–2 sentences on overall time-to-understand for this PR.

Rules

  • Finders and validators are READ-ONLY — never edit, checkout, or run mutating commands in the local clone
  • Validators get ≤5 findings each; split larger sets across parallel validators
  • Every finding must name the principle it violates AND the concrete reader cost
  • Project conventions beat book rules: consistent-but-imperfect beats novel-but-clean
  • Prefer a cached diff in /tmp over re-fetching per agent on large PRs

Sources

Distilled from:

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.