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/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-positionnpx skills add chainstacklabs/polymarket-alpha-bot --skill alphapoly-exit-positiongit clone --depth 1 https://github.com/chainstacklabs/polymarket-alpha-botWrote 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/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position)<a href="https://agentmods.dev/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position"><img src="https://agentmods.dev/badge/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position.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.00078 | $0.00710 |
| Opus 5 | $0.00039 | $0.00355 |
| Sonnet 5 | $0.00016 | $0.00142 |
| Haiku 4.5 | $0.00008 | $0.00071 |
Grade A, and why
Exiting an Alphapoly Position 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 4d 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 — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Exiting an Alphapoly Position
Prerequisites
- Backend running on
http://localhost:8000 - Wallet unlocked (action endpoints return HTTP 401 if not)
Flow
- List positions —
GET /positions(or?state=activeto filter) - Pick a position — note the
position_id - Choose action based on state:
| Situation | Action |
|---|---|
| Fully close a position | Exit — orchestrated merge + sell (preferred) |
| Sell one specific side | Sell — token_type: "wanted" |
| Clear failed entry leftovers | Sell — token_type: "unwanted" |
| Market resolved, hold both outcomes | Merge |
State is pending |
Retry |
- Confirm — require explicit user approval before executing any sell or merge
- Execute — see quick reference below
- Verify — re-fetch position; full exit shows
state: "complete"
Quick Reference
# Fully exit (orchestrated merge + sell) — preferred
POST /positions/{id}/exit
{"slippage": 10}
# Sell a side
POST /positions/{id}/sell
{"side": "target", "token_type": "wanted"}
# Merge resolved pair
POST /positions/{id}/merge
{"side": "target"}
# Retry pending
POST /positions/{id}/retry
# Check result
GET /positions/{id}
token_type Explained
When entering, the system splits pUSD into YES+NO tokens and sells the side you don't want via CLOB to recover partial cost.
"wanted"— the token you hold as your position (normal exit)"unwanted"— residual from a failed or partial entry sell (cleanup)
Typical Exit Flow
GET /positions # find position_id
POST /positions/{id}/sell # {"side":"target","token_type":"wanted"}
POST /positions/{id}/sell # {"side":"cover","token_type":"wanted"}
GET /positions/{id} # confirm state == "complete"
If unwanted balances remain after entry: POST /positions/{id}/retry
If market resolved and holding both outcomes:
POST /positions/{id}/merge # {"side":"target"}
POST /positions/{id}/merge # {"side":"cover"}
What ships with it
1 file 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.
- 4d ago First seen · 87 lines · 78 tokens per session scan A 3f67b20ce210
Exiting an Alphapoly Position is a skill published in the GitHub repository chainstacklabs/polymarket-alpha-bot (174 stars, last pushed 29d ago), licensed Apache-2.0. It adds 78 tokens to every session and 710 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.
Other skills, from other repositories
polymarket-profile
Polymarket address profiler — input any 0x address, get a complete trading profile with PnL, win rate, positions, category breakdown, and top trades. All data from public APIs, no local database needed.
polymarket
Trade on Polymarket prediction markets (CLOB V2) from a Privy EOA wallet. Search markets, place/cancel orders, manage positions. No private key handling. Use when the user wants to bet on event outcomes (e.g. "buy YES at 0.65 on the ceasefire market", "what are my open positions", "close my Trump bet").
polymarket-plugin
Trade prediction markets on Polymarket - buy outcome tokens (YES/NO and categorical markets), check positions, list markets, manage orders, redeem winning tokens, and deposit funds on Polygon. Trigger phrases: buy polymarket shares, sell polymarket position, check my polymarket positions, list polymarket markets, get…
polymarket
Query Polymarket: markets, prices, orderbooks, history.
hyperliquid
Use when backtesting, deploying, funding, or debugging a live trading strategy on Hyperliquid through the Superior Trade API — writing Freqtrade configs and strategy code, running backtest sweeps, checking wallet balances, depositing USDC, trading HIP-3 stock/commodity perps, or diagnosing a deployment that will not…
basis-arb
Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Long-perp leg only — pure two-leg basis arb requires a paired spot short (or long) which Freqtrade can't run cleanly. The strategy below captures the…