← 返回
数据分析

predict-intelligence

Predict intelligence skill for AI agents. Generates professional PDF reports with probability-ranked predictions, D3 visualizations, and Polymarket consensus...
AI智能体预测情报技能,生成包含概率排序预测、D3可视化及Polymarket共识的专业PDF报告...
ken-chy129
数据分析 clawhub v1.0.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 509
下载
💾 12
安装
2
版本
#latest

概述

Predict Intelligence Skill

You generate a professional PDF intelligence brief. The user should

grasp the key finding in 30 seconds. You own information efficiency.

Agent Requirements

CapabilityWhat you need
------
Web searchSearch the internet for news, analysis, data
URL fetchOpen a URL and read its content
File read/writeRead template, write HTML report
Shell executeRun Python 3.9+ scripts

First-Time Setup

pip install playwright
playwright install chromium

No other Python packages needed (Jinja2, requests, etc. are NOT required).


How It Works

Read template → Do research → Write HTML → Convert to PDF
  1. Read SKILL_DIR/templates/report_template.html — your structural reference.
  2. Research and analyze the topic (Steps 1–8 below).
  3. Generate a NEW .html file following the template's exact structure.
  4. Convert to PDF:

```bash

python SKILL_DIR/scripts/to_pdf.py report.html predict_report.pdf

```

The template IS the spec. It contains:

  • All CSS (copy verbatim — never modify)
  • All D3 visualization code (copy verbatim — only change data variables)
  • Example content showing exact formatting for every section
  • Extensive comments explaining what each section does and how to fill it

Step 0 — Domain Detection

SignalDomain
------
Countries, leaders, military, diplomacy, sanctionsGeopolitical
Stocks, crypto, Fed, rates, commoditiesFinancial
Tech releases, AI models, productsTechnology
M&A, acquisitions, IPO, corporateCorporate
OtherCustom

Classification bar is always: ANYGEN PREDICT INTELLIGENCE ASSESSMENT

with #YY-MM-DD on the right (2-digit year, e.g. #26-03-12).

The report structure and design are IDENTICAL across all domains.

Only research sources and visualization choices change.

See Domain Adaptation at the bottom.

Step 1 — Parse Query

Extract:

  • event: what is being predicted
  • actors: who is involved
  • regions / sectors: geographic or industry scope
  • timeframe: any dates or deadlines
  • question type: temporal ("when"), binary ("will"), or multi_outcome ("what")

Step 2 — Research

Search the web at least 8 times, covering:

  1. Breaking news (last 48 hours)
  2. Diplomatic / military / industry developments
  3. Decision-makers' public statements
  4. Historical precedent
  5. Expert / think-tank / analyst reports
  6. Regional or sector-specific media
  7. Economic / financial context
  8. Low-probability high-impact wildcards

CRITICAL: For every fact, save the exact article URL.

For geopolitical / diplomacy / military / sanctions topics, ALSO collect:

  • 3–5 key locations (cities, capitals, bases, meeting venues) with lat/lon
  • ISO alpha-2 country codes of all parties involved
  • Any diplomatic channels, proxy lines, or trade routes between locations

This data is required for the V2 Regional Map in Step 7. Collect it now.

fact: "Oman hosted senior US-Iran talks on March 5"
url:  "https://reuters.com/world/middle-east/oman-hosts-rare-us-iran-talks-2026-03-06/"

Homepage URLs are forbidden. Every URL must point to a specific article.

Step 3 — Formulate Predictions

Create outcomes sorted by probability descending. All must sum to ~100%.

The verdict has five parts:

  • verdict_number: top probability as text (e.g. "34%") — displayed at 52px, the BIGGEST element
  • verdict_outcome: 3–6 word label
  • verdict_detail: 1 sentence — "Most likely path: ..."
  • verdict_bg (Context): 2–3 sentences of BACKGROUND BRIEFING — what led to

the current situation, key prior events, the "前情提要" (previously on...)

  • verdict_context: 2–3 sentences of assessment reasoning with key evidence

Calibration:

ConfidenceRange
------
Near-certain90–99%
Very likely75–89%
Likely60–74%
Toss-up40–59%
Unlikely25–39%
Very unlikely10–24%
Remote1–9%

Step 4 — Key Drivers (5 items, causal logic required)

Each driver MUST have:

  • Title: 3–5 words
  • Direction: positive (↑ increases likelihood) or negative (↓ decreases)
  • Causal logic: 1 sentence: fact → mechanism → directional impact
  • Source URL: exact article URL

❌ Bad: "Sanctions pressure — Iran inflation at 45%"

✅ Good: "Sanctions pressure ↑ — 45% inflation pushes Tehran toward concessions for relief"

The bad one states facts. The good one explains the causal chain.

Step 5 — Watch List (5 items, forward-looking only)

Each item is a FUTURE event or trigger that could shift the predict.

No past events. No source URLs (these haven't happened yet).

Each item MUST have:

  • Date or window: specific date or range (e.g. "Apr 3", "Late March")
  • Trigger: 3–6 words describing what might happen
  • Conditional impact: 1 sentence — "If [X] → [how probability shifts]"

✅ Good: "Apr 3 — UNSC sanctions vote — If passed → ceasefire probability ↑10-15%"

✅ Good: "Late Mar — FOMC meeting — Dovish tone → ↑ rate cut odds; hawkish → ↓"

❌ Bad: "Mar 5 — Secret Muscat meeting happened" (PAST event — belongs in Key Drivers)

The distinction:

  • Key Drivers = WHY the current probability is what it is (past + present evidence, with source URLs)
  • Watch List = WHAT could change the probability next (future triggers, no sources needed)

Step 6 — Polymarket Data

Run:

python SKILL_DIR/scripts/fetch_polymarket.py --query "<keywords>" --limit 10

From results:

  1. Add your probability estimate for each option
  2. Calculate delta = your_estimate − market_probability
  3. Select 3 markets with highest absolute delta
  4. Sort by delta descending (most undervalued first)

If no script available, search "polymarket [topic]" on the web.

If no markets exist, skip the Polymarket section entirely.

Step 7 — Visualization (REQUIRED)

⚠ MANDATORY MAP RULE — READ THIS FIRST

**If the topic involves countries, regions, borders, military, diplomacy,

or sanctions → you MUST include V2 (Regional Map). Non-negotiable.**

Do NOT skip V2 because:

  • "I only want one chart" → V2 IS that one chart. Add a second if needed.
  • "It needs extra dependencies" → TopoJSON is already in the template .

Just keep the