Borrowing it
Nothing to install: this file belongs to crp4222/pmq. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/crp4222/pmq/main/AGENTS.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/agents-md)<a href="https://agentmods.dev/instructions/crp4222/pmq/agents-md"><img src="https://agentmods.dev/badge/instructions/crp4222/pmq/agents-md/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.
<a href="https://agentmods.dev/instructions/crp4222/pmq/agents-md"><img src="https://agentmods.dev/badge/instructions/crp4222/pmq/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.00689 | $0.00689 |
| Opus 5.5 | $0.00276 | $0.00276 |
| Sonnet 5.5 | $0.00138 | $0.00138 |
| Haiku 4.5 | $0.00069 | $0.00069 |
Grade A, and why
pmq AGENTS.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 2mo 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 — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working with pmq (agent instructions)
pmq is a small Python library for Polymarket CLOB V2 with two layers, plus
an MCP server (pmq-mcp) exposing both to any MCP client; its trading
tools exist only when the operator sets PMQ_MCP_LIVE=1 (live) or
PMQ_MCP_PAPER=1 (fills simulated against the real live books, keyless,
nothing reaches the exchange, wins over live), capped per order
(PMQ_MCP_MAX_USD) and per UTC day (PMQ_MCP_DAILY_USD).
Data layer (no credentials, safe anywhere)
import pmq
m = pmq.parse_market(pmq.get_market(slug)) # condition id + token ids
book = pmq.get_book(m["token_a"]) # REAL TIME, trade off this
bid, bid_sz, ask, ask_sz = pmq.best_bid_ask(book)
pmq.fee(price, shares) # taker $, crypto rate 0.07
Never make live decisions from get_tape (data-api): it lags matching by 1
to 3 minutes. It is for offline scoring at least 5 minutes after close.
Execution layer (needs POLY_PRIVATE_KEY; treat as production)
Rules an agent MUST follow:
- Default to reading data, not trading. Only place orders when the user explicitly asked for live execution in this session.
- Book only
fill.matched_sharesandfill.matched_usd. A falsyFillmeans nothing happened, whatever the request was. - Wrap every order in
try/except OrderUncertain; on that exception callexecutor.reconcile(condition_id)and do not place new orders on that market until it returns. - Call
executor.require_collateral(stake)before a session of trading. If it reports 0 while the user says the account is funded, the signature_type is wrong: the Polymarket app's default wallet needssignature_type=3(deposit wallet). - Budget with fees: a share at price p costs
p + pmq.fee(p, 1). - Never print or log POLY_PRIVATE_KEY or any environment secret. Addresses and builder codes are public; keys are not.
- FAK buys spend dollars (
buy_fak(token, price_cap, usd)), FAK sells spend shares. Amounts are rounded down internally to exchange accuracy. - Builder attribution: the library defaults to the maintainer's
zero-commission builder code. Respect the user's choice if they set
builder_code=Noneor their own code; do not change it silently. - Shared wallets: when several senders trade one wallet, each configures
its own append-only registry (
POLY_ORDER_LOG) and lists the others inPOLY_FOREIGN_ORDER_LOGS(colon-separated).trades_totals()then counts only OUR orders, andreconcile()claims trades unknown to every registry (post-uncertainty recovery). Sound only if every sender keeps a registry; withoutPOLY_ORDER_LOGbehavior is unchanged.
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.
- 2mo ago First seen · 52 lines · 689 tokens per session scan A 004a69eee867
pmq AGENTS.md is an instructions file published in the GitHub repository crp4222/pmq (0 stars, last pushed 3mo ago), licensed MIT. It adds 689 tokens to every session, about $0.0028 per session on Opus 5.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.
pmq AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pmq AGENTS.mdcrp4222/pmq | Instructions file | 0 | 3mo ago | MIT | A | 689 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,649 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |