polymarket-trading

polymarket-trading is a skill for Claude Code, Codex from BlockRunAI/ClawRouter. It costs 76 tokens per session (1,538 once invoked), scanned A, original, MIT.

A tool for placing, managing, and redeeming real-money bets on Polymarket, a prediction market where people trade contracts on future events.

In plain words
What is it for?
Use it when an agent needs to buy or sell Polymarket positions, check positions, redeem winnings, or handle access restrictions by location.
Why use it?
It handles the setup and transaction flow needed to trade, including wallet funding, approvals, selling positions, and collecting winnings.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; built for openclaw.

Good fit Use it when an agent needs to buy or sell Polymarket positions, check positions, redeem winnings, or handle access restrictions by location.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blockrunai/clawrouter/polymarket-trading
About the project

ClawRouter is a local service that chooses among language models for each request and handles payment for their use. Autonomous agents use it to access multiple LLM providers through one routing and billing system.

BlockRunAI/ClawRouter · 6,579 stars · on GitHub · npmjs.com

Install

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.

Any agent
npx skills add BlockRunAI/ClawRouter --skill polymarket-trading
Clone the repo
git clone --depth 1 https://github.com/BlockRunAI/ClawRouter

Made for: Claude Code, Codex.

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 polymarket-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/blockrunai/clawrouter/polymarket-trading.svg)](https://agentmods.dev/skills/blockrunai/clawrouter/polymarket-trading)
Your own site
<a href="https://agentmods.dev/skills/blockrunai/clawrouter/polymarket-trading"><img src="https://agentmods.dev/badge/skills/blockrunai/clawrouter/polymarket-trading.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,538 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.00076 $0.01538
Opus 5 $0.00038 $0.00769
Sonnet 5 $0.00015 $0.00308
Haiku 4.5 $0.00008 $0.00154

Measured 8d ago against content hash 973fb1744ac5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

polymarket-trading 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 8d 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.

skills/polymarket-trading/SKILL.md · 111 lines

How it starts

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

Polymarket Trading (blockrun_polymarket)

Real-money trading on Polymarket's CLOB V2 (Polygon), signed locally by the user's ClawRouter wallet key. Data discovery stays on the blockrun_predexon_* toolsblockrun_polymarket only trades.

Mental model

  • Signer = the ClawRouter wallet key (~/.openclaw/blockrun/wallet.key, or BLOCKRUN_WALLET_KEY) — the SAME wallet that pays for LLM calls. Never leaves the machine.
  • Deposit wallet = a Polygon vault contract derived from that key (POLY_1271). It holds the betting funds in pUSD and only honors the signer's EIP-712 signatures. Deploy/approve/redeem are gasless (relayer).
  • Money separation: bets spend pUSD on Polygon; x402 API fees spend USDC on Base — but both come from the ONE ClawRouter wallet. The x402 budget ledger does NOT cover bets — confirm:true + caps do.
  • Zero setup: no Polymarket account, no API keys, no gas token. On first setup ClawRouter bootstraps a builder key from the user's OWN wallet, then derives + deploys the vault (all gasless). Geoblock is handled by default — CLOB traffic routes through BlockRun's Tokyo egress out of the box.

Golden rules for agents

  1. Never pass confirm:true unless the user explicitly approved that exact trade. Call once WITHOUT confirm → show the dry-run preview → ask → re-call with confirm:true.
  2. Per-order cap POLYMARKET_MAX_BET_USD (default $25) and optional session cap are enforced locally; don't try to split orders to sneak past them.
  3. On ANY error, read the message — it says exactly what to do next (fund, approve, region, re-run setup). Don't retry blindly.

End-to-end flow

# 0. No Polymarket account or API keys needed — ClawRouter bootstraps everything
#    from the user's own wallet on first setup. (Set POLYMARKET_CLOB_HOST to a
#    permitted-region egress only if the user is in a geoblocked region.)

# 1. Provision + inspect (idempotent, safe to re-run any time)
blockrun_polymarket action:"setup"
# → deposit wallet address + funding instructions + region status

# 2. Fund the vault from the user's Base USDC — gasless x402, one call ($0.01 fee,
#    non-custodial). pUSD credit is ASYNC (minutes) — re-run setup to watch it. Min $2.
blockrun_polymarket action:"fund" amount_usd:5             # dry-run preview
blockrun_polymarket action:"fund" amount_usd:5 confirm:true

# 3. Sign the one-time gasless approval batch (after user consent)
blockrun_polymarket action:"setup" confirm:true

# 4. Find a market + token (data tool, paid data)
blockrun_predexon_markets ...   # → clobTokenIds, conditionId (Polymarket /v1/pm data)

# 5. Preview, then place
blockrun_polymarket action:"buy" token_id:"..." amount_usd:2            # dry-run
blockrun_polymarket action:"buy" token_id:"..." amount_usd:2 confirm:true  # market FOK
#   or limit: price:0.45 size:10 (GTC; order_type:"GTD" + expires_at for expiry)
#   or via condition: condition_id:"0x..." outcome:"Yes"

# 6. Manage
blockrun_polymarket action:"orders"                     # open orders
blockrun_polymarket action:"cancel" order_id:"..."      # or all:true
blockrun_polymarket action:"positions"                  # holdings + PnL + redeemable

# 7. Claim winnings after resolution (gasless)
blockrun_polymarket action:"redeem" condition_id:"0x..."             # preview
blockrun_polymarket action:"redeem" condition_id:"0x..." confirm:true

# 8. Cash out — pUSD → native USDC on Base, back to the user's agent wallet
blockrun_polymarket action:"withdraw"                                # dry-run (full balance)
blockrun_polymarket action:"withdraw" confirm:true                   # (partial: amount_usd:5)

Read the full file on GitHub · 111 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. 8d ago First seen · 111 lines · 76 tokens per session scan A 973fb1744ac5

Subscribe to this mod's changes

polymarket-trading is a skill published in the GitHub repository BlockRunAI/ClawRouter (6,579 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 1,538 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-30.

Related

Other skills, from other repositories

finance-expert

Expert-level financial systems, FinTech, banking, payments, and financial technology. Use when the user mentions fintech, banking, payments, trading, or accounting, or when the task involves Financial Systems, FinTech Stack, Key Challenges, or Data Handling.

personamanagmentlayer/pcl · 55 tokens

insurance-expert

Expert-level insurance systems, underwriting, claims processing, actuarial analysis, risk assessment, and insurtech solutions. Use when the user mentions underwriting, claims, actuarial, risk, or insurtech, or when the task involves Insurance Systems, Insurance Types, Standards and Regulations, or Claims Processing.

personamanagmentlayer/pcl · 65 tokens

trading-expert

Expert-level algorithmic trading, market systems, quantitative analysis, and trading platforms. Use when the user mentions algorithmic trading, quant, markets, finance, or high-frequency trading, or when the task involves Trading Systems, Market Data, or Execution.

personamanagmentlayer/pcl · 55 tokens

blockchain-expert

Expert-level blockchain, Web3, smart contracts, DeFi, and cryptocurrency development. Use when the user mentions Web3, smart contracts, DeFi, Ethereum, or Solidity, or when the task involves Blockchain Fundamentals, Web3 & DeFi, Smart Contract Security, or Gas Optimization.

personamanagmentlayer/pcl · 63 tokens

accountant-expert

Expert-level accounting, tax, financial reporting, and accounting systems. Use when the user mentions accounting, tax, financial reporting, GAAP, or IFRS, or when the task involves Accounting Principles, Financial Statements, Tax & Compliance, or Accounting Systems.

personamanagmentlayer/pcl · 56 tokens

finops-expert

Expert-level cloud financial operations, cost optimization, and cloud economics. Use when the user mentions cloud cost, optimization, cloud economics, or AWS cost, or when the task involves FinOps Fundamentals, Cost Management, FinOps Practices, or Cost Visibility.

personamanagmentlayer/pcl · 55 tokens