agentleFS
splunksplunk/token-meter/.agents/skills/token-meter-pr-review/SKILL.md

token-meter-pr-review

Skill156 starsChanged 29 days agoMITView on GitHub

Use when asked to review, check, or assess a Token Meter pull request (often a contributor PR by URL or number) for standards, tests, safety, privacy, data exposure, pricing, or merge readiness.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never check out the PR in the user's worktree, which may contain unrelated changes.

    line 39
  2. Very specific:

    Never run ./scripts/install from a PR head: it replaces the user's installed runtime.

    line 40
  3. Very specific:

    Read .agents/workflow/review-policy.yaml.

    line 46
  4. Distinctive:

    Add a reviewer when the diff warrants another lens:

    line 78
  5. Distinctive:

    Treat a claim in the PR body that the evidence contradicts as a finding.

    line 92
  6. Distinctive:

    check that no equivalent comment exists for the same head.

    line 110
  7. Distinctive:

    After posting, read the comment back.

    line 114
  8. Very specific:

    When done, remove the worktree with git worktree remove /private/tmp/tm-prN and delete the pr-N ref.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Token Meter PR Review

Overview

The coordinator orchestrates an independent, gated review of one pull request head. It does not fix the PR. The contributor's description, validation, and limitations are claims to verify, not evidence. This skill sequences the existing token-meter-verification and token-meter-review skills. Their checklists still apply in full.

1. Intake (exact target)

gh pr view N --repo splunk/token-meter --json title,body,author,headRefOid,baseRefName,files,comments,reviews,statusCheckRollup,mergeable
gh pr diff N --repo splunk/token-meter --name-only

Record the following:

  • the head SHA;
  • the merge base with origin/main;
  • the linked issue and any requirements agreed there (gh issue view, including comments);
  • the claimed validation;
  • each stated limitation.

Requirements agreed on the issue are the acceptance criteria.

2. Isolate

git fetch origin main "pull/N/head:pr-N"
git worktree add /private/tmp/tm-prN pr-N
  • Never check out the PR in the user's worktree, which may contain unrelated changes.
  • Never run ./scripts/install from a PR head: it replaces the user's installed runtime. Live checks use an isolated server on a spare port with fixture data, never the real ~/.claude, ~/.codex, provider homes, settings, or port 8722.

3. Classify risk and size the gate

Read .agents/workflow/review-policy.yaml. If the diff touches any of the following, the change is high risk:

  • privacy-boundary
  • pricing-semantics
  • provider-parsing
  • deletion
  • persistence
  • installer-or-staged-runtime
  • native-menu
  • cross-platform
  • shared-helper

A high-risk change needs one tester plus two reviewers with distinct lenses. Other changes need one tester and one reviewer. New runtimes are always high risk.

4. Dispatch in parallel (one message)

Dispatch background agents with self-contained prompts. Each prompt contains:

  • the worktree, base SHA, and head SHA;
  • the issue requirements;
  • the PR's claims and limitations, framed as "verify or refute";
  • the instruction to stay read-only, not post to GitHub, and not install;
  • the required result: findings first, each with severity, file:line at head, a failure scenario, and evidence, followed by the verified claims and the unverified items.
AgentLensMust cover
token-meter-testertest-quality-and-real-evidenceFull suite and the claimed test count, py_compile, embedded JS parse, the design-system contract, git diff --check, runtime-manifest.txt coverage of new files, and an isolated live server with fixture payload greps (prompt text, a fake sk-test- secret, /private/tmp paths, raw exceptions), plus refused or allowed deletion
token-meter-reviewerprivacy-and-data-boundariesRead-only provider inputs; SQLite opened read-only, authorizer scope, and fallback paths; symlinks and traversal outside roots; bounded reads and ReDoS; absolute paths, URIs, prompt text, or free-form names leaking into HTTP, /menubar, MCP, or projections.py; every delete path (route, trash helper, UI, MCP, bulk); env-var overrides; no network or telemetry; stdlib only
token-meter-reviewerrequirements-and-correctness + regressions-and-consumersIssue requirements met; estimates labeled est on every surface; unavailable evidence never shown as 0; unknown models unpriced, not $0; price tables cite their source, effective dates and long-context tiers are correct, and other providers' pricing and stored overrides are unchanged; models scoped by runtime; registry, filters, budgets, and --provider-* color; test assertions not loosened; revision and cache invalidation; top-level navigation order preserved

Add a reviewer when the diff warrants another lens:

  • platform-and-native-behavior for Swift, tray, Windows, or Linux changes;
  • runtime-and-packaging-parity for installer or manifest changes.

5. Consolidate and verify

While the agents run, do not repeat their work. When they return:

  1. Reproduce every blocking or important finding yourself, with a command or quoted lines at the head SHA. Downgrade or drop any finding you cannot reproduce.
  2. Deduplicate overlapping findings across agents.
  3. Go through each stated limitation. Accept it, or upgrade it to a finding when it hides a real risk, for example "estimates are about 10x low" when those estimates feed budgets.
  4. Treat a claim in the PR body that the evidence contradicts as a finding.

6. Report to the user

  1. Verdict: merge-ready, changes requested, or blocked, bound to the head SHA.
  2. Findings: a table with severity, area, file:line, issue, and suggested fix, most severe first.
  3. Security and data exposure: an explicit answer, even when there is none.
  4. Limitations: a disposition for each stated limitation.
  5. Verified: the checks that passed, with exact results.
  6. Not verified: for example target-host Windows or Linux behavior, a live browser check, or the native menu.

7. Contributor reply (when authorized)

A request to review or manage a PR is standing approval for one status comment. Before posting it:

  • the token-meter-communication-manager drafts it;
  • check that no equivalent comment exists for the same head;
  • thank the contributor, give the evidence-backed status and the concrete requested changes, and sign it "— Pratik's agent".

After posting, read the comment back. Approving, requesting changes as a formal review, merging, closing, labeling, and pushing each need separate approval.

8. Freshness and cleanup

  • Any new push to the PR invalidates every result. Re-run the gate at the new head.
  • When done, remove the worktree with git worktree remove /private/tmp/tm-prN and delete the pr-N ref.

Common mistakes

MistakeFix
Trusting "N tests OK" from the PR bodyThe tester reruns the suite at the head SHA
Reviewing in the user's worktreeUse a separate /private/tmp worktree
Installing the PR to "check live"Use an isolated server and fixtures, never ./scripts/install
Relaying agent findings unverifiedReproduce blocking and important findings before reporting
Missing a delete pathEnumerate the route, trash helper, UI, MCP, and bulk paths
Treating limitations as out of scopeDisposition each one; some are findings

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.