agentleFS
desbmadesbma/agent-skills/review-readability/SKILL.md

review-readability

Skill1 starsChanged 16 days agoMITView on GitHub

Review Jujutsu revision changes from jj show and propose simplifications, more idiomatic code, and better consistency with surrounding patterns.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the common review instructions: @../review-common.md

    line 12
  2. Distinctive:

    Delete a special case that earns nothing: a branch, parameter or abstraction handling a state the production code cannot reach, a …

    line 30
  3. Very specific:

    Use idiomatic, self-documenting interfaces.

    line 33
  4. Distinctive:

    When proposing to delete code as unneeded, show what makes the state impossible: an invariant, a type, or the complete set of call sites.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Review readability of Jujutsu changes

Review the Jujutsu changes for the target revision, and propose ways to improve the code — above all by cutting its line count, and further by making it more idiomatic and consistent with the patterns the surrounding code already uses.

Follow the common review instructions: @../review-common.md

Main goals

The leading goal is to reduce the code's line count. A small increase is fine when it buys a worthwhile readability, maintainability, or consistency gain; when the trade-off is roughly even, favor fewer lines.

Keeping that as the primary goal, also make the code:

  • Lower in cognitive and cyclomatic complexity
  • More idiomatic and least surprising for a reader used to the language and its conventions
  • Consistent with the patterns the surrounding code already establishes — error handling, logging, naming, and structural conventions — preferring the established form even when a diverging one would work
  • Easier to read and navigate
  • Equivalent in intent and main effects; minor implementation side effects not covered by tests (logging statements, and other incidental behavioral details) may change

The work of updating tests is never an argument against a simplification: if code can be simplified but doing so requires changing tests, make the change anyway. Prefer less test coverage over high test coverage for complex code. However, when code is shaped a certain way only because there is no other way to test it, that is a valid reason to leave it as is.

Opportunity examples

  • Delete a special case that earns nothing: a branch, parameter or abstraction handling a state the production code cannot reach, a generalization with a single caller, or configurability nothing varies
  • Factor similar code together
  • Rely on existing standard library code rather than custom code
  • Use idiomatic, self-documenting interfaces; for example, Python __str__ or Rust Display rather than a custom to_string method
  • Rely on types rather than unenforced conventions
  • Align a diverging error-handling, logging, or naming pattern with the one prevailing in the module
  • Move a symbol the change adds to the scope or module it belongs in: a shared one when it is general enough for other code to reuse, or the one it is most closely tied to, such as a method of the type it operates on, or a function of the module owning the data it handles
  • Where it helps, split a large source file into smaller modules with clear responsibilities

Python specific

  • Replace loops with list comprehensions or itertools functions
    • the more_itertools dependency can be added if it helps
  • Where argparse supports it, express type constraints and cross-argument validation (for example mutually exclusive arguments) in the parser itself rather than in checks after parsing

Rust specific

  • Use combinators liberally
    • the itertools dependency can be added if it helps

Additional instructions

Rank the items that remove the most lines first.

When proposing to delete code as unneeded, show what makes the state impossible: an invariant, a type, or the complete set of call sites. Without it, drop the item.

Severity

Anchor severity to how the code fails its purpose and its reader:

  • critical — a revision that defeats its own purpose: its description sets out to simplify or shrink the code, yet it adds more production code than it removes, where removing code would reach that goal
  • major — a shape that actively misleads: a name or a pattern that suggests behavior the code does not have, or density enough to hide a defect from a reader looking for one
  • minor — everything else, including most line count savings

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.