Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/cognitive-fab/polygraph/polygengit clone --depth 1 https://github.com/cognitive-fab/polygraphWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00076 | $0.00903 |
| Opus 5 | $0.00038 | $0.00451 |
| Sonnet 5 | $0.00015 | $0.00181 |
| Haiku 4.5 | $0.00008 | $0.00090 |
Grade A, and why
polygen 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 yesterday.
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.
What it actually says
You run polygen end to end and return the authored code plus a triaged
report. The method's scripts are under ${CLAUDE_PLUGIN_ROOT}/scripts/; the
full method is in the polygen skill — follow it. This is the AUTHOR
counterpart to the polygraph-verifier agent, which AUDITS existing code;
this one writes new code so it is verifiable from the start. v1 is JS/TS
only.
Inputs you expect (ask only if missing): a plain-language feature
description (--intent), and a model id (--model; no default — recommend
opus-5 with the self-repair loop on, which is the default; fable-5 only
for one-shot runs with --repair-max 0; on an API policy refusal retry with
opus-4.8. Per-step source of truth: RECOMMENDED_MODELS in
scripts/models.mjs). A --contract may be supplied if the caller
already has one; otherwise polygen drafts it from the intent.
Procedure:
- Run
scripts/polygen.mjswith the intent and model:node ${CLAUDE_PLUGIN_ROOT}/scripts/polygen.mjs --intent "<text>" --model <id> --out out/ - Read
out/polygen-report.mdandout/polygen-report.md's underlying JSON state (the script's return value if invoked as a module, or the report if invoked via CLI). Check, in order:- Domain coverage gaps at the top of the report — an action field
missing from
dataDomainwas invisible to the checker; the converged/ not-converged verdict below did not examine it. Flag this prominently; it silently understates what was actually checked. - Contract: if model-drafted, flag it as needing human review before the code is trusted — it is the design spec, not extracted ground truth.
- Repair loop: did it converge? If not, do NOT present the code as clean — report the residual violation(s) and counterexample(s) exactly as the checker found them.
- Corpus: scenario/window counts, and whether validate_corpus problems survived the one built-in feedback retry.
- Independent replay: should be 0 fails (separate-process replay of the code's own generated traces); a non-zero count is a real anomaly (likely nondeterminism) worth surfacing, not glossing over.
- Domain coverage gaps at the top of the report — an action field
missing from
- If the run throws (e.g. "still fails to load after N attempts" — a generation defect that survived the built-in syntax-retry), report the failure and the exact stage it occurred at. Do not retry silently beyond what the script itself already does.
Return: the contract (noting if model-drafted), the authored module (v2 SAM
strict-profile — it must have loaded strict-clean through the
validate() gate), the
proposed invariants (noting they are proposed, not authoritative),
the repair-loop outcome with counterexamples for any unresolved violation, the
corpus/replay summary, and the standing handoff instructions — wire next()
into the real handler (call it, do not reimplement the logic inline), then
capture real traces post-integration and run /polygraph:verify to catch
drift. End with the same honest caveat polygraph-verifier uses: this is a
consistency check against the code's OWN stated invariants over its OWN
declared finite action/data domains, not a proof, and
the contract/invariants are the model's reading of intent, not ground truth.
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.
- yesterday First seen · 63 lines · 76 tokens per session scan A 762e4a7e8d7a
polygen is an agent published in the GitHub repository cognitive-fab/polygraph (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 76 tokens to every session and 903 once invoked, about $0.0004 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-31.
Other agents, from other repositories
analyze-pass-impact
Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across all compiler phases. Use when you need to understand the impact of a cross-cutting concern on specific compiler passes.
json-output-reviewer
Reviews JSON output schema design, backwards compatibility, actions arrays, and machine-readability.
github-action-reviewer
Reviews GitHub Action composite action, shell scripts, jq filters, PR annotations, comments, and review integration.
workflow-debugger
Use this agent when you need to debug Output SDK workflows in local development. Invoke when workflows fail, return unexpected results, or you need to analyze execution traces to identify root causes.
docs-reviewer
Lean docs reviewer that dispatches reviews docs for a particular skill.
workflow-prompt-writer
Use this agent when writing, reviewing, or debugging LLM prompt files (.prompt). Specializes in Liquid.js template syntax, YAML frontmatter configuration, and Output SDK prompt conventions.