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 skills/starrycod/cogitum/polymarketnpx skills add StarryCod/cogitum --skill polymarketgit clone --depth 1 https://github.com/StarryCod/cogitumWrote 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/skills/starrycod/cogitum/polymarket)<a href="https://agentmods.dev/skills/starrycod/cogitum/polymarket"><img src="https://agentmods.dev/badge/skills/starrycod/cogitum/polymarket.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 | $0.00018 | $0.00743 |
| Opus 5 | $0.00009 | $0.00371 |
| Sonnet 5 | $0.00004 | $0.00149 |
| Haiku 4.5 | $0.00002 | $0.00074 |
Grade A, and why
polymarket 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
See `references/api-endpoints.md` for the full endpoint reference with curl examples. This is a copy
97% identical to polymarket — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Polymarket — Prediction Market Data
Query prediction market data from Polymarket using their public REST APIs. All endpoints are read-only and require zero authentication.
See references/api-endpoints.md for the full endpoint reference with curl examples.
When to Use
- User asks about prediction markets, betting odds, or event probabilities
- User wants to know "what are the odds of X happening?"
- User asks about Polymarket specifically
- User wants market prices, orderbook data, or price history
- User asks to monitor or track prediction market movements
Key Concepts
- Events contain one or more Markets (1:many relationship)
- Markets are binary outcomes with Yes/No prices between 0.00 and 1.00
- Prices ARE probabilities: price 0.65 means the market thinks 65% likely
outcomePricesfield: JSON-encoded array like["0.80", "0.20"]clobTokenIdsfield: JSON-encoded array of two token IDs [Yes, No] for price/book queriesconditionIdfield: hex string used for price history queries- Volume is in USDC (US dollars)
Three Public APIs
- Gamma API at
gamma-api.polymarket.com— Discovery, search, browsing - CLOB API at
clob.polymarket.com— Real-time prices, orderbooks, history - Data API at
data-api.polymarket.com— Trades, open interest
Typical Workflow
When a user asks about prediction market odds:
- Search using the Gamma API public-search endpoint with their query
- Parse the response — extract events and their nested markets
- Present market question, current prices as percentages, and volume
- Deep dive if asked — use clobTokenIds for orderbook, conditionId for history
Presenting Results
Format prices as percentages for readability:
- outcomePrices
["0.652", "0.348"]becomes "Yes: 65.2%, No: 34.8%" - Always show the market question and probability
- Include volume when available
Example: "Will X happen?" — 65.2% Yes ($1.2M volume)
Parsing Double-Encoded Fields
The Gamma API returns outcomePrices, outcomes, and clobTokenIds as JSON strings
inside JSON responses (double-encoded). When processing with Python, parse them with
json.loads(market['outcomePrices']) to get the actual array.
What ships with it
2 files 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.
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 · 78 lines · 18 tokens per session scan A 3e6177a7775a
polymarket is a skill published in the GitHub repository StarryCod/cogitum (11 stars, last pushed 3mo ago), licensed MIT. It adds 18 tokens to every session and 743 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 97% identical to polymarket, differing in 3 lines, and is treated as a copy.
Other skills, from other repositories
polymarket
Query Polymarket: markets, prices, orderbooks, history.
polymarket
Query Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.
polymarket
Query Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.
polymarket
Query Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.
polymarket
Query Polymarket: markets, prices, orderbooks, history.
polymarket
Query Polymarket: markets, prices, orderbooks, history.