agentleFS
cisco-opencisco-open/ai-harness-toolkit/skills/code-review/SKILL.md

code-review

Skill13 starsChanged 7 months agoApache-2.0View on GitHub

Stack-aware code review orchestrator that detects tech stacks from changed files, dispatches parallel review lanes to subagents with prescriptive instructions, synthesizes findings, and runs a fix loop for deterministic fixes. Supports TypeScript/JavaScript, Python, and Java.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use starter, media-processing 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.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this skill on a feature branch with uncommitted or committed changes.

    line 15
  2. Distinctive:

    Run a fix loop for safe deterministic fixes

    line 22
  3. Distinctive:

    Check that required companion skills are installed before dispatching lanes.

    line 29
  4. Distinctive:

    Check if it exists in any of the skill directories above

    line 40
  5. Very specific:

    If missing, record it with its apm install command

    line 41
  6. Distinctive:

    Create the review artifact directory and file:

    line 62
  7. Very specific:

    Write the initial review artifact to tmp/review/<branch>-review.md using the format defined in references/review-artifact-format.md.

    line 68
  8. Distinctive:

    Check framework detection signals from the stack reference

    line 85
  9. Distinctive:

    Polyglot repos: If files span multiple stacks, load all matching stack references and activate lanes for each.

    line 88
  10. Distinctive:

    File scope: Only the changed files relevant to its stack (not the entire diff)

    line 94
  11. Distinctive:

    After all subagents complete:

    line 143
  12. Very specific:

    Update the review artifact at tmp/review/<branch>-review.md

    line 152
  13. Distinctive:

    All impacted checks pass (success)

    line 165
  14. Distinctive:

    No progress made in an iteration (stall -- report remaining as needs-human)

    line 166
  15. Very specific:

    Check if reflect-on-changes exists in any skill directory

    line 175
  16. Distinctive:

    If installed, invoke it with the review findings to update docs, conventions, or skills that may be stale

    line 176
  17. Distinctive:

    If not installed, skip without error

    line 177

“Common” is measured: kept by at least 6 in 10 of the 175 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 Review

Stack-aware code review orchestrator. Detects the tech stack from changed files, validates companion skills, dispatches parallel review lanes, synthesizes findings, runs a fix loop, and optionally reflects.

How To Use This Skill

Run this skill on a feature branch with uncommitted or committed changes. The orchestrator will:

  1. Validate that required companion skills are installed
  2. Scope the review from git diff and git status
  3. Detect stacks and route review lanes
  4. Dispatch parallel subagents with prescriptive instructions
  5. Synthesize findings into a review artifact
  6. Run a fix loop for safe deterministic fixes
  7. Optionally reflect on changes

The review artifact is written to tmp/review/<branch>-review.md.

Phase 0: Validate Companion Skills

Check that required companion skills are installed before dispatching lanes. Inspect these directories for installed skills:

  • skills/
  • .agents/skills/
  • .claude/skills/
  • .opencode/skills/
  • .cursor/skills/
  • .github/skills/

For each detected stack, load its stack reference file (stacks/<stack>.md) and check the companion skill mappings section. For each required skill:

  1. Check if it exists in any of the skill directories above
  2. If missing, record it with its apm install command

If all skills are installed: Proceed to Phase 1 without warnings.

If skills are missing: Display which skills are missing, provide apm install commands for each, and ask the user whether to:

  • Install the missing skills now and retry validation
  • Continue with native fallback for affected lanes
  • Abort the review

Phase 1: Scope Detection

Determine the review scope from changed files:

BASE_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
git diff "${BASE_BRANCH:-main}"...HEAD --name-only
git status --porcelain

Combine both outputs to get the full list of changed files. Detect the base branch from origin/HEAD, falling back to main only when that cannot be resolved.

Create the review artifact directory and file:

mkdir -p tmp/review

Write the initial review artifact to tmp/review/<branch>-review.md using the format defined in references/review-artifact-format.md.

If no changes are detected: Report "No changes to review" and exit.

