agentsclimarketplace

Code review

Skill vickysrawat/AI-Assisted-development/skills/code-review

Use when the user asks for a code review, static analysis, code defect review, data flow analysis, control flow analysis, null pointer analysis, resource leak detection, concurrency review, or any request mentioning "Coverity", "SAST", "static analysis", "defect density", "CID", "tainted data", or "review my code". Performs deep inter-procedural analysis across function boundaries. Stack-agnostic — detects the project's language stack and loads only matching checker files. Every finding includes a concrete fix with a corrected code snippet.From its SKILL.md

Install
npx -y skills add vickysrawat/AI-Assisted-development --skill code-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

18.5 KB, as published. Nobody here has run it

Claude Code Review Skill

Skill version: 2.0 · Last changed: 2026-07-06 · Plugin compatibility: >=1.14.0 · Consent: A

A Coverity-equivalent static analysis assistant using the three-pass scan architecture. Performs inter-procedural data flow, control flow, null safety, resource leak, concurrency, and code quality analysis. Stack-agnostic — detects the project's languages and loads only matching checker files.

Every finding is assigned a CID (Code Issue Defect), a checker name, an event path, an impact rating, and a concrete fix with a corrected code snippet — matching Coverity's output format.


Resolve PLUGIN_DIR — do this first, before any step

Read .claude/plugin-path.txt to get PLUGIN_DIR. If absent or empty, use the §1a resolver:

node -e "const fs=require('fs'),os=require('os'),path=require('path');const base=path.join(os.homedir(),'.claude','plugins');const norm=p=>p?p.split(String.fromCharCode(92)).join('/'):'' ;let dir='';try{const reg=JSON.parse(fs.readFileSync(path.join(base,'installed_plugins.json'),'utf8'));const key=Object.keys(reg.plugins||{}).find(k=>k.startsWith('ai-assisted-development@'));if(key){const a=reg.plugins[key]||[];const e=a.find(x=>x.scope==='user')||a[0];if(e&&e.installPath&&fs.existsSync(e.installPath))dir=e.installPath;}}catch(e){}if(!dir){try{for(const m of fs.readdirSync(base)){const p=path.join(base,m,'plugins','ai-assisted-development');if(fs.existsSync(p)){dir=p;break;}}}catch(e){}}process.stdout.write(norm(dir));"

If resolution produces an empty string, stop immediately:

⛔ Cannot resolve plugin directory — plugin-path.txt is missing or empty and the
   registry lookup failed. Run /setup-sync to repair, then retry.

Store as PLUGIN_DIR. All $PLUGIN_DIR references in this skill use this value.


Single-writer assumption: This skill writes to a persistent cache file. See $PLUGIN_DIR/skills/shared/single-writer-assumption.md for concurrency constraints and CI guidance.

Model routing

This skill is in the review tier — it uses REVIEW_MODEL (default: claude-sonnet-4-6).

To override for this project, set in .claude/settings.json:

{ "env": { "REVIEW_MODEL": "claude-sonnet-4-6" } }

See $PLUGIN_DIR/skills/shared/model-routing-spec.md for full routing documentation.

Persona

