agentleFS
fabioc-alohafabioc-aloha/Alex_ACT_Edition/.github/skills/code-review/SKILL.md

code-review

Skill0 starsChanged 4 months agoMITView on GitHub

Systematic code review for correctness, security, and growth — not just style enforcement

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close-spec, design-with-images 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.
  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 5 projects that use this

  • dzhngSkill

    design-with-images

    Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.

    Also in 5 projects that use this

  • PydanticSkill

    add-new-model

    Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry.

    Also in 9 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    azsdk-common-apiview-feedback-resolution

    Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback, azure-sdk-mcp:azsdk_run_typespec_validation, azure-sdk-mcp:azsdk_package_generate_code.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    azsdk-common-generate-sdk-locally

    Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.

    Also in 6 projects that use this

  • +4 more from dzhng
  • +2 more from Azure

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 184 edited versions we read keep these.

  • 3

    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:

    Pass 1 shortcut: Read the PR description and test names first.

    line 29
  2. Distinctive:

    When: Before release, after major refactoring, or on quality concerns

    line 136
  3. Distinctive:

    Scan UI references: Search HTML/views for command IDs

    line 185

“Common” is measured: kept by at least 6 in 10 of the 184 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
<!-- intentional divergence from Supervisor: Edition omits the two Supervisor-specific checklist items ("every export called by production", "filter-style guards have test data") that reference Supervisor-only mutation-testing skill. Heirs don't ship mutation-testing. Audited 2026-05-31. -->

Code Review Skill

Good reviews catch bugs. Great reviews teach the author something.

Review Priority (What Matters Most)

  1. Correctness — Does it do what it's supposed to?
  2. Security — Can it be exploited?
  3. Maintainability — Will the next person understand this?
  4. Performance — Will it scale?
  5. Style — Is it consistent? (ideally enforced by linters, not humans)

3-Pass Review

PassFocusWhat You're Looking ForTime
1. OrientationBig pictureDoes the approach make sense? Is the scope right? Over-engineered?2-3 min
2. LogicDeep readEdge cases, null handling, error paths, concurrency, off-by-one10-15 min
3. PolishSurfaceNaming, duplication, test coverage, docs3-5 min

Pass 1 shortcut: Read the PR description and test names first. They reveal intent faster than code.

Comment Prefixes

PrefixMeaningAuthor Response
[blocking]Must fix before mergeFix it
[suggestion]Better approach existsConsider it, explain if declining
[question]I don't understandClarify (in code, not just in reply)
[nit]Trivial style issueFix if easy, skip if not
[praise]This is well doneAppreciate it

Good vs Bad Comment Examples

BadWhyGood
"This is confusing"Vague, unhelpful"[suggestion] This nested ternary is hard to follow. Consider extracting to a named function like isEligibleForDiscount()."
"Fix this"No context"[blocking] This accepts user input without sanitization. Use escapeHtml() before rendering."
"Why?"Sounds hostile"[question] What's the motivation for the custom sort here vs Array.sort()? Is there a performance concern?"
"LGTM" (on 500-line PR)Rubber stamp"Pass 1: Approach looks right. Pass 2 comments below. Pass 3: naming is clean."

Review Checklist

Security

  • No secrets, tokens, or API keys in code
  • User input validated/sanitized before use
  • Auth checks on protected endpoints
  • No SQL/command injection vectors
  • Sensitive data not logged

Logic

  • Edge cases handled (empty input, null, boundary values)
  • Error paths return meaningful messages
  • Async operations have timeout/cancellation
  • State changes are atomic (no partial updates)
  • All new branches have test coverage

Quality

  • Tests cover the changed behavior, not just the changed lines
  • No debug code (console.log, TODO-hacks)
  • Public API changes documented
  • Backward compatibility considered

Architecture

  • Change is in the right layer (not business logic in the controller)
  • New dependencies justified
  • No unnecessary coupling introduced

Anti-Patterns

Anti-PatternWhat HappensInstead
Rubber-stampBugs shipActually read Pass 1-3
BikesheddingHours on naming, ignore logic bugsSpend 80% on Pass 2
GatekeepingReviewees dread PRsTeach, don't block
Week-long queuePRs go stale, conflicts pile upReview within 4 hours, merge within 24
Style warsTeam frictionAutomate style (ESLint, Prettier, etc.)
Everything-is-blockingAuthor overwhelmedUse prefix system honestly

