Skip to content
ln-502-agent-reviewer logo

Agent Reviewer (Code)

ln-502-agent-reviewer

Worker that runs parallel external agent reviews (Codex + Gemini) on code changes. Reference-based prompts. Returns filtered suggestions with confidence scoring.

SKILL.md

Full skill instructions

Agent Reviewer (Code)

Runs parallel external agent reviews on code implementation, returns filtered suggestions.

Purpose & Scope

  • Worker in ln-500 quality gate pipeline (invoked by ln-501 Step 7)
  • Run codex-review + gemini-review in parallel on code changes
  • Return filtered, deduplicated suggestions with confidence scoring
  • Health check + prompt execution in single invocation (minimal timing gap between availability check and actual API call)

When to Use

  • Invoked by ln-501-code-quality-checker Step 7 (Agent Review)
  • All implementation tasks in Story status = Done
  • Code quality analysis (Steps 1-6) already completed by ln-501

Inputs (from parent skill)

  • storyId: Linear Story identifier (e.g., "PROJ-123")

Workflow

  1. Health check: python shared/​agents/​agent_runner.py --health-check
    • Filter output by skill_groups containing "502"
    • If 0 agents available -> return {verdict: "SKIPPED", reason: "no agents available"}
    • Display: "Agent Health: codex-review OK, gemini-review UNAVAILABLE" (or similar)
  2. Load Story: get_issue(storyId) via MCP Linear -> get description, title, identifier, URL
  3. Load Tasks: list_issues(filter: {parent: {id: storyId}, status: "Done"}) via MCP Linear -> Done implementation tasks (exclude label "tests")
  4. Materialize content: Create .agent-review/ directory in project CWD
    • Save Story markdown to .agent-review/​story-{identifier}.md
    • Save Tasks markdown (concatenated with headers) to .agent-review/​tasks-{identifier}.md
    • Ensure .agent-review/ is in project .gitignore (add if missing)
  5. Build prompt: Read template shared/​agents/​prompt_templates/​code_review.md
    • Replace {story_url} with Linear URL (e.g., https://linear.app/​team/​PROJ-123)
    • Replace {story_file} with story-{identifier}.md
    • Replace {tasks_file} with tasks-{identifier}.md
    • Save expanded prompt to temp file (use %TEMP% on Windows, /​tmp on Unix)
  6. Run agents in parallel (two Bash calls simultaneously):
    • python shared/​agents/​agent_runner.py --agent codex-review --prompt-file {temp} --cwd {cwd}
    • python shared/​agents/​agent_runner.py --agent gemini-review --prompt-file {temp} --cwd {cwd}
  7. Aggregate: Collect suggestions from all successful responses. Deduplicate by (area, issue) — keep higher confidence. Filter: confidence >= 90 AND impact_percent > 2
  8. Cleanup: Delete .agent-review/ directory. Return JSON with suggestions + agent stats to parent skill.

Output Format

verdict: CODE_ACCEPTABLE | SUGGESTIONS | SKIPPED
suggestions:
  - area: "security | performance | architecture | correctness | best_practices"
    issue: "What is wrong"
    suggestion: "Specific fix"
    confidence: 95
    impact_percent: 15
agent_stats:
  - name: "codex-review"
    duration_s: 12.4
    suggestion_count: 3
    status: "success | failed | timeout"

Fallback Rules

ConditionAction
Both agents succeedAggregate suggestions from both
One agent failsUse successful agent's suggestions, log failure
Both agents failReturn {verdict: "SKIPPED", reason: "agents failed"}
Parent skill (ln-501)Falls back to Self-Review (native Claude)

Verdict Escalation

  • Findings with area=security or area=correctness -> parent skill can escalate PASS -> CONCERNS
  • This skill returns raw suggestions; escalation decision is made by ln-501

Critical Rules

  • Read-only review — agents must NOT modify files
  • Same prompt to all agents (identical input for fair comparison)
  • JSON output schema required from agents (via --json / --output-format json)
  • Log all attempts for user visibility (agent name, duration, suggestion count)
  • Always cleanup .agent-review/ directory after agents complete (even on failure)
  • Ensure .agent-review/ is in project .gitignore before creating files

Reference Files

  • Agent delegation pattern: shared/​references/​agent_delegation_pattern.md
  • Prompt template: shared/​agents/​prompt_templates/​code_review.md
  • Agent registry: shared/​agents/​agent_registry.json
  • Agent runner: shared/​agents/​agent_runner.py

Version: 1.0.0 Last Updated: 2026-02-08

More Security skills

supabase logo
Security

supabase

Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...

2.7K 308.9K
View

Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.

98 216.2K
View

Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.

462 163.8K
View

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

462 127.7K
View

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

462 125.1K
View

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

222 118.2K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View
cloudflare logo
Security

cloudflare

Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.

3K 110.7K
View

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

253 103K
View
gws-gmail logo
Security

gws-gmail

Send, read, and manage Gmail messages, drafts, labels, and account settings.

31.2K 78.9K
View

Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.

94 72.3K
View
gws-shared logo
Security

gws-shared

Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.

31.2K 63.4K
View

Security AI tools

StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
GeoSpy logo
Security

GeoSpy

GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams

Free
View

Detect AI-generated voices to protect against audio fraud.

Paid
View

Ensure Your Content's Originality with AI Plagiarism Checker

Freemium
View
Img Upscaler logo
Security

Img Upscaler

Upscale images by 400% without quality loss

Freemium
View
AICheatCheck logo
Security

AICheatCheck

Accurately Detect AI-Generated Content with TheChecker.AI

Free
View
D
Security

Detect GPT

Chrome extension that detects and flags AI-generated content

Free
View