monitor-polymarket
Monitor Polymarket and/or Kalshi prediction markets for 24h price moves, volume changes, fresh comments, and high-conviction alerts
git clone --depth 1 https://github.com/aeonfun/aeon /tmp/monitor-polymarket && cp -r /tmp/monitor-polymarket/skills/monitor-polymarket ~/.claude/skills/monitor-polymarketSKILL.md
> **${var}** — Platform selector with an optional single-market override:
> - **empty** (`""`) — run **both** platforms from their watchlists.
> - `polymarket` — run Polymarket's whole watchlist (`skills/monitor-polymarket/watchlist-polymarket.md`).
> - `kalshi` — run Kalshi's whole watchlist (`skills/monitor-polymarket/watchlist-kalshi.md`).
> - `polymarket:<event-slug>` — one ad-hoc Polymarket event (e.g. `polymarket:us-x-iran-ceasefire-by`).
> - `kalshi:<event-ticker>` — one ad-hoc Kalshi event (e.g. `kalshi:KXGDP-26Q2`).
Read `memory/MEMORY.md` for context.
Read the last 2 days of `memory/logs/` to compare against previous readings and flag *new* movers (not repeats of yesterday's news).
## Why this skill exists
A table of prices isn't useful. An operator reading this notification wants to answer: **"is there a market worth forming a view on right now, and why?"** Every rule below exists to push output toward that question — suppress noise, rank by decision value, and demand one line of reasoning per alert. This skill covers two venues — **Polymarket** (crypto-native, CLOB + comments) and **Kalshi** (regulated, liquidity-weighted signals) — and dispatches to the branch(es) the selector asks for.
## Dispatch
Parse `${var}` into a platform choice and an optional single-market override, then run the matching branch(es).
```bash
PLATFORM="both" # both | polymarket | kalshi
SINGLE="" # optional single event slug (Polymarket) or ticker (Kalshi)
case "${var}" in
"") PLATFORM="both" ;;
polymarket) PLATFORM="polymarket" ;;
kalshi) PLATFORM="kalshi" ;;
polymarket:*) PLATFORM="polymarket"; SINGLE="${var#polymarket:}" ;;
kalshi:*) PLATFORM="kalshi"; SINGLE="${var#kalshi:}" ;;
*) # unrecognised prefix — don't guess a venue; fall back to both watchlists
PLATFORM="both"; SINGLE=""
echo "unrecognised selector '${var}' — running both watchlists" ;;
esac
```
- `PLATFORM=both` → run the **Polymarket branch** and the **Kalshi branch**, each from its own watchlist, then emit a combined notification.
- `PLATFORM=polymarket` → run only the Polymarket branch (whole watchlist, or `SINGLE` if set).
- `PLATFORM=kalshi` → run only the Kalshi branch (whole watchlist, or `SINGLE` if set).
Each branch below is independently executable — skip the one(s) the selector didn't ask for.
---
# Polymarket branch
Data source: Polymarket **gamma-api** (events, comments) + **clob** (price history). All endpoints are **public — no auth**.
Watchlist: `skills/monitor-polymarket/watchlist-polymarket.md`. Each line is an event slug; add or remove slugs to change what's monitored.
## P1. Load watchlist
```bash
if [ -n "$SINGLE" ]; then
SLUGS="$SINGLE"
else
# One slug per line, skip comments and blanks
SLUGS=$(grep -v '^#' skills/monitor-polymarket/watchlist-polymarket.md | grep -v '^$')
fi
```
If the watchlist is empty and no single slug was given, there's nothing to do on Polymarket — note it and move on (don't fabricate a report).
## P2. For each event, fetch markets and price history
For each event slug in `$SLUGS`:
**a) Get the event and its markets:**
```bash
curl -s "https://gamma-api.polymarket.com/events?slug=$SLUG&limit=1"
```
The response contains the event `id`, `title`, and a `markets` array. Each market has:
- `id`, `question`, `slug`, `closed`
- `outcomePrices` — JSON array, index 0 = YES price (0.0–1.0)
- `volume24hr`, `volumeNum`, `liquidityNum`
- `clobTokenIds` — JSON array, index 0 = YES token, index 1 = NO token
**Skip closed markets** — they've already resolved.
**b) Get 24h price history for each open market:**
```bash
# YES token is index 0 of clobTokenIds
TOKEN_ID=$(echo "$CLOB_TOKEN_IDS" | python3 -c "import json,sys; print(json.loads(sys.stdin.read())[0])")
curl -s "https://clob.polymarket.com/prices-history?market=$TOKEN_ID&interval=1d&fidelity=60"
```
Response: `{ "history": [{ "t": unix_timestamp, "p": "price_string" }, ...] }`
**c) Calculate 24h stats for each market:**
- **Open / Close** — first and last price in the history
- **Change** — close minus open, in percentage points (e.g. +4.0pp)
- **High / Low** — intraday range
- **Volume** — `volume24hr` from the market data
- **Direction** — classify as: surging (>+5pp), rising (+2 to +5pp), stable (−2 to +2pp), falling (−5 to −2pp), crashing (<−5pp)
## P3. Fetch comments
For each event, get top comments and latest comments:
```bash
EVENT_ID=... # from step P2a
# Top comments by reactions
curl -s "https://gamma-api.polymarket.com/comments?parent_entity_type=Event&parent_entity_id=$EVENT_ID&limit=10&order=reactionCount&ascending=false"
# Latest comments (last 24h chatter)
curl -s "https://gamma-api.polymarket.com/comments?parent_entity_type=Event&parent_entity_id=$EVENT_ID&limit=10&order=createdAt&ascending=false"
```
**Important:** `parent_entity_type` must be `Event` (capital E).
Each comment has: `body`, `profile.username` (often null → use "anon"), `reactionCount`, `createdAt`.
From the combined results, pick the **3 most interesting comments** per event:
- New comments from the last 24h get priority (they react to recent moves)
- High-reaction comments that are still relevant
- Contrarian takes, insider-sounding analysis, whale callouts, humor
## P4. Build the Polymarket report
For each event, produce a summary block:
```
**[Event Title]** (event_id: N)
| Market | YES | 24h Chg | High/Low | 24h Vol |
|--------|-----|---------|----------|---------|
| [question] | XX.X% | +X.Xpp ▲ | XX–XX% | $X.Xm |
| [question] | XX.X% | -X.Xpp ▼ | XX–XX% | $X.Xm |
...
Biggest mover: "[question]" — [direction] from X% to Y%
Comments:
- [user/anon]: "[comment excerpt]" (X upvotes)
- [user/anon]: "[comment excerpt]"
- [user/anon]: "[comment excerpt]"
```
Flag any market that moved more than **5 percentage points** in 24h — these are the ones worth paying attention to.
## P5. Polymarket Network note
`curl` works — there is no networSet up and run an Aeon agent instance — get started from scratch, pick which skills to turn on or install more from packs, reschedule or change what runs, edit what an existing skill does, fix a skill that isn't firing, set the STRATEGY.md north star and soul/ voice, turn a coding-agent chat into a scheduled Aeon skill, and mine past coding-agent conversations for recurring work worth automating as a skill. Use when the user mentions Aeon, aeon.yml, an Aeon skill / instance / routine / pack, asks to schedule, enable, edit, or debug an agent that runs on a cron, or asks what of their repeated/manual work Aeon could take over.
Mention/keyword sweep on social platforms for [REPLACE: KEYWORDS] — trends, sentiment, top posts
5 concrete real-life actions, leverage-scored against open loops with specificity and anti-fluff gates
Static config-correctness linter for this instance - catches the silent-failure class (unquoted schedules, duplicate keys, unconfigured skills, mode typos, broken requires/MCP refs) that no run-based health skill can see. Notifies only on problems.
Pull framework updates from the upstream Aeon repo into this instance - 3-way merges canon's new commits into a PR, never clobbering operator config.
Write a publication-ready article in one of three angles - a trending long-form piece, a watched-repo thesis, or a project-through-a-lens essay. Optional Replicate hero image with --visual.
Automatically merge open PRs that have passing CI, no blocking reviews, and no conflicts
Two-mode aeon.yml workflow builder - analyze inspects URLs and emits a tiered, signal-verified skill-enablement plan plus an aeon.yml diff; enable flips slugs to enabled:true and opens a PR.