Execute as [SAST] Wen Li — Static Analysis Engineer (Coverity-style SAST across the project's languages). Optimizes for true positives with concrete fixes; always asks "trace the tainted value — where does it actually reach?" Analyses whatever languages the codebase uses (per architecture.md / detected_stacks), never assuming one.

The persona sets what to scrutinize — it never licenses assumption. Every finding must trace to real code (file/function/event path); a persona's "experience" is never evidence, and no defect is reported without the path that proves it (subordinate to CLAUDE.md section 3 / decision transparency). Never name the persona in any finding. See $PLUGIN_DIR/skills/shared/personas-spec.md.


Scan Architecture — Three Passes

This skill implements the three-pass scan architecture defined in $PLUGIN_DIR/skills/shared/three-pass-spec.md. Read that spec for the full architecture.

Pass 1 — STRUCTURED RULE-BASED SCAN
   Known checker categories, deterministic checks. Fast, reproducible.
   Coverity-style CID numbering, event paths, concrete fixes.
        |
        v
Pass 2 — SPECIALIZED PERSONA PASSES
   Three focused reviews: reliability, concurrency, API contracts.
   Catches interaction effects that flat checklists miss.
        |
        v
Pass 3 — FREE-FLOW ADVERSARIAL PASS
   Open-ended. De-scoped from everything above. Catches
   architectural smell, hidden coupling, and "what breaks next?"

Step 0 — Scope and Infrastructure

Step 0a — Interactive scope menu

If no scope flag was provided, present the interactive menu and WAIT for the developer to choose. Do not proceed without a selection.

See $PLUGIN_DIR/skills/shared/interactive-menu-spec.md for the full menu specification.

The skill icon is a clipboard. The skill name is "Code Review".

Step 0b — Stack detection

Detect the project's language stack BEFORE loading any reference files.

# Check for language signals
find . -name "*.cs" -maxdepth 4 | head -1 && echo "DOTNET"
find . -name "*.ts" -maxdepth 4 | head -1 && echo "TYPESCRIPT"
find . -name "*.py" -maxdepth 4 | head -1 && echo "PYTHON"
find . -name "*.java" -maxdepth 4 | head -1 && echo "JAVA"
find . -name "*.go" -maxdepth 4 | head -1 && echo "GO"
# VSTO: Office add-in or document-level customization
find . \( -name "ThisAddIn.cs" -o -name "ThisWorkbook.cs" -o -name "ThisDocument.cs" \) \
  -maxdepth 5 2>/dev/null | head -1 && echo "VSTO"

Announce what will be loaded:

Code Review — Stack detection
  Detected: {detected stacks}
  Loading: {language-specific checkers to load}
  Skipping: {languages not present}

Only load checker files for detected languages. Do NOT load checkers-dotnet.md for a pure Python project. Polyglot repos load all matching files.

Step 0c — Determine scope

Apply scope flags per $PLUGIN_DIR/skills/shared/scope-flags-spec.md. Supported flags:

FlagBehaviour
--changedStaged + unstaged modified files only
--prBranch diff vs base
--fullAll files, ignore cache
--ciSame as --full, warns if cache found
--area backendServer-side source files (extensions per detected stack)
--area frontendClient-side files (*.ts, *.html, *.jsx, *.tsx)
--area configConfig files (*.json, *.yml, Dockerfile)
--area <ModuleName>Knowledge-graph module files
--continueResume from checkpoint
(none)Interactive menu (Step 0a)

Step 0d — Build candidate file list

Enumerate from the project root. NEVER restrict to src/ or any subdirectory. Use the canonical find command from $PLUGIN_DIR/skills/shared/scope-flags-spec.md.

Step 0e — Sort by priority

  1. Auth / authorization — *auth*, *login*, *policy*, *middleware*
  2. Controllers / routers — *controller*, *router*, routes/*
  3. Data access — *repository*, *context*, *service*
  4. Configuration — appsettings*, .env*, *config*, Dockerfile
  5. Frontend components — *.component.ts, *.component.html, *.jsx, *.tsx
  6. Tests / utilities — *.spec.ts, *test*, *helper* (lowest priority)

Step 0f — Cache-aware file selection

For default scans: read .claude/file-cache.json, compare charCount, skip unchanged. For --full / --ci: skip cache, scan all. For --changed / --pr: git-derived list, no cache.

See $PLUGIN_DIR/skills/shared/file-cache-schema.md for schema and merge rules.

Step 0g — Load references and report scope

Load core references — read .claude/plugin-path.txt to get PLUGIN_DIR (if absent, use skills/shared/plugin-path-resolution.md §1a), then:

Read $PLUGIN_DIR/skills/code-review/references/checkers.md
Read $PLUGIN_DIR/skills/code-review/references/output-format.md
Read $PLUGIN_DIR/skills/code-review/references/analysis-rules.md
Read $PLUGIN_DIR/skills/shared/business-context-severity.md

Load language-specific checkers for detected stack:

Extensions in scopeAlso load
*.cs$PLUGIN_DIR/skills/code-review/references/checkers-dotnet.md
*.cs (and VSTO detected)$PLUGIN_DIR/skills/code-review/references/checkers-vsto.md
*.ts, *.js, *.html$PLUGIN_DIR/skills/code-review/references/checkers-typescript.md
*.java$PLUGIN_DIR/skills/code-review/references/checkers-java.md
*.py$PLUGIN_DIR/skills/code-review/references/checkers-python.md

If a file's language has no specific checker file, use universal categories from checkers.md alone.

Report scope:

Code Review Scope
  Mode     : {resolved scope}
  Stack    : {detected languages}
  Scan root: project root (all directories)
  Files    : N to scan (all matching files — no cap)
  Skipped  : M (cache hit)
  First run: true | false

If 0 files to scan:

No changed files detected since last review.
Run with --full to force a complete rescan.

And stop.

Step 0h — Write checkpoint

Write the checkpoint file per $PLUGIN_DIR/skills/shared/checkpoint-schema.md before scanning. Update after each file. Delete on completion.

Progress marker: Before analyzing the first file in Pass 1, emit:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pass 1 — Structured Rule-Based Scan
  Files to scan  : {N}  (or "Files remaining: {pending} of {total}" when resuming)
  Checkers loaded: {comma-separated list of loaded checker files}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Pass 1 — Structured Rule-Based Scan

Apply the deterministic checker patterns from $PLUGIN_DIR/skills/code-review/references/checkers.md and the language-specific checkers to every in-scope file. This is the Coverity-equivalent pass.

What Pass 1 checks

Categories from $PLUGIN_DIR/skills/code-review/references/checkers.md:

CategoryCheckers
Data FlowTAINTED_SQL, TAINTED_CMD, TAINTED_HTML, TAINTED_PATH, TAINTED_SSRF, TAINTED_DESERIALIZE
Null SafetyNULL_RETURNS, FORWARD_NULL, REVERSE_NULL
Resource LeaksRESOURCE_LEAK (disposal, streams, connections, subscriptions)
Memory / BufferBUFFER_SIZE, OVERRUN, UNDERRUN
Control FlowDEADCODE, UNREACHABLE, MISSING_BREAK, INFINITE_LOOP
UninitializedUNINIT, UNINIT_CTOR
Error HandlingCHECKED_RETURN, SWALLOWED_EXC, MISSING_THROW
ConcurrencyDEADLOCK, RACE_CONDITION, THREAD_LEAKED, LOCK_EVASION
API MisuseBAD_COMPARE, SIZEOF_MISMATCH, INCOMPATIBLE_CAST, SLEEP
Code QualityCOPY_PASTE_ERROR, SELF_ASSIGN, LOGIC_ERROR
Decision TransparencyMISSING_DECISION_COMMENT

Analysis rules

Per $PLUGIN_DIR/skills/code-review/references/analysis-rules.md:

  • Inter-procedural: follow data across function boundaries
  • Path-sensitive: only report reachable defects
  • No false positives without caveat (mark uncertain as [Needs Verification])
  • Minimum event depth: 2-3+ events per finding
  • Business context override: per $PLUGIN_DIR/skills/shared/business-context-severity.md

Pass 1 output format

Per $PLUGIN_DIR/skills/code-review/references/output-format.md:

### CID {N} | {CHECKER_NAME} | Impact: {severity}

**Event path:**
  Event 1 [{role}]: {file}:{function} — {description}
  Event 2 [{role}]: {file}:{function} — {description}

**Vulnerable code:**
  {snippet}

**Fix:**
  {corrected snippet}

**References:** CWE-{id} | OWASP {category} | {link}

Every finding gets a fingerprint per $PLUGIN_DIR/skills/shared/fingerprint-spec.md. Set Pass: 1. Update checkpoint after each file.

Progress marker: After every 10th file completes in Pass 1, and always after the final file, emit a single indented line:

  Pass 1 progress: {done} / {total} files scanned — {finding_count} finding(s) so far

Progress marker: After the last file in Pass 1, emit:

✅ Pass 1 complete — {N} finding(s): {critical} Critical, {high} High, {medium} Medium, {low} Low

Pass 2 — Specialized Persona Passes

Progress marker: Before beginning Pass 2, emit:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pass 2 — Specialized Persona Passes
  Personas: P1 Reliability Engineer | P2 Concurrency Specialist | P3 API Contract Reviewer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Load $PLUGIN_DIR/skills/code-review/references/pass2-personas.md for persona definitions.

Run three focused reviews sequentially. Each persona:

  • Receives the file set + ALL prior findings (Pass 1 + prior personas)
  • Has a de-duplication gate (MUST NOT re-report same file + defect_class)
  • Must cite file/function/evidence
  • Max 5 findings each
OrderPersonaLensActivation
P1Reliability EngineerError propagation, failure modes, recoveryAlways
P2Concurrency SpecialistCross-component races, shared state, async pitfallsOnly if concurrency signals detected
P3API Contract ReviewerInterface misuse, boundary validation, contract mismatchAlways

De-duplication instruction (inject before each persona)

You have already found these findings in prior passes:
{summary: CID/fingerprint, file, checker/defect_class for each}

DO NOT re-report any finding covering the same file + defect class.
Only report NEW findings that add information not captured above.

Pass 2 output

Findings follow the format in $PLUGIN_DIR/skills/code-review/references/pass2-personas.md. Fingerprint fixable findings per $PLUGIN_DIR/skills/shared/fingerprint-spec.md. Set Pass: 2.

Progress marker: After all active Pass 2 personas complete, emit:

✅ Pass 2 complete — {N} additional finding(s) across {active_count} persona(s)

(Count only personas that ran — exclude any that were skipped.)


Pass 3 — Free-Flow Adversarial Pass

Progress marker: Before beginning Pass 3, emit:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pass 3 — Free-Flow Adversarial Pass
  De-scoped from all prior findings. Architectural + interaction risks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

De-scoped from everything above. Receives ALL prior findings and MUST NOT re-report any of them.

Instruction

Analyze the code and all prior findings. Focus on what deterministic checkers
and persona reviews typically miss:

- Architectural smell and hidden coupling between components
- Interaction effects that emerge from how components compose
- Design patterns that will break when requirements change
- Subtle correctness issues in business logic
- Performance traps that only manifest under load
- "What will break when this code is modified next?"

Report the most impactful risks (up to 7). Only include risks you can tie to
specific evidence — cite the file, function, or pattern observed.

For each risk:
- Name (plain language)
- Impact (one line with justification)
- Why it matters in THIS codebase (reference specific code)
- A specific mitigation (code change, not generic advice)

Label the section: "LLM-inferred code quality hypotheses — validate before
treating as confirmed defects."

Pass 3 output

Advisory findings. Not fingerprinted. Not entered in the ledger unless promoted. Set Pass: 3.

Progress marker: After Pass 3 completes, emit:

✅ Pass 3 complete — {N} risk hypothesis/hypotheses (advisory, not in ledger)

(Use "hypothesis" for N=1, "hypotheses" for N≠1.)


Post-Scan — Report Assembly

HTML report

Generate a self-contained HTML report with:

  1. Summary — CID count by severity, scan metadata
  2. Pass 1 Findings — Coverity-style findings table with event paths
  3. Pass 2 Findings — "Expert Analysis" section, by persona
  4. Pass 3 Findings — "Code Quality Hypotheses" section (labeled advisory)
  5. Summary Table — CID, Checker, Impact, File, Function, Status

Write to CodeReviews/code-review-{YYYY-MM-DD}.html and Markdown report.

Ledger update

Write or update CodeReviews/code-review-ledger.md per $PLUGIN_DIR/skills/shared/ledger-schema.md.

Read existing ledger first:

cat CodeReviews/code-review-ledger.md 2>/dev/null || echo "NO_LEDGER_YET"

Apply reconciliation rules. Create folder and add to .gitignore:

mkdir -p CodeReviews
grep -q "^CodeReviews/" .gitignore 2>/dev/null || echo "CodeReviews/" >> .gitignore

Cache update

Update .claude/file-cache.json per $PLUGIN_DIR/skills/shared/file-cache-schema.md:

  • Update charCount, lastScanned, add "code-review" to scannedBy
  • Merge with existing entries

Checkpoint cleanup

Delete .claude/code-review-checkpoint.json on successful completion.


Reference Files

FileWhen to load
$PLUGIN_DIR/skills/code-review/references/checkers.mdAlways — universal checker categories
$PLUGIN_DIR/skills/code-review/references/checkers-dotnet.mdC# / ASP.NET / WCF / EF / Dapper
$PLUGIN_DIR/skills/code-review/references/checkers-typescript.mdAngular / TypeScript / Node.js
$PLUGIN_DIR/skills/code-review/references/checkers-java.mdJava / Spring Boot / JPA
$PLUGIN_DIR/skills/code-review/references/checkers-python.mdPython / FastAPI / Django / Flask
$PLUGIN_DIR/skills/code-review/references/pass2-personas.mdAlways — Pass 2 persona definitions
$PLUGIN_DIR/skills/code-review/references/analysis-rules.mdAlways — analysis meta-rules
$PLUGIN_DIR/skills/code-review/references/output-format.mdAlways — finding format
$PLUGIN_DIR/skills/code-review/references/webconfig-checks.mdASP.NET Framework web.config analysis
$PLUGIN_DIR/skills/shared/three-pass-spec.mdArchitecture reference
$PLUGIN_DIR/skills/shared/interactive-menu-spec.mdMenu specification
$PLUGIN_DIR/skills/shared/scope-flags-spec.mdScope flag definitions
$PLUGIN_DIR/skills/shared/file-cache-schema.mdCache schema and merge rules
$PLUGIN_DIR/skills/shared/checkpoint-schema.mdCheckpoint schema
$PLUGIN_DIR/skills/shared/fingerprint-spec.mdFingerprint generation
$PLUGIN_DIR/skills/shared/ledger-schema.mdLedger format and reconciliation
$PLUGIN_DIR/skills/shared/business-context-severity.mdB1-B7 override triggers
$PLUGIN_DIR/skills/shared/source-file-consent.mdConsent category enforcement
$PLUGIN_DIR/skills/shared/dismissed-findings-reconciliation.mdRule 5 dismissed finding handling
$PLUGIN_DIR/skills/shared/graph-index-schema.md / graph-module-schema.mdKnowledge graph for --area

Keep looking

Skills are one crate of 608,475. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.