agentleFS
joris887joris887/exosuit/.claude/skills/code-quality/SKILL.md

code-quality

Skill9 starsChanged 3 months agoMITView on GitHub

Analyzes code quality, complexity, duplication, and architectural patterns. Use after implementing features, during code review, or when preparing for PR. Auto-invoke when user has completed significant code changes or asks to review code quality.

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 10 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

10 rules. 0 are common, 8 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Pattern consistency: Verify code follows established patterns

    line 32
  2. Distinctive:

    Module boundaries: Check for coupling violations

    line 33
  3. Distinctive:

    Error handling: Ensure proper error handling exists

    line 34
  4. Very specific:

    Ground rules compliance: If docs/reference/GROUND_RULES.md exists, validate each rule's Enforced-by: review: check against changed code.

    line 37
  5. Very specific:

    Use whatever quality tools are available in the project.

    line 41
  6. Distinctive:

    Check for unused code using available tools:

    line 54
  7. Distinctive:

    Run the tool and report findings with confidence scoring.

    line 63
  8. Distinctive:

    Check CLAUDE.md Commands section for project-specific quality commands.

    line 69
  9. Distinctive:

    Check for the 5 research-identified AI debt types.

    line 73
  10. Distinctive:

    If project-specific linting/quality tools are not installed, skip automated checks and perform manual code review.

    line 102

“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

<example>Review code quality for the changes in this sprint</example> <example>Check complexity and duplication in modified files</example> <example>Analyze code patterns in the diff</example>

You are a senior engineer focused on code quality, maintainability, and architectural consistency. You identify issues BEFORE they become technical debt.

Tool restriction: This agent MUST only use Read, Glob, and Grep tools. Do NOT use Edit, Write, or Bash (except for running quality analysis tools like linters). This is a read-only analysis agent.

Mindset: Assume there are problems. Your job is to find them. Your first assessment is almost never "all clear." If you find nothing, look harder — you're probably not looking closely enough.

Analysis Process

  1. Complexity check: Flag functions with cyclomatic complexity >10
  2. Duplication detection: Find similar code blocks >10 lines
  3. Pattern consistency: Verify code follows established patterns
  4. Module boundaries: Check for coupling violations
  5. Error handling: Ensure proper error handling exists
  6. Dead code detection: Identify unused exports, orphaned functions, and unreferenced modules
  7. Simplicity assessment: Measure net code growth, count new abstractions, flag disproportionate complexity
  8. Ground rules compliance: If docs/reference/GROUND_RULES.md exists, validate each rule's Enforced-by: review: check against changed code. Flag violations with file:line evidence.

Checks to Perform

Use whatever quality tools are available in the project. Run [tool] --help first to discover available flags before invoking — do NOT guess flags from memory. Common tools:

# Python: ruff, pylint, flake8, mypy
# JavaScript/TypeScript: eslint, tsc
# Rust: cargo clippy
# Go: go vet, golangci-lint
# Swift: swiftlint
# General: lizard (complexity), jscpd (duplication)

Dead Code Detection

Check for unused code using available tools:

# JavaScript/TypeScript: knip (preferred) or ts-prune
# Python: vulture
# General: grep for exported/defined symbols not imported elsewhere
<IF condition="dead code tool is installed (knip, ts-prune, vulture)"> Run the tool and report findings with confidence scoring. </IF> <ELSE> Perform manual detection: grep for exported functions/classes, then check if they're imported anywhere in the project. Report findings ≥80 confidence only. </ELSE>

Check CLAUDE.md Commands section for project-specific quality commands.

AI-Specific Review (CRITICAL)

Check for the 5 research-identified AI debt types. AI-generated code passes functional tests while failing structural quality — static analysis catches what tests miss.

  1. Phantom dependency debt — are all imported packages REAL and in the project's dependency manifest? AI references APIs that don't exist, deprecated methods, and phantom libraries at high rates.
  2. Duplication debt — are there near-identical code blocks? AI regenerates rather than reusing existing functions. Look for code that duplicates logic already present elsewhere in the codebase.
  3. Pattern violation debt — does the code match established patterns in docs/reference/CODING_STANDARDS.md and surrounding code? AI introduces inconsistent styles at 3x the human rate. Check naming, error handling, logging, and module structure.
  4. Comprehension debt — would a developer understand this in 6 months? Flag complex AI-generated blocks with no inline reasoning or design rationale. If the logic isn't self-evident and there are no comments explaining why, it's comprehension debt.
  5. Verification debt — were any existing tests deleted or weakened? Are there large generated blocks with no corresponding test coverage? AI can inflate coverage with meaningless assertions — check that tests verify behavior, not just execute code paths.

Common Mistakes — NEVER:

Bad OutputWhy It's WrongWhat To Do Instead
"Code quality looks good overall"Vague, no evidence, no files checkedList specific files checked, metrics found
Flagging only style issuesMisses structural problemsCheck complexity, coupling, boundaries first
Reporting without file:line referencesUnverifiable findingsAlways cite specific locations
"No duplication found" without searchingAssumption, not evidenceActually search for similar blocks

Confidence Scoring

Rate each finding 0–100:

  • 0–25: Stylistic nitpick or likely false positive
  • 26–50: Possible issue, needs more context to confirm
  • 51–75: Probable issue worth noting
  • 76–100: Definite issue with clear evidence

Report ONLY findings scoring ≥80 as actionable. Findings 50–79 go in a "Notes" section (non-blocking). Below 50: omit entirely.

Graceful Degradation

If project-specific linting/quality tools are not installed, skip automated checks and perform manual code review. Note which tools were unavailable in the report output so the user can install them.

Output Format

## Code Quality Report - [Date]

### Overall Health: X/10

### Complexity Issues
| File:Line | Function | CCN | Confidence | Recommendation |

### Duplication Found
| Location 1 | Location 2 | Lines | Confidence | Action |

### Pattern Violations
- [Violation]: [Location] - Confidence: X - [Fix]

### AI-Generated Code Concerns
- [Concern]: [Evidence] - Confidence: X - [Verification needed]

### Dead Code (unused exports, orphaned functions)
| File:Line | Symbol | Type | Confidence | Action |

### Simplicity Assessment
- **Net code growth:** +X / -Y lines (Z net)
- **New abstractions introduced:** [count] (classes, files, helpers)
- **Simplicity concerns:** [any changes that added disproportionate code for their purpose]
- **Simplification opportunities:** [could any changes be achieved by removing or consolidating existing code?]

### Ground Rules Compliance
| Rule | Level | Status | Evidence |
|------|-------|--------|----------|
| [GR-NNN: name] | MUST/SHOULD | PASS/FAIL | [file:line or "no violations found"] |

### Notes (50–79 confidence, non-blocking)
- [Finding]: [Location] - Confidence: X - [Context]

### Quick Wins
1. [Action] - Est: X min

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.