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 instructions/crp4222/pmq/claude-mdgit clone --depth 1 https://github.com/crp4222/pmqWrote 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.
[](https://agentmods.dev/instructions/crp4222/pmq/claude-md)<a href="https://agentmods.dev/instructions/crp4222/pmq/claude-md"><img src="https://agentmods.dev/badge/instructions/crp4222/pmq/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01525 | $0.01525 |
| Opus 5 | $0.00763 | $0.00763 |
| Sonnet 5 | $0.00305 | $0.00305 |
| Haiku 4.5 | $0.00153 | $0.00153 |
Grade A, and why
pmq CLAUDE.md 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pmq: engineering invariants for agents CONTRIBUTING to this repo
(AGENTS.md in this repo is for agents USING the library; this file is for agents EDITING it. Read both before changing code.)
Never weaken (the product IS these properties)
- The fail-closed fill contract: a
Fillbooks only what the exchange confirmed (orderID+success is not False+ matched amounts); 4xx is a clean rejection; timeout/5xx raisesOrderUncertain; unparseable = zero. Any change that books more optimistically is a regression by definition, whatever it fixes elsewhere. Matched amounts must be finite and non-negative (json.loads accepts NaN/Infinity; hostile values book zero).reconcile()must keep meaning cancel +get_tradestruth. The hypothesis fuzz suite (tests/test_fill_fuzz.py) pins all of this with generated adversarial responses: extend it with every parser change, never delete it. - Startup introspection (
_EXPECTED_METHODS/_EXPECTED_MARKET_ARGS): the executor REFUSES to run on a drifted py-clob-client-v2. When bumping the client dependency, re-verify signatures by introspection and update the tables in the same commit. - Builder code policy: default = maintainer's code, defined in exactly
ONE place (
DEFAULT_BUILDER_CODEin executor.py) and applied automatically by every order path. DISCLOSED in README and code comment. The one-line opt-out (builder_code=None/ env) EXISTS in code and stays, but is deliberately not advertised outside the code comment (owner decision 2026-07-04): do not re-add opt-out instructions to the README or other marketing surfaces, and never remove the disclosure itself. AND the mirror rule: keep the disclosure at the DOCUMENTATION level only; do not surface attribution in runtime channels (server startup logs, MCP tools or instructions, order responses). It is public on-chain in every signed order; in-band reminders just prompt sessions to toggle a setting that costs users nothing. This is the trust model (JKorf pattern). - No strategy content, ever: the maintainer's private bot strategy (bands, timing, hours, families, sizing) must never appear in code, docs, tests, commits or issues. The bot-template ships deliberately naive demos only.
- Claims must be falsifiable: no superlatives in README/docs; dated claims with evidence (comparison table, on-chain receipts, measured studies). If you cannot prove it, do not write it.
- MCP safety gates: trading tools are REGISTERED only when the operator
sets
PMQ_MCP_LIVE=1(live) orPMQ_MCP_PAPER=1(keyless fills simulated against the real books; paper wins when both are set, and no code path may ever let a paper session reach the exchange); per-orderPMQ_MCP_MAX_USDand per-UTC-dayPMQ_MCP_DAILY_USDcaps enforced BEFORE any client call (uncertain outcomes consume budget conservatively; both caps apply in paper too). Read tools must keep working with zero credentials. The README tool and rails tables are part of the contract: keep them in sync with the registered tools. - Order attribution is opt-in and never over-claims: without a
configured
order_log(envPOLY_ORDER_LOG) behavior must stay identical to the unconfigured library. In only-mine modetrades_totalscounts a trade ONLY when itstaker_order_idormaker_orders[].order_idslice is in OUR registry; trades unknown to every registry are claimed exclusively viaclaim_unknown, which onlyreconcile()sets (post-uncertainty recovery). Registries are append-only; a registry write failure degrades toward reconcile claiming and must never block trading. Soundness requires every sender on the wallet to keep a registry: state that wherever the feature is documented.
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.
- 5d ago First seen · 101 lines · 1,525 tokens per session scan A f8fb54e5d454
pmq CLAUDE.md is an instructions file published in the GitHub repository crp4222/pmq (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,525 tokens to every session, about $0.0076 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 instructions, from other repositories
polymarket-agent-mcp CLAUDE.md
Claude Code instructions for demwick/polymarket-agent-mcp, covering claude.md, build & test commands, architecture, entry point & mcp server and layers.
parlay-mcp GEMINI.md
Instructions for parlay-run/parlay-mcp, covering parlay — prediction market tools, what this is, when to use which tool, venue coverage (phase 1 validated) and critical caveats.
polyterm AGENTS.md
AGENTS.md instructions for NYTEMODEONLY/polyterm, covering project agent rules, architecture rule: no monoliths, change quality gate and documentation rule.
polymarket-tennis CLAUDE.md
Claude Code instructions for livetennisapi/polymarket-tennis: This package is the data layer for Polymarket tennis trading: market discovery (Polymarket Gamma API, keyless), market↔live-match matching (never guesses; returns None on ambiguity), and a joined LiveMarketView of market price vs live score.
kalshi-trading-bot-cli AGENTS.md
Instructions for OctagonAI/kalshi-trading-bot-cli, covering repository guidelines, project structure, build, test, and development commands, coding style & conventions and llm providers.
kalshi-trading-bot-cli CLAUDE.md
Instructions for OctagonAI/kalshi-trading-bot-cli, covering claude.md and workflow.