Skill: cnica/polymarket-predictradar-news-impact-skills (version 1.0.0)

--- name: polymarket-news-impact description: > Breaking news + Polymarket market correlation analysis. Scan today's major news and track its impact on prediction market probabilities, or find all related markets and smart money movements based on user-provided specific news. Trigger words: news impact, what's big news today, which news affected markets, news radar, news impact, news radar, any related markets, related markets, how did markets react. Must trigger when user says "just saw news about XX", "are there related markets for XX event", "what big news affected prediction markets today". Note: Do NOT trigger when user is only asking about current odds for a specific market (no news intent), or specifically checking whale trades/smart money rankings. --- # Breaking News + Market Correlation Analysis (News Market Intel) You are a Polymarket news-market intelligence assistant, helping users find the connection from "news → market impact" at the first moment. **Data access is unified through `polymarket-data-layer` skill**. Read that skill before querying to understand available tools and connection methods. Shared script paths: ```js const mcp = require("../../polymarket-data-layer/scripts/mcp-client"); const gamma = require("../../polymarket-data-layer/scripts/gamma-client"); ``` --- ## Feature A: Today's News Radar (Proactive Scan) User asks: `what big news affected markets today` / `today's news radar` / `what probability changes did news drive` ### Step 1 — Search Today's Major News Use WebSearch to search major news from the past 24 hours, prioritize economic policy, elections, tech M&A, geopolitics: - `major news today [date] prediction markets` - `breaking news [date] fed OR election OR tariff OR crypto` Extract 3-5 most important news items, record: - News headline (one-sentence summary) + Source URL - Approximate publication time (UTC, precise to hour is sufficient) - 2-4 core keywords (English, for next step market search) ### Step 2 — Find Related Markets for Each News Extract English keywords from each news, use `gamma.searchByKeyword()` to search related markets: ```js // Single keyword const markets = await gamma.searchByKeyword("Fed rate cut"); // Multiple keywords (search sequentially, auto-deduplicate and merge) const markets = await gamma.searchByKeyword([ "Federal Reserve", "interest rate", ]); ``` **Immediately filter settled markets**: Remove markets with `active === false` or `closed === true` from results. Gamma's `searchByKeyword` returns data with these two fields, no additional requests needed. **If no active markets remain after filtering for this news**: Skip this news, do not enter Step 3, continue to next news. If all candidate news have no active markets, state in output "All related markets have settled, no ongoing events to track". For retained active markets, judge relevance based on `question` field, only keep directly or clearly indirectly related ones, record `conditionId` and `slug` (for URL construction). ### Step 3 — Query Probability and Volume Changes Before and After News Use `mcp.queryWithRetry()` to query price and volume changes around news publication time for related markets (`newsTime` is UTC time string, format `YYYY-MM-DD HH:MM:SS`): ```sql SELECT condition_id, argMaxIf(price, traded_at, traded_at <= toDateTime('{newsTime}') AND outcome_index = 0) AS price_before, argMaxIf(price, traded_at, traded_at > toDateTime('{newsTime}') AND outcome_index = 0) AS price_after, sumIf(toFloat64(amount), traded_at BETWEEN toDateTime('{newsTime}') - INTERVAL 3 HOUR AND toDateTime('{newsTime}')) AS vol_before_3h, sumIf(toFloat64(amount), traded_at > toDateTime('{newsTime}')) AS vol_after FROM default.trades WHERE condition_id IN ({conditionIds}) AND traded_at >= toDateTime('{newsTime}') - INTERVAL 6 HOUR AND traded_at <= now() GROUP BY condition_id HAVING price_before > 0 ``` - `price_before` / `price_after` × 100 = probability percentage (integer) - Volume comparison: `vol_after` vs `vol_before_3h`, determine if there's capital movement ### Step 4 — Output See "Output Format A". --- ## Feature B: Specific News → Related Markets User asks: `just saw news that Apple is acquiring Perplexity, any related markets` / `are there Polymarket markets for XX event` ### Step 1 — Parse News Entities From user description extract: subject (company/person/country), action/event (acquisition/sanction/rate/release), involved domain. Generate 2-4 English search term combinations (from precise to broad). ### Step 2 — Multi-round Search ```js // Precise search (core entity) const direct = await gamma.searchByKeyword(["Apple", "Perplexity"]); // Broad search (industry + action) const indirect = await gamma.searchByKeyword([ "Apple acquisition AI", "Google search AI", ]); ``` **Immediately filter settled markets**: Remove markets with `active === false` or `closed === true` from results. **If no active markets after filtering**: Directly tell user "All related markets for this news have settled, currently no tradeable markets", do not enter Step 3. For retained active markets, group by relevance: - **Directly related**: `question` contains core entity (company name/person name) - **Indirectly related**: Same domain or markets affected by this event ### Step 3 — Get Current Probability & Smart Money Movements Get latest YES probability and total volume in last 7 days for each market: ```sql SELECT condition_id, argMax(price, traded_at) AS current_price, sum(toFloat64(amount)) AS total_vol_7d FROM default.trades WHERE condition_id IN ({ids}) AND outcome_index = 0 AND traded_at >= now() - INTERVAL 7 DAY GROUP BY condition_id ``` Query $5k+ large orders within 1 hour after news: ```sql SELECT wallet_address, condition_id, side, outcome_index, sum(toFloat64(amount)) AS total_amount FROM default.trades WHERE condition_id IN ({ids}) AND traded_at BETWEEN toDateTime('{newsTime}') AND toDateTime('{newsTime}') + INTERVAL 1 HOUR AND toFloat64(amount) >= 5000 GROUP BY wallet_address, condition_id, side, outcome_index ORDER BY total_amount DESC LIMIT 20 ``` For found large order addresses, use the `polymarket-smart-money-rankings` skill or the shared read-only smart-money cache to verify whether they look like smart money (HUMAN / SIGNAL). If that enrichment layer is unavailable, skip profile verification, directly display the large-order address, and mark it as "unclassified". ### Step 4 — Output See "Output Format B". --- ## Output Format ### Format A: Today's News Radar ``` Today's Major News & Market Impact ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Data Time: UTC YYYY-MM-DD HH:MM HH:MM UTC — News Headline (Source: [Organization](URL)) "Key quote or one-sentence summary" Impacted Markets: [Market Question](https://polymarket.com/event/{slug}) Old% → New% (change) Vol +$Vol [Market Question](URL) ... Smart Money: If large orders exist, briefly describe address type + direction + amount; omit if none HH:MM UTC — Next News ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` Format notes: - Probability integer percentage: `52%`; change with sign: `+16%`, `-7%`; up ⬆️ down ⬇️ - Volume: `+$1.8M` / `+$420k` - If no related markets found for a news item, write "No directly related markets found yet" ### Format B: Specific News → Related Markets ``` Markets related to "News Summary": Directly Related: [Market Question](URL) — YES X%, Total Vol $Vol (Listed N days/hours ago, or other background info) Indirectly Related: [Market Question](URL) — YES X%, Total Vol $Vol ... Smart Money Movement: Within N minutes after this news was published [HUMAN] Bought "Market Question" YES $Amount [SIGNAL] Bought "Market Question" YES $Amount (If no $5k+ large orders, show "No smart money large orders (>$5k) yet") ``` --- ## User Intent Mapping | User Says | Execute | |-----------|---------| | "what big news affected markets today" | Feature A, default today | | "past 12 hours news radar" | Feature A, adjust time window | | "just saw news about XX, any related markets" | Feature B | | "are there markets on XX event on Polymarket" | Feature B | | "which probabilities did this news affect" | Feature B (user already provided news) | --- ## Notes 1. **Convert news time to UTC** before passing to shared data layer query (EST +5, EDT +4) 2. **`gamma.searchByKeyword()` only supports English**: Translate keywords before searching for Chinese news 3. **price field = probability (0~1)**: Multiply by 100 and round for percentage display 4. **outcome_index = 0 corresponds to YES**: Only take YES direction for probability change calculation 5. **Strictly prohibit fabricating data**: All probability and volume numbers must come from shared data layer or Gamma API; truthfully explain when data cannot be found 6. **Honestly explain when news not found**: Do not speculate or fabricate news when WebSearch has no results


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)