epistemic-protocols: Skill for Claude Code

.claude/skills/formal-review/SKILL.md

formal-review is a skill for Claude Code from jongwony/epistemic-protocols. It costs 98 tokens per session (3,182 once invoked), scanned A, original, MIT.

A fixed formal review method for protocol changes, using category theory, type theory and operational semantics—ways to check structure, allowed values and execution behavior. It reviews only the files changed in the pull request.

In plain words
What is it for?
Use it for a formal review of a pull request that changes this repository's protocols, especially changes involving morphisms, types, phase transitions or state-machine behavior.
Why use it?
It gives reviewers a consistent way to find broken relationships, invalid states and inconsistent evaluation order in formally structured protocol code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

This is jongwony/epistemic-protocols's own configuration. It tells Claude Code how to work on epistemic-protocols 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 epistemic-protocols configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jongwony/epistemic-protocols. 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/jongwony/epistemic-protocols/main/.claude/skills/formal-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/jongwony/epistemic-protocols

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 formal-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/jongwony/epistemic-protocols/formal-review/github.svg)](https://agentmods.dev/skills/jongwony/epistemic-protocols/formal-review)
Your own site
<a href="https://agentmods.dev/skills/jongwony/epistemic-protocols/formal-review"><img src="https://agentmods.dev/badge/skills/jongwony/epistemic-protocols/formal-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for formal-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/jongwony/epistemic-protocols/formal-review"><img src="https://agentmods.dev/badge/skills/jongwony/epistemic-protocols/formal-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00098 $0.03182
Opus 5 $0.00049 $0.01591
Sonnet 5 $0.00020 $0.00636
Haiku 4.5 $0.00010 $0.00318

Measured 3d ago against content hash 7868db865040, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

formal-review scanned grade A with 0 findings 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/formal-review/SKILL.md · 128 lines

How it starts

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

Formal Lens Review

A one-pass review of a PR diff through a fixed formal lens panel — Category Theory ∥ Type Theory ∥ Operational Semantics — posted back to the PR as a single consolidated comment for human reviewers. The panel is pinned at definition time rather than derived from the diff, so a formally-structured protocol change gets a meticulous, complete formal review on the same three axes every run.

Why this is a project skill

The formal triple (morphism coherence, type soundness, evaluation-order consistency) is this repository's standing review axis — protocol SKILL.md files carry category-theoretic formal blocks, TYPES / PHASE TRANSITIONS, and operational-semantics state machines. /frame, run generically, is unlikely to select all three formal lenses at once on a given diff; pinning them here guarantees the formal partial review is exhaustive every run. The fixed panel is therefore project-specific and belongs in the project skill layer. This skill is self-contained — it composes /frame and describes its own isolated-then-adversarial substrate; prothesis is its one plugin dependency.

Caller Signature

/formal-review [scope?]

scope : PR number | (implicit)                       -- optional; PR number, or implicit current-branch PR / working-tree detection
                                                     --   absent → Phase 0 detects it

When scope is omitted, Phase 0 detects it (current-branch PR, else working tree). The lens panel is fixed in this skill — Category Theory, Type Theory, Operational Semantics — and is not a runtime parameter; the scope is the only argument.

Pipeline Overview

/formal-review [scope?]
  Phase 0  : scope detect (PR number | current-branch PR | working tree) + free-exit — no SHA pinning, tools fetch live
  Phase 1  : diff prep   — fetch diff live (gh pr diff {N} | git diff HEAD); read file fate (A/M/D/R) from diff headers; state diff-reading conventions
  Phase 2  : fixed-lens review (isolated → adversarial) — pin the formal triple (Category Theory ∥ Type Theory ∥ OpSem) via /frame; substrate described in-skill (not /conduct)
              2a isolated per-lens analysis (independence) — each finding: file:line + lens tag + severity + evidence-grounded rationale, confidence ≥ 80%
              2b adversarial cross-verification — refute each finding; survive → Phase 3, defeated → recorded in the Phase 4 comment as refuted (relay drop w/ basis)
  Phase 3  : direction-error guard (verify) — cross-check review text vs diff-header fate; Added-but-described-as-deleted → warning augment (relay)
  Phase 4  : post comment  — one consolidated PR comment carrying every finding (path:line in text); substrate write → harness permission
  free-exit : user may end the review at any time (declared once in Phase 0)

Read the full file on GitHub · 128 lines

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. 3d ago Changed 7868db865040
  2. 4d ago Changed · -5 lines · -4 tokens per session e3b40c5af512
  3. 5d ago Changed · -1 lines 547e33c0b221
  4. 10d ago First seen · 134 lines · 102 tokens per session scan A 972a67a642c0

Subscribe to this mod's changes

formal-review is a skill published in the GitHub repository jongwony/epistemic-protocols (161 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 3,182 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.