agentleFS
BorjaIPBorjaIP/personal-os-skills/skills/second-opinion/SKILL.md

second-opinion

Skill1 starsChanged 34 days agoMITView on GitHub

Trigger: "review what the agent did", "second opinion on these commits", "validate agent work", "review agent changes", /second-opinion. Reviews a git diff, commit range or PR for bugs, intent drift and CLAUDE.md violations.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use insecure-defaults, variant-analysis 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.
  • allanninalSkill

    insecure-defaults

    Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecurely in production. Use when auditing security, reviewing config management, or analyzing environment variable handling.

    Also in 3 projects that use this

  • allanninalSkill

    variant-analysis

    Find similar vulnerabilities and bugs across codebases using pattern-based analysis. Use when hunting bug variants, building CodeQL/Semgrep queries, analyzing security vulnerabilities, or performing systematic code audits after finding an initial issue.

    Also in 3 projects that use this

  • shmehroSkill

    ux-audit

    Perform a heuristic UX audit on a UI screen, flow, or component description

    Also in 3 projects that use this

  • sunnyclinches44Skill

    explain

    Explains code using real-world analogies and ASCII diagrams

    Also in 5 projects that use this

  • photon-groveSkill

    unslop

    Detects and rewrites generic, overly polished, or AI-sounding prose while preserving meaning. Use when the user asks to "unslop", humanize, de-AI, tighten, or review whether writing sounds generated.

    Also in 4 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 38 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT use this skill when:

    line 22
  2. Very specific:

    If the user passed pr:<N> → scope = PR.

    line 42
  3. Distinctive:

    If a commit range is mentioned → scope = commits.

    line 43
  4. Distinctive:

    Read the root CLAUDE.md (if it exists) for compliance checks in Step 2.

    line 45
  5. Very specific:

    If scope = PR and create_plan != no:

    line 100
  6. Distinctive:

    Keep descriptions brief. Link to file and line for every finding.

    line 142
  7. Distinctive:

    Do not emit emojis beyond the verdict line.

    line 143
  8. Distinctive:

    If zero findings survive the filter, report "No issues found" and stop.

    line 144
  9. Distinctive:

    If findings with score ≥ 75 exist:

    line 150

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

Agent Reviewer

Independent QA layer over agent-produced work. Spawns parallel review sub-agents to audit changes across four dimensions, scores findings, and optionally enters Plan Mode to produce a correction plan.

When to Use

Trigger when the user asks any of:

  • "Review what the agent just did"
  • "Second opinion on these commits / this PR"
  • "Validate the agent's work before I merge"
  • "Check if agent changes are correct"
  • "Did the agent do what I asked?"

Do NOT use this skill when:

  • The user wants a standard PR review without agent context → call /code-review directly.
  • The user wants to execute or plan new work → use mdn-run or mdn-plan.

Inputs

Gather from context or ask one clarifying question:

  1. scope (required, infer from context):
    • local — no scope given; auto-detect via git status + git diff HEAD.
    • commits:<sha1>..<sha2> — user specifies a commit range.
    • pr:<number> — user provides a Pull Request number.
  2. intent (required): what the agent was supposed to do. If not stated, ask before proceeding.
  3. create_plan (yes / no / ask, default ask): whether to enter Plan Mode if significant issues are found.

Step 0 — Detect Scope and Load Context

  1. If the user passed pr:<N> → scope = PR.
  2. If a commit range is mentioned → scope = commits.
  3. Otherwise → run git status and git diff HEAD; scope = local.
  4. Read the root CLAUDE.md (if it exists) for compliance checks in Step 2.
  5. Restate scope and intent to the user before proceeding (cheap sanity check).

Step 1 — Collect the Diff

Depending on scope:

  • PR: gh pr diff <N> + gh pr view <N> (title, description, body, changed files).
  • Commits: git log <range> --oneline + git diff <range> + commit messages.
  • Local: git diff HEAD (staged + unstaged) + git status.

Extract and store: list of changed files, full diff, associated commit messages.


Step 2 — Parallel Multi-Agent Review

Launch 4 Sonnet agents in parallel (single message, 4 Agent tool calls):

AgentFocus
#1 — Intent AlignmentDoes the change do what the stated intent asked? Is anything missing or added beyond scope?
#2 — Bug ScanShallow scan for obvious bugs in the diff. Skip pre-existing issues and pedantic nitpicks.
#3 — CLAUDE.md ComplianceDoes the code follow the instructions in the relevant CLAUDE.md files?
#4 — Historical ContextRun git blame on modified files; flag conflicts with prior invariants or recent related changes.

Each agent returns a list of findings with: description, estimated severity (low / medium / high), and justification.

False positive guidelines for all agents (identical to the built-in code-review plugin):

  • Pre-existing issues not touched by this diff.
  • Something that looks like a bug but is not.
  • Pedantic nitpicks a senior engineer would not call out.
  • Issues a linter or type-checker would catch — assume CI handles those.
  • General quality concerns (test coverage, documentation) unless CLAUDE.md explicitly requires them.

Step 3 — Score Findings

For each finding from Step 2, launch a parallel Haiku agent that scores it 0–100 (give this rubric verbatim):

  • 0: False positive. Does not survive light scrutiny or is a pre-existing issue.
  • 25: Possible issue, unverified. May be a false positive.
  • 50: Real issue, but minor or unlikely to be hit in practice.
  • 75: Important issue, well-verified, likely to occur in practice.
  • 100: Critical and confirmed. Will definitely occur frequently.

Filter out findings with score < 75. If no findings remain, the agent work is clean — report that and stop.


Step 4 — Optional: Invoke /code-review as Sub-Agent (PR scope only)

If scope = PR and create_plan != no:

  1. Launch an agent that runs the built-in code-review command on the PR.
  2. Merge its findings into the consolidated report, labelled [code-review] as source.
  3. Apply the same ≥ 75 filter before merging.

This step is additive — it supplements Steps 2–3, does not replace them.


Step 5 — Consolidate and Report

Generate a Markdown report in the conversation:

## Agent Review — <scope>

### Intent
<what the agent was supposed to do>

### Verdict
✓ Aligned | ⚠ Minor issues | ✗ Significant issues

### Findings (<N> issues)

1. [HIGH] <brief description> — score: 85
   File: path/to/file.py:42
   Reason: <justification>

2. [MEDIUM] <brief description> — score: 77
   File: path/to/other.ts:10
   Reason: <justification>

### Clean Dimensions
- Intent alignment ✓  (or listed here if no issues found for that agent)
- CLAUDE.md compliance ✓

### Recommendation
<free text: merge / fix before merge / requires correction plan>

Rules:

  • Keep descriptions brief. Link to file and line for every finding.
  • Do not emit emojis beyond the verdict line.
  • If zero findings survive the filter, report "No issues found" and stop.

Step 6 — Correction Plan (Conditional)

If findings with score ≥ 75 exist:

  • create_plan=yes — Enter Plan Mode automatically (EnterPlanMode) with findings as requirements context.
  • create_plan=ask — Ask the user: "Do you want me to generate a correction plan for these findings?" Proceed only on explicit confirmation.
  • create_plan=no — Skip.

The correction plan uses the findings as requirements and follows the standard Claude Code plan structure. Reference the specific files and line numbers from the findings.


Hard Constraints

  • Read-only against git and GitHub — never commit, push, or merge as part of this review.
  • No fabricated findings — if an agent finds nothing, record "no issues" and continue. Do not invent issues to fill the report.
  • No build steps — do not run tests, linters, or type-checkers. Assume CI handles those.
  • Cite everything — every finding must include a file path and line reference.

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.