Mission-Critical Review (NASA Standards)

For safety-critical projects, apply NASA/JPL Power of 10 rules during review:

Blocking Violations (Must Fix)

RuleCheck ForDetection
R1Recursive function without maxDepth parametergrep -rn "function.*\(" | xargs grep -l "walk|traverse|recurse"
R2while loop without iteration counterManual review of all while statements
R3Unbounded array growthpush() in loops without size checks

High Priority (Strong Recommendation)

RuleCheck ForDetection
R4Function > 60 linesLine count per function
R5Missing entry assertionsPublic functions without precondition checks
R8Nesting > 4 levelsVisual inspection of indentation

Medium Priority (Consider)

RuleCheck ForDetection
R6Variable declared far from useManual review
R7Unchecked return valuesgrep for ignored returns
R9Deep property access without ?.obj.prop.prop.prop chains
R10Compiler warningsBuild output

Trigger: User mentions "mission-critical", "NASA standards", "high reliability", or "safety-critical"

Review Timing

PR SizeExpected Review TimeIf Larger
< 100 lines< 30 min—
100-400 lines30-60 minIdeal size
400+ lines60+ minAsk author to split
1000+ linesDon'tRefuse; request breakdown

Extension Audit Methodology (VS Code Extensions)

When: Before release, after major refactoring, or on quality concerns

Scope: Multi-dimensional code quality analysis beyond standard code review

5-Dimension Audit Framework

DimensionFocusTools/MethodsOutput
Debug & LoggingConsole statements, debug codegrep -r "console\\.log|console\\.debug"Categorize: legitimate vs removable
Dead CodeUnused imports, orphaned files, broken refsTypeScript compilation + manual scanList dead commands, UI, dependencies
PerformanceBlocking I/O, sync operations, bottlenecksgrep -r "Sync\(" src/, profilingAsync refactoring candidates
Menu ValidationAll commands/buttons workManual testing + error logsBroken commands, missing handlers
DependenciesUnused packages, leftover referencespackage.json vs import analysisRemovable dependencies

Audit Report Template

## Executive Summary
- Console statements: X remaining (Y legitimate, Z removable)
- Dead code: [commands/UI/dependencies list]
- Performance: [blocking operations count]
- Menu validation: [working/broken ratio]

## Recommendations
1. [Category]: [Issue] → [Action] (Priority: Critical/High/Medium)
2. [Category]: [Issue] → [Action] (Priority: Critical/High/Medium)

Console Statement Categorization

CategoryKeep?Examples
Enterprise compliance✅Audit logs, security events, GDPR actions
User feedback✅TTS status, long-running ops, critical errors
Debug noise❌Setup verbosity, migration logs, info messages
Development artifacts❌"Entering function X", temporary debugging

Performance Red Flags

  • Synchronous file I/O in UI thread: fs.readFileSync, fs.existsSync, fs.readdirSync
    • Fix: Convert to fs-extra async: await fs.readFile, await fs.pathExists, await fs.readdir
  • Blocking operations in activation: Heavy computation before extension ready
    • Fix: Defer to background, show loading state, or lazy-load
  • Serial operations that could be parallel: Sequential awaits for independent tasks
    • Fix: Promise.all([op1(), op2(), op3()])

Dead Code Detection Pattern

  1. Scan command registrations: vscode.commands.registerCommand('command.id', ...)
  2. Scan UI references: Search HTML/views for command IDs
  3. Cross-check: Commands in UI but not registered = broken; registered but unused = dead
  4. Verify disposables: Removed commands should have disposable cleanup too

Post-Audit Verification

  • TypeScript compiles: npm run compile → exit 0
  • No orphaned imports: All imports resolve
  • Version aligned: package.json, CHANGELOG, copilot-instructions match
  • Smoke test: Extension activates, 3 random commands work

Pattern applies to: VS Code extensions, Electron apps, Node.js services with UI

Would Revise If

Revise if reviews repeatedly miss security or correctness defects that adversarial review (deep-review skill) catches on the same PR, or if the 3-pass model produces consistent false-positive [blocking] comments that authors reasonably decline.

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.