agentleFS
AirMileAirMile/claude-config/skills/team-review/SKILL.md

team-review

Skill0 starsChanged 4 months agoMITView on GitHub

Code review feature branches with scoring. Use with /team-review.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 10

    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. Very specific:

    Team-mode gate: Read TEAM_MODE via shared/PROJECT-MODE.md read pattern.

    line 44
  2. Distinctive:

    If no PR exists: always proceed

    line 69
  3. Distinctive:

    Use AskUserQuestion with 2 options:

    line 75
  4. Very specific:

    Read CLAUDE.md (global ~/.claude/CLAUDE.md + project-level CLAUDE.md files)

    line 84
  5. Distinctive:

    Grounding requirement: Every finding must include an evidence pair:

    line 98
  6. Distinctive:

    Before reporting, verify: is it actually a bug (not intentional)?

    line 127
  7. Distinctive:

    Call Context7 inline for the detected languages/frameworks:

    line 142
  8. Distinctive:

    Zero-findings self-check: If all passes together report 0 findings for diffs >50 lines → reconsider: "Am I being optimistic?

    line 175
  9. Distinctive:

    If no issues found above threshold, say so clearly and focus on positives.

    line 222
  10. Distinctive:

    If open PR exists: use AskUserQuestion — "Do you want to post this as a PR comment?"

    line 228
  11. Distinctive:

    Follow the Language Policy in CLAUDE.md.

    line 241
  12. Distinctive:

    Always check CLAUDE.md first for project-specific rules

    line 245

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

Overview

Code review skill for feature branches. Performs inline code analysis (compliance, bugs, history) with confidence scoring and filtering, optionally enriched with Context7 best-practice research. Supports PR integration for posting review comments.

Trigger: /team-review

When to Use

Activate this skill when code needs quality check before PR/merge request.

Not for:

  • Testing or functionality verification
  • Main/develop branch (must be on feature branch)
  • Single file reviews (use for branch-wide changes)

Workflow

Phase tracking — first action of the skill: call TaskCreate with these 7 items (status pending), then use TaskUpdate to set each phase in_progress at start and completed at end. On context compaction the task list remains visible — no risk of forgotten phases.

  1. Step 1: Detection & Setup
  2. Step 2: Mode Selection
  3. Step 3: Gather Context
  4. Step 4: Inline Review Analysis
  5. Step 5: Confidence Scoring & Filtering
  6. Step 6: Generate Feedback
  7. Step 7: Output & PR Integration

Step 1: Detection & Setup

Todo: call TaskCreate with the 7 phase items (see above). Mark Step 1 → in_progress via TaskUpdate.

  1. Team-mode gate. Read TEAM_MODE via shared/PROJECT-MODE.md read pattern. If "solo" or absent → show AskUserQuestion (warn-only):

    header: "Solo project"
    question: "This project is marked solo (team.mode). /team-review is meant for projects with multiple contributors. Continue anyway?"
    options:
      - label: "Cancel (Recommended)"
        description: "Exit. Toggle to team via the ⚙ button in the backlog or run /core-setup to mark this as a team project."
      - label: "Yes, continue once"
        description: "Proceed with the review for this single invocation."
    multiSelect: false

    Cancel → exit. Continue → proceed with step 1.

  2. Get current branch: git branch --show-current
  3. Validate not on main/master/develop — if so, stop with error message
  4. Find parent branch via merge-base: git merge-base HEAD develop (fallback to main/master)
  5. Get all commits since branch creation: git log <merge-base>..HEAD --oneline
  6. Get full diff: git diff <merge-base>..HEAD
  7. PR detection: gh pr list --head $(git branch --show-current) --json number,state,isDraft
  8. Eligibility checks (if PR exists):
    • Skip if PR is closed → tell user and stop
    • Skip if PR is draft → tell user and stop
    • Skip if already reviewed by Claude (check PR comments) → tell user and stop
  9. If no PR exists: always proceed

Step 2: Mode Selection

Todo: mark Step 1 → completed, Step 2 → in_progress.

Use AskUserQuestion with 2 options:

  • Quick review — Inline analysis (compliance, bugs, history). Fast, focused on issues.
  • Full review (Recommended) — Inline analysis + Context7 best-practice research. More comprehensive, includes naming/pattern/structure feedback.

Step 3: Gather Context

Todo: mark Step 2 → completed, Step 3 → in_progress.

  1. Read CLAUDE.md (global ~/.claude/CLAUDE.md + project-level CLAUDE.md files)
  2. Identify languages/frameworks in the changed files
  3. Prepare git blame for changed files: for each changed file, run git blame <merge-base>..HEAD -- <file>

Step 4: Inline Review Analysis

Todo: mark Step 3 → completed, Step 4 → in_progress.

Perform 3 analysis passes on the diff. All passes use the same diff and context — no agents needed. Show an ASCII diagram of the parallel review architecture (3 passes → merge → filter → output).

Operational stance: Skeptical. Default: there are problems until proven otherwise.

