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.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- specs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- specs/CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- token-meter-communicationSkill
- token-meter-developmentSkill
- token-meter-github-opsSkill
- token-meter-intakeSkill
- token-meter-reviewSkill
- token-meter-verificationSkill
- token-meter-communicationSkill
- token-meter-developmentSkill
- token-meter-github-opsSkill
- token-meter-intakeSkill
- token-meter-pr-reviewSkill
- token-meter-reviewSkill
- token-meter-verificationSkill
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
- Distinctive: line 39
Never check out the PR in the user's worktree, which may contain unrelated changes.
- Very specific: line 40
Never run ./scripts/install from a PR head: it replaces the user's installed runtime.
- Very specific: line 46
Read .agents/workflow/review-policy.yaml.
- Distinctive: line 78
Add a reviewer when the diff warrants another lens:
- Distinctive: line 92
Treat a claim in the PR body that the evidence contradicts as a finding.
- Distinctive: line 110
check that no equivalent comment exists for the same head.
- Distinctive: line 114
After posting, read the comment back.
- Very specific: line 120
When done, remove the worktree with git worktree remove /private/tmp/tm-prN and delete the pr-N ref.
≈ “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.
Files
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-onlyRecord 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/installfrom 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.
| Agent | Lens | Must cover |
token-meter-tester | test-quality-and-real-evidence | Full 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-reviewer | privacy-and-data-boundaries | Read-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-reviewer | requirements-and-correctness + regressions-and-consumers | Issue 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-behaviorfor Swift, tray, Windows, or Linux changes;runtime-and-packaging-parityfor installer or manifest changes.
5. Consolidate and verify
While the agents run, do not repeat their work. When they return:
- 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.
- Deduplicate overlapping findings across agents.
- 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.
- Treat a claim in the PR body that the evidence contradicts as a finding.
6. Report to the user
- Verdict: merge-ready, changes requested, or blocked, bound to the head SHA.
- Findings: a table with severity, area, file:line, issue, and suggested fix, most severe first.
- Security and data exposure: an explicit answer, even when there is none.
- Limitations: a disposition for each stated limitation.
- Verified: the checks that passed, with exact results.
- 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-managerdrafts 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-prNand delete thepr-Nref.
Common mistakes
| Mistake | Fix |
| Trusting "N tests OK" from the PR body | The tester reruns the suite at the head SHA |
| Reviewing in the user's worktree | Use a separate /private/tmp worktree |
| Installing the PR to "check live" | Use an isolated server and fixtures, never ./scripts/install |
| Relaying agent findings unverified | Reproduce blocking and important findings before reporting |
| Missing a delete path | Enumerate the route, trash helper, UI, MCP, and bulk paths |
| Treating limitations as out of scope | Disposition each one; some are findings |
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
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.

