agentleFS
ahonnahonn/dotfiles/.claude/skills/code-quality/SKILL.md

code-quality

Skill62 starsChanged 2 months agoMITView on GitHub

Review maintainability or clean up comments in specified code without expanding the change's scope.

77 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spring-boot, logging-patterns and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ffsshhttiikkSkill

    spring-boot

    Spring Boot framework and Java enterprise patterns

    Also in 3 projects that use this

  • DIL8654Skill

    logging-patterns

    Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.

    Also in 3 projects that use this

  • mstuder-slalomSkill

    jpa-patterns

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    design-patterns

    Practical application and coding skills for Design Patterns

    Also in 4 projects that use this

  • glommerSkill

    pr-workflow

    General guidelines for Commits, formatting, CI, dependencies, security

    Also in 4 projects that use this

  • vm0-aiSkill

    cli-design

    Design patterns and conventions for the Okou CLI user experience

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 8

    Distinctive

    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:

    Look for problems with a concrete cost to callers or future changes:

    line 13
  2. Distinctive:

    Prefer representations that make invalid states difficult to create.

    line 26
  3. Distinctive:

    Keep explanations of intent, tradeoffs, contracts, non-obvious behavior, and constraints that the code cannot express clearly.

    line 33
  4. Distinctive:

    Remove redundant narration where naming and structure already communicate the behavior.

    line 35
  5. Distinctive:

    When invoked for comment cleanup on a file:

    line 37
  6. Distinctive:

    Read enough surrounding code to understand the comments' purpose.

    line 39
  7. Distinctive:

    Keep runtime behavior unchanged.

    line 41
  8. Distinctive:

    Follow the global test policy.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 71 edited versions of this file we could read. “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

Code Quality and Comment Cleanup

Meet the requested behavior and correctness constraints first. Within those constraints, prefer readability and maintainability over speculative optimization or shorter code.

Maintainability Review

Look for problems with a concrete cost to callers or future changes:

  • Change amplification: one behavior requires coordinated edits across unrelated modules.
  • Cognitive load: callers must know implementation details to use an interface correctly.
  • Hidden coupling: dependencies or shared state make the effects of a change hard to locate.
  • Redundant or speculative abstractions: indirection adds concepts without hiding useful complexity.

Explain the affected behavior or maintenance cost before recommending a refactor. Preserve useful existing patterns and idiomatic language conventions. Offer alternatives only when their tradeoffs matter; do not treat every code smell as a defect or permission to rewrite adjacent code.

For interface design decisions, the codebase-design skill provides more detailed criteria when available.

Error Handling

  • Prefer representations that make invalid states difficult to create.
  • Recover at a layer that can restore the operation's contract; propagate failures when recovery is unavailable.
  • Preserve diagnostic context when translating errors. Do not hide a failure behind an apparent success.
  • Choose fatal handling only for a demonstrated unrecoverable invariant and in line with the runtime and project's conventions.

Comments

Keep explanations of intent, tradeoffs, contracts, non-obvious behavior, and constraints that the code cannot express clearly. Update comments made stale by the change.

Remove redundant narration where naming and structure already communicate the behavior. Preserve licenses, tooling directives, required documentation, and historical context that still explains a constraint.

When invoked for comment cleanup on a file:

  1. Read enough surrounding code to understand the comments' purpose.
  2. Edit misleading or redundant comments and retain useful rationale.
  3. Keep runtime behavior unchanged. Suggest larger naming or structural improvements separately unless the user also requested them.

Follow the global test policy. Comment-only edits need diff inspection rather than new behavior tests. Report supported findings and actual changes; use the format that best fits their size.

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.