agentleFS
blamechrisblamechris/chroxy/.claude/skills/agentic-audit/SKILL.md

agentic-audit

Skill8 starsChanged 9 days agoMITView on GitHub

Launch a panel of specialized agents to audit a pull request from multiple perspectives before merge.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run agents as foreground Task calls.

    line 98
  2. Distinctive:

    Sample-verify instead of up-tiering: If the panel's findings look unreliable, re-check a ~10% sample with a stronger tier rather than …

    line 106
  3. Distinctive:

    After all agents return, output a single synthesis directly to the user (no files written):

    line 111
  4. Distinctive:

    After presenting the synthesis, ask the user:

    line 143

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

/agentic-audit

Launch a panel of specialized agents to audit a pull request from multiple perspectives before merge.

Arguments

  • $ARGUMENTS - PR number (optional, defaults to current branch's PR), plus optional agent count (default: 5). Examples:
    • 42 (PR #42, 5 agents)
    • 42 7 (PR #42, 7 agents)
    • 3 (PR #3 or 3 agents — resolved by checking if a PR with that number exists)

Instructions

1. Gather PR Context

PR_NUM=${1:-$(gh pr view --json number -q .number)}
AGENT_COUNT=${2:-5}  # min: 3, max: 8
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)

# PR metadata
gh pr view ${PR_NUM} --json title,body,headRefName,baseRefName,files,additions,deletions

# Full diff
gh pr diff ${PR_NUM}

# Changed file list
gh pr view ${PR_NUM} --json files -q '.files[].path'

Build a context bundle for agents containing: PR title, description, branch names, full diff, and the list of changed files.

2. Select Agents

Pick AGENT_COUNT agents from the roster. Always include the core 3. Fill remaining slots from the extended roster based on what the diff touches.

Core (always included)

AgentLensPersonality
SkepticCorrectness, false assumptions, logic errors, what will breakCynical engineer who has seen too many PRs ship bugs. Reads every line of the diff looking for what's wrong.
BuilderCompleteness, missing edge cases, integration gaps, unfinished workPragmatic dev who has to maintain this code. Finds what's missing, incomplete, or will cause follow-up PRs.
MinimalistOver-engineering, unnecessary changes, scope creep, simpler alternativesBelieves the best PR is the smallest PR. Finds what to cut and proposes leaner approaches.

Extended (pick by relevance to the diff)

AgentLensInclude When
GuardianFailure modes, race conditions, data integrity, error handlingChanges touch concurrency, state management, data persistence, or error paths
OperatorUX impact, user-facing regressions, accessibility, error statesChanges touch UI, user flows, or output formatting
FuturistTech debt introduced, maintainability cost, extensibility impactChanges introduce new patterns, abstractions, or architectural decisions
AdversarySecurity holes, input validation, auth bypass, injection vectorsChanges touch auth, user input, API boundaries, or external data
TesterTest coverage, untested paths, edge cases, test qualityChanges include complex logic, new features, or modify existing tests

3. Launch Agents

Launch all agents in parallel using the Task tool. Each agent receives the full PR context bundle and their persona.

Agent prompt:

You are "{AGENT_NAME}" — {PERSONALITY}

Audit this pull request from the lens of **{LENS}**.

## PR Context
- **Title**: {PR_TITLE}
- **Branch**: {HEAD} → {BASE}
- **Changed files**: {FILE_LIST}

## Diff
{FULL_DIFF}

## PR Description
{PR_BODY}

## Your Review
1. Rate the PR overall 1–5
2. List your top findings (up to 5), each with:
   - Severity: critical / major / minor / nit
   - File and line reference
   - What's wrong and why it matters
   - Suggested fix (concrete, not vague)
3. Note anything done well worth preserving
4. One-paragraph verdict

## Rules
- Review the DIFF, but also read surrounding code in changed files for context.
- Be specific. Reference exact lines. "This might be a problem" is useless.
- Be opinionated. Strong views, loosely held.
- 3/5 = adequate, would merge with minor comments. 5/5 = exemplary. 1/5 = should not merge.

Run agents as foreground Task calls. If more than 4 agents, batch: first 4 in parallel, then the rest.

Delegation tiers (cost discipline — do not strip):

Roles per /tiered-delegation: workhorse = one tier below the session ceiling, mechanical = cheapest available tier. Concrete model names live only in that skill's CUSTOMIZE-marker ladder — never here.

  • Panel agents run at the workhorse tier by default. Reading a diff through a persona lens is workhorse work; do not spawn panel agents at the ceiling. The orchestrator's synthesis (step 4) carries the expensive judgment.
  • Mechanical prep at the mechanical tier. Building the context bundle (file lists, diff chunking) and any pre-classification of changed files runs at the mechanical tier at low effort.
  • Sample-verify instead of up-tiering. If the panel's findings look unreliable, re-check a ~10% sample with a stronger tier rather than re-running the panel up-tier.
  • Fan-out budget: ~12 workhorse/ceiling subagents per run. The budget counts workhorse- and ceiling-tier agents (the panel); mechanical-tier prep agents and the ~10% sample-verify checks do not count against it. Exceeding 12 requires an explicit one-line justification in the synthesis; 20 is a hard ceiling that includes every refute/verify agent, and no justification lifts it (≤3 refuters per finding — queue rounds rather than widen). The 8-agent panel maximum sits well inside this budget.

4. Synthesize and Report

After all agents return, output a single synthesis directly to the user (no files written):

## Agentic Audit: PR #{PR_NUM} — {TITLE}

**Agents**: {count} | **Aggregate**: {average}/5

### Agent Panel
| Agent | Rating | Top Finding |
|-------|--------|-------------|
| Skeptic | X/5 | One-line summary |
| Builder | X/5 | One-line summary |
| ... | ... | ... |

### Consensus Findings
Issues where 3+ agents agree. These are high-confidence and should be addressed.

1. **{Finding}** (Skeptic, Builder, Guardian) — {description + file:line}
2. ...

### Contested Points
Where agents disagree. Present both sides, assess who's right.

### Action Items
Prioritized list of recommended changes before merge, ordered by severity.

### Verdict
One paragraph: merge as-is, merge with changes, or rework needed.

5. Offer Next Steps

After presenting the synthesis, ask the user:

Want me to fix any of the findings? I can address them as commits on this branch.

Rating Scale

RatingMeaning
5Exemplary — would merge without comment
4Good — minor issues, none blocking
3Adequate — merge with changes
2Concerning — significant issues to resolve first
1Do not merge — needs rework

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.