Anti-fantasy check per pass: Expect at least 1-2 findings per pass for diffs >50 lines. Zero findings requires an explicit explanation why (e.g. "diff contains only styling/config").

Grounding requirement: Every finding must include an evidence pair:

  • Line/Source: "[exact quote from CLAUDE.md / best practice / git history]"
  • Code: "[exact code that violates it, with file:line]"
  • Impact: "[what can go wrong]"

Pass 1: CLAUDE.md Compliance

Extract actionable rules from CLAUDE.md (skip tool usage rules, workflow rules). For each rule about code style, naming, architecture, language policy, file organization, or technology choices:

  • Scan diff for violations introduced in this diff only
  • Cite the exact CLAUDE.md rule for each violation
  • Score confidence per finding (0-100)

Skip: pre-existing issues, moved-only code, pedantic interpretations, rules not applicable to code review.

Pass 2: Bug Scan

Scan changed code for these categories:

  • Logical errors — wrong comparison, inverted conditions, incorrect operator
  • Null/undefined handling — missing null checks, unsafe access chains
  • Race conditions — shared state mutation, async ordering issues
  • Resource leaks — unclosed handles, missing cleanup, event listener leaks
  • Off-by-one errors — loop bounds, array indexing, slice ranges
  • Type mismatches — wrong argument types, implicit coercion bugs
  • Error handling gaps — swallowed errors, missing catch, unchecked return values
  • Copy-paste errors — duplicated code with wrong variable names

Before reporting, verify: is it actually a bug (not intentional)? Would a linter catch it? Is there a guard earlier? Score confidence per finding.

Pass 3: History Analysis

Using git blame output, analyze:

  • Broken patterns — file consistently uses approach A, change introduces approach B
  • Regression risk — diff modifies code that was part of a bug fix
  • Churn detection — files with high recent churn being modified again
  • Convention breaks — file establishes a convention the change doesn't follow

Skip: intentional refactors, ongoing migrations, new files with no history.

Pass 4 (Full mode only): Best Practice Research

Call Context7 inline for the detected languages/frameworks:

  • Naming conventions — are names idiomatic for the framework?
  • Code patterns — are there anti-patterns or better alternatives?
  • Structure — does the organization follow framework conventions?

Step 5: Confidence Scoring & Filtering

Todo: mark Step 4 → completed, Step 5 → in_progress.

Apply filtering across all passes:

Filter threshold: 70+ — only include findings with confidence >= 70.

Confidence rubric:

ScoreMeaning
0False positive, does not hold up on inspection
25Possibly real, but not verified
50Real issue, but minor/nitpick
75Verified issue, important
100Absolutely certain, evidence confirms it

Discard findings that match false positive criteria:

  • Pre-existing issues (not introduced in this branch)
  • Issues that linters/type checkers/CI would catch
  • Pedantic nitpicks
  • Style issues not defined in CLAUDE.md
  • Issues with lint-ignore comments
  • Intentional functionality changes

Zero-findings self-check: If all passes together report 0 findings for diffs >50 lines → reconsider: "Am I being optimistic? Would a critical reviewer let this pass?" Go through the diff once more with focus on missed issues.

Step 6: Generate Feedback

Todo: mark Step 5 → completed, Step 6 → in_progress.

Format output as:

## Code Review: [branch-name]

[Optional: PR #N link if PR exists]

### Summary

[Brief summary of changes and overall impression]

### Issues Found

#### Critical (confidence 85+)

1. [description] (source: compliance/bug/history)
   `path/to/file.ext#L10-L15` — confidence: [X]

#### Important (confidence 70-84)

1. [description] (source: compliance/bug/history)
   `path/to/file.ext#L20-L25` — confidence: [X]

### Best Practice Insights (Full mode only)

- [naming/pattern/structure feedback from Context7 research]

### Positives

- [what was done well]

Verdict (always include):

### Verdict

APPROVE — 0 critical findings + ≤2 important findings
REQUEST CHANGES — any critical OR >2 important findings

If no issues found above threshold, say so clearly and focus on positives.

Step 7: Output & PR Integration

Todo: mark Step 6 → completed, Step 7 → in_progress.

  • If open PR exists: use AskUserQuestion — "Do you want to post this as a PR comment?"
    • Yes: post via gh pr comment <number> --body "..."
    • No: show locally only
  • If no PR: show locally only

Todo: mark Step 7 → completed.


Best Practices

Language

Follow the Language Policy in CLAUDE.md.

Do

  • Always check CLAUDE.md first for project-specific rules
  • Provide actionable feedback with specific file/line references
  • Balance criticism with positives
  • Prioritize feedback (critical > important)
  • Be constructive — suggest solutions, not just problems
  • Respect the confidence threshold — don't include low-confidence noise

Don't

  • Review testing or functionality (out of scope)
  • Include findings below confidence 70
  • Overwhelm with too many minor issues
  • Be vague — always reference specific code
  • Flag pre-existing issues not introduced in this branch

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.