Phase 2: Detect Stacks and Route Lanes

Match changed file extensions to stack reference files:

ExtensionsStack Reference
*.ts, *.tsx, *.js, *.jsxstacks/javascript-typescript.md
*.pystacks/python.md
*.java, *.ktstacks/java.md

For each activated stack:

  1. Load the stack reference file
  2. Filter changed files to only those matching the stack
  3. Check framework detection signals from the stack reference
  4. Determine which lanes to activate based on the stack and detected frameworks

Polyglot repos: If files span multiple stacks, load all matching stack references and activate lanes for each. Each lane receives only files relevant to its stack.

Phase 3: Dispatch Parallel Subagents

For each activated lane, dispatch a subagent with prescriptive instructions. Each subagent receives:

  • File scope: Only the changed files relevant to its stack (not the entire diff)
  • Deterministic commands: Exact commands to run from the stack reference
  • Companion skills: Which skills to use and how
  • Native focus areas: What patterns to look for in manual review

Lane Types

Each stack defines content for these lane types:

  1. Quick Checks -- Lint, type-check, format verification. Fast deterministic commands.
  2. Extended Validation -- Tests, coverage, SAST, dependency audit. Slower but still deterministic.
  3. Security -- Security-focused review using security-review companion skill and SAST tools.
  4. Framework -- Framework-specific review using framework companion skills (React, Angular, FastAPI, Django, Spring Boot).
  5. Performance -- Performance pattern review using native focus areas and companion skills.
  6. Testing -- Test quality and coverage review using testing companion skills.

Lanes are independent -- each can execute without depending on results from other lanes. Dispatch them as parallel tasks/subagents where the harness supports it.

Subagent Instruction Template

For each subagent, provide instructions in this format:

## Review Lane: <lane-name> (<stack>)

### Scope
Files to review:
<file list>

### Deterministic Commands
Run these commands and report results:
<commands from stack reference>

### Companion Skills
Use these skills for guided review:
<skill names and what to use them for>

### Native Review Focus
If companion skills are not available, focus on:
<focus areas from stack reference>

### Output Format
Report findings as:
- **file:line** -- severity (error|warning|info) -- description
- Classify each as: auto-fixable | needs-human

Phase 4: Synthesize Findings

After all subagents complete:

  1. Collect all findings from all lanes
  2. Merge findings that reference the same file and line from different lanes
  3. Deduplicate overlapping issues (prefer the more specific finding)
  4. Classify each finding:
    • auto-fixable: A deterministic tool fix exists (lint auto-fix, format)
    • needs-human: Requires manual review or code change
  5. Group findings by severity: error, warning, info
  6. Update the review artifact at tmp/review/<branch>-review.md

Phase 5: Fix Loop

Apply safe deterministic fixes and rerun impacted checks. Read references/fix-loop-protocol.md for the full protocol.

Summary:

  1. Collect auto-fixable findings
  2. Apply deterministic tool fixes (lint --fix, format)
  3. Rerun only the impacted deterministic checks
  4. Record the iteration in the fix loop log
  5. Repeat until:
    • All impacted checks pass (success)
    • No progress made in an iteration (stall -- report remaining as needs-human)
    • Iteration limit reached (6 iterations -- report remaining as needs-human)

Never auto-apply non-deterministic fixes. AI-suggested code changes are reported but not applied automatically.

Phase 6: Reflect

Optionally invoke the reflect-on-changes skill if installed:

  1. Check if reflect-on-changes exists in any skill directory
  2. If installed, invoke it with the review findings to update docs, conventions, or skills that may be stale
  3. If not installed, skip without error

Reference Map

ReferenceWhen to Read
references/review-artifact-format.mdWhen creating or updating the review artifact
references/fix-loop-protocol.mdWhen running the fix loop in Phase 5
stacks/javascript-typescript.mdWhen TypeScript/JavaScript files are in the diff
stacks/python.mdWhen Python files are in the diff
stacks/java.mdWhen Java/Kotlin files are in the diff

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.