stoa: Skill for Claude Code

.claude/skills/pr-guardian/SKILL.md

pr-guardian is a skill for Claude Code from stoa-platform/stoa. It costs 41 tokens per session (2,446 once invoked), scanned A, original, Apache-2.0.

An advisory pull-request review process for the STOA open-source API and MCP governance gateway. It checks architecture decisions, security, and patterns associated with AI-generated code, then gives a binary GO or NO-GO result with a confidence level.

In plain words
What is it for?
Use it to review a pull request's metadata, diff, and linked issue, then add short advisory comments and possible inline findings on GitHub. It is designed for changes in the STOA ecosystem.
Why use it?
It highlights risks before a person reviews the change while leaving the final decision to humans. It does not approve pull requests, request changes, or prevent merging.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is stoa-platform/stoa's own configuration. It tells Claude Code how to work on stoa itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stoa configures →

Reuse

Borrowing it

Nothing to install: this file belongs to stoa-platform/stoa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/stoa-platform/stoa/main/.claude/skills/pr-guardian/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/stoa-platform/stoa

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-guardian

README.md
[![agentmods](https://agentmods.dev/badge/skills/stoa-platform/stoa/pr-guardian.svg)](https://agentmods.dev/skills/stoa-platform/stoa/pr-guardian)
Your own site
<a href="https://agentmods.dev/skills/stoa-platform/stoa/pr-guardian"><img src="https://agentmods.dev/badge/skills/stoa-platform/stoa/pr-guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02446
Opus 5 $0.00020 $0.01223
Sonnet 5 $0.00008 $0.00489
Haiku 4.5 $0.00004 $0.00245

Measured 7d ago against content hash 9df003aaca08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pr-guardian scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (adr-loader.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Read, Glob, Grep, Bash(gh:*), Bash(curl:*), Bash(jq:*), Bash(./\.claude/skills/pr-guardian/adr-loader\.sh:*), Bash(wc:*), Bash(head:*), Bash(sed:*)
.claude/skills/pr-guardian/SKILL.md · 263 lines

How it starts

The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.

STOA PR Guardian — $ARGUMENTS

Advisory-only review. Three axes, binary verdict, idempotent comments. You are reviewing a pull request in the STOA ecosystem (open-source API and MCP governance gateway). Your job is to catch issues BEFORE human review, not to replace it.

ADR: ADR-065 Policy: docs/ai/pr-guardian-policy.md Runbook: docs/ai/pr-guardian-runbook.md


Hard rules (enforced — do not deviate)

  • Never approve. Never submit a GitHub review with state APPROVE or REQUEST_CHANGES. Use gh pr comment (summary) and gh api (inline) only.
  • Never block merge. You are advisory. You signal risk; humans decide.
  • Terse comments. Max 4 lines each. No preamble ("Great PR!"), no emoji, no trailing summary.
  • No follow-ups injected. Do not write TODO/FIXME into the reviewed code. Do not open issues.
  • English in GitHub comments. French is fine in Slack if it matches the team tone.
  • Summary comment MUST begin with <!-- stoa-pr-guardian --> on its own line.

Step 1 — Load context

PR number: $ARGUMENTS (also available as $PR_NUMBER env var in CI).

Pull the PR metadata, diff, and linked issue:

PR="${PR_NUMBER:-$ARGUMENTS}"
REPO="${REPO:-$(gh repo view --json nameWithOwner -q .nameWithOwner)}"

gh pr view "$PR" --json title,body,author,headRefName,baseRefName,files,labels \
  > /tmp/guardian-pr-meta.json

gh pr diff "$PR" --patch > /tmp/guardian-pr-diff.patch

DIFF_LINES=$(wc -l < /tmp/guardian-pr-diff.patch | tr -d ' ')
echo "Diff lines: $DIFF_LINES (cap 1000)"

If the workflow already short-circuited on the 1000-line guard, this step will not run; when invoked locally on an oversize PR, stop and emit the same "diff too large" comment the workflow would have posted.


Step 2 — Detect stack

Map changed files to stacks. A PR can span multiple stacks.

Read the full file on GitHub · 263 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 263 lines · 41 tokens per session scan A 9df003aaca08

Subscribe to this mod's changes

pr-guardian is a skill published in the GitHub repository stoa-platform/stoa (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 41 tokens to every session and 2,446 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.