agentleFS
conectlensconectlens/lenserfight/.agents/skills/deep-code-reviewer/SKILL.md

deep-code-reviewer

Skill18 starsChanged 6 months agoMITView on GitHub

Perform rigorous, architecture-aware code review focused on subtle correctness bugs, race conditions, performance regressions, type-safety holes, security issues, and maintainability flaws that surface-level review misses. Use when the user asks for comprehensive or deep review, requests design critique, wants edge-case or concurrency analysis, needs production-readiness feedback, or is reviewing critical paths, complex services, transaction handlers, auth flows, infrastructure code, or other high-risk changes.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    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:

    Keep summaries brief and secondary to the findings.

    line 16
  2. Distinctive:

    Read enough code to understand:

    line 22
  3. Distinctive:

    If the change touches a framework or subsystem with non-obvious behavior, read the local docs or implementation that defines the contract …

    line 30
  4. Distinctive:

    Prefer comments on architecture only when they imply real delivery or maintenance risk.

    line 57
  5. Distinctive:

    Do not stop at "tests exist".

    line 72
  6. Distinctive:

    Call out missing tests only when they leave meaningful risk unaddressed.

    line 80
  7. Distinctive:

    Default to a code-review response:

    line 84
  8. Distinctive:

    Follow with open questions or assumptions only if they affect confidence

    line 89
  9. Distinctive:

    If no findings are discovered, say so explicitly and mention any remaining testing or confidence limits.

    line 92
  10. Distinctive:

    Do not pad the review with style nits unless they create real defects or maintenance cost.

    line 100
  11. Distinctive:

    Do not invent speculative issues without a concrete failure mode.

    line 101
  12. Distinctive:

    Do not praise code quality unless the user asks for overall assessment.

    line 102
  13. Distinctive:

    Prefer fewer high-confidence findings over a long weak list.

    line 103
  14. Distinctive:

    If you cannot verify an assumption from local context, mark it as an assumption.

    line 104

≈ “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

Deep Code Reviewer

Perform review as an auditor, not as a summarizer. Prioritize findings that can cause incorrect behavior, operational pain, or expensive future changes.

Quick Start

  1. Establish scope before judging details.
  2. Inspect surrounding code, not just the diff or pasted snippet.
  3. Trace data flow, control flow, state transitions, and failure paths.
  4. Produce findings ordered by severity with concrete file references.
  5. Keep summaries brief and secondary to the findings.

Review Workflow

1. Build Context

Read enough code to understand:

  • Entry points and callers
  • State ownership and mutation boundaries
  • Invariants that must always hold
  • External dependencies: databases, queues, caches, RPCs, files, clocks, feature flags
  • Existing tests and what they do not cover

If the change touches a framework or subsystem with non-obvious behavior, read the local docs or implementation that defines the contract before concluding.

2. Hunt for High-Impact Failures First

Check for:

  • Incorrectness: broken invariants, off-by-one logic, missing validation, bad error handling, partial updates
  • Concurrency hazards: races, duplicate work, lost updates, stale reads, deadlocks, non-atomic sequences
  • Security flaws: authorization gaps, trust-boundary violations, secret leakage, injection vectors
  • Data integrity issues: transaction gaps, mismatched schemas, silent truncation, incompatible migrations
  • Performance cliffs: N+1 queries, unnecessary allocations, hot-loop work, unbounded retries, lock contention
  • Type-safety holes: unsafe casts, invalid narrowing, nil/null handling gaps, unsound generics, unchecked parsing
  • Operational risks: weak observability, bad retry semantics, missing idempotency, unsafe rollout assumptions

3. Evaluate Architecture and Design

Judge whether the design makes future failures likely even if the current code appears correct.

Look for:

  • Responsibilities split across the wrong boundaries
  • APIs that hide important invariants or encourage misuse
  • Tight coupling to volatile details
  • Configuration or feature-flag logic that creates invalid states
  • Missing abstractions where duplication is already diverging
  • Premature abstractions that make correctness harder to reason about

Prefer comments on architecture only when they imply real delivery or maintenance risk.

4. Stress Edge Cases

Actively test mental scenarios such as:

  • Empty, null, duplicate, stale, or out-of-order inputs
  • Timeout, cancellation, retry, and partial-failure paths
  • Multi-tenant or cross-user isolation boundaries
  • Boundary values, integer overflow, time zone, locale, and clock skew issues
  • Re-entrancy, repeated webhooks, at-least-once delivery, and replayed requests
  • Startup, shutdown, migration, and backfill behavior

5. Verify With Tests, Then Critique Test Gaps

Do not stop at "tests exist". Check whether tests cover:

  • The critical invariant, not just the happy path
  • Failure behavior and rollback semantics
  • Concurrency or repeated invocation
  • Serialization and schema boundaries
  • Performance-sensitive behavior when relevant

Call out missing tests only when they leave meaningful risk unaddressed.

Output Format

Default to a code-review response:

  1. Findings first, ordered by severity
  2. Each finding states the problem, why it matters, and the condition that triggers it
  3. Include precise file references when available
  4. Follow with open questions or assumptions only if they affect confidence
  5. End with a short change summary or residual risk note

If no findings are discovered, say so explicitly and mention any remaining testing or confidence limits.

Review Heuristics

Load references/review-checklist.md when you need a deeper prompt for correctness, concurrency, data, performance, or API-boundary analysis. Use it selectively; do not dump the whole checklist into the response.

Constraints

  • Do not pad the review with style nits unless they create real defects or maintenance cost.
  • Do not invent speculative issues without a concrete failure mode.
  • Do not praise code quality unless the user asks for overall assessment.
  • Prefer fewer high-confidence findings over a long weak list.
  • If you cannot verify an assumption from local context, mark it as an assumption.

Example Triggers

  • Review my authentication module for edge cases and race conditions.
  • Analyze this transaction handler for correctness and performance bottlenecks.
  • Is there anything architecturally wrong with how I structured these services?

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.