AI agent skill that answers macro questions — housing, gold, BTC, geopolitics — with probability estimates mined from 13 financial data sources (Polymarket, Kalshi, CFTC, SEC & more). For Claude Code / Cursor / Codex / OpenClaw. | 让 AI Agent 从金融数据中挖掘宏观趋势的数字先知
# Add to your Claude Code skills
git clone https://github.com/komako-workshop/digital-oracleGuides for using ai agents skills like digital-oracle.
Last scanned: 8/13/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-13T05:38:49.545Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}digital-oracle is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by komako-workshop. AI agent skill that answers macro questions — housing, gold, BTC, geopolitics — with probability estimates mined from 13 financial data sources (Polymarket, Kalshi, CFTC, SEC & more). For Claude Code / Cursor / Codex / OpenClaw. | 让 AI Agent 从金融数据中挖掘宏观趋势的数字先知. It has 771 GitHub stars.
Yes. digital-oracle passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/komako-workshop/digital-oracle" and add it to your Claude Code skills directory (see the Installation section above). digital-oracle ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
digital-oracle is primarily written in Python. It is open-source under komako-workshop on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh digital-oracle against similar tools.
No comments yet. Be the first to share your thoughts!
Markets are efficient. Price contains all public information. Reading price = reading market consensus.
Answer questions using only market trading data — no news, opinions, or statistical reports as causal evidence. If something is true, some market has already priced it in.
Five iron rules:
Decompose the user's question into:
Based on question type, select from the signal menu below. Don't use just one category — cover at least 3.
KXFED series: FOMC rate-decision contracts. (Use this for the rate path — CMEFedWatchProvider is currently 403-blocked by CME's bot protection from every host tested.)Mainland listings are quoted in CNY on exchanges no US venue prices, so the usual Polymarket/Kalshi/CFTC layer has nothing to say about them. Route these to Eastmoney.
get_quote: Live quote for a 6-digit code → last, change %, turnover rate, PE(TTM), PB, market cap. Pass the bare code (600519, 000977) — to_secid resolves the exchange.get_fund_flow: The signal with actual skin in the game. Daily net inflow split by order size — extra-large / large (together = 主力, institutional) vs medium / small (retail). Institutions buying while retail sells is a different tape than the reverse, and price alone cannot show it.list_sector_fund_flow: Industry or concept boards ranked by institutional net inflow → which sector money is rotating into. Answers "which sector is seeing inflows" directly.get_history: OHLCV with forward adjustment (adjust="forward") → realized volatility, trend, volume confirmation.600519.SS / 000977.SZ suffixes — useful as a cross-check, and the only way to put an A-share on the same axis as a US comparable.Two cautions. Eastmoney publishes fund flow after the close, so intraday questions get yesterday's tape. And no prediction market prices Chinese single names — if the user wants a probability, it has to be reasoned from positioning and volatility, not looked up.
Available trading symbols directory: See references/symbols.md Provider API reference: See references/providers.md
Before fetching data, evaluate each candidate signal from Step 2 against three criteria:
Only keep signals that pass all three checks. This reduces noise, saves fetch time, and produces cleaner analysis.
Use digital-oracle's Python providers to fetch structured data, calling all sources in parallel with gather() (including web search):
from digital_oracle import (
PolymarketProvider, PolymarketEventQuery,
KalshiProvider, KalshiMarketQuery,
YahooPriceProvider, PriceHistoryQuery, # requires uv pip install yfinance
DeribitProvider, DeribitFuturesCurveQuery,
USTreasuryProvider, YieldCurveQuery,
WebSearchProvider,
CftcCotProvider, CftcCotQuery,
CoinGeckoProvider, CoinGeckoPriceQuery,
EdgarProvider, EdgarInsiderQuery,
BisProvider, BisRateQuery,
WorldBankProvider, WorldBankQuery,
YFinanceProvider, OptionsChainQuery, # requires uv pip install yfinance
FearGreedProvider,
EastmoneyProvider, EastmoneyQuoteQuery, EastmoneyKlineQuery,
EastmoneyFundFlowQuery, EastmoneySectorFlowQuery,
gather,
)
pm = PolymarketProvider()
kalshi = KalshiProvider()
yahoo = YahooPriceProvider() # requires uv pip install yfinance
deribit = DeribitProvider()
treasury = USTreasuryProvider()
web = WebSearchProvider()
cftc = CftcCotProvider()
coingecko = CoinGeckoProvider()
edgar = EdgarProvider() # set EDGAR_USER_EMAIL to identify yourself to SEC; a contact is required or it 403s
bis = BisProvider()
wb = WorldBankProvider()
yf = YFinanceProvider() # requires uv pip install yfinance
fear_greed = FearGreedProvider()
eastmoney = EastmoneyProvider() # China A-share: quotes, OHLCV, fund flow, sector rotation
result = gather({
"pm_events": lambda: pm.list_events(PolymarketEventQuery(slug_contains="...", limit=10)),
"yield_curve": lambda: treasury.latest_yield_curve(),
"gold": lambda: yahoo.get_history(PriceHistoryQuery(symbol="GC=F", limit=30)),
# Institutional positioning
"gold_cot": lambda: cftc.list_reports(CftcCotQuery(commodity_name="GOLD", limit=4)),
# Crypto market sentiment
"crypto": lambda: coingecko.get_prices(CoinGeckoPriceQuery(coin_ids=("bitcoin", "ethereum"))),
# Insider trades
"insider": lambda: edgar.get_insider_transactions(EdgarInsiderQuery(ticker="AAPL", limit=10)),
# Central bank policy rates
"rates": lambda: bis.get_policy_rates(BisRateQuery(countries=("US", "CN"), start_year=2023)),
# GDP data
"gdp": lambda: wb.get_indicator(WorldBankQuery(indicator="NY.GDP.MKTP.CD", countries=("US", "CN"))),
# BTC futures term structure (risk appetite proxy)
"btc_futures": lambda: deribit.get_futures_term_structure(DeribitFuturesCurveQuery(currency="BTC")),
# Kalshi event markets (use event_ticker or series_ticker, not keyword search)
"kalshi_fed": lambda: kalshi.list_markets(KalshiMarketQuery(series_ticker="KXFED", limit=10)),
# Options chain (with Greeks)
"spy_options": lambda: yf.get_chain(OptionsChainQuery(ticker="SPY", expiration="2026-04-17")),
# CNN Fear & Greed (composite of 7 price signals)
"fear_greed": lambda: fear_greed.get_index(),
# China A-share: institutional vs retail flow, and which sector money rotated into
"cn_stock": lambda: eastmoney.get_quote(EastmoneyQuoteQuery(symbol="002156")),
"cn_flow": lambda: eastmoney.get_fund_flow(EastmoneyFundFlowQuery(symbol="002156", limit=10)),
"cn_sectors": lambda: eastmoney.list_sector_fund_flow(EastmoneySectorFlowQuery(limit=15)),
# Web search runs in parallel with structured providers
"vix": lambda: web.search("VIX index current level"),
"hy_spread": lambda: web.search("US high yield bond spread OAS"),
})
# Partial failures don't affect other results
curve = result.get("yield_curve")
vix_info = result.get_or("vix", None) # WebSearchResult — use .text() to render
# Options data usage
chain = result.get_or("spy_options", None)
if chain:
print(f"ATM IV: {chain.atm_iv:.1%}, Implied move: {chain.implied_move():.1%}")
print(f"Put/Call OI ratio: {chain.put_call_oi_ratio:.2f}")
print(f"Max pain: {chain.max_pain()}")
All 14 Providers:
| Provider | Data Type | Purpose | Dependency |
|---|---|---|---|
| PolymarketProvider | Prediction market contracts | Event probability pricing | stdlib |
| KalshiProvider | Binary contracts | US regulated event contracts | stdlib |
| YahooPriceProvider | Price history | Stocks/ETFs/FX/Commodities | yfinance |
| DeribitProvider | Crypto derivatives | Futures term structure, options IV | stdlib |
| USTreasuryProvider | Treasury yields | Yield curves, inflation expectations | stdlib |
| WebSearchProvider | Web search | VIX/MOVE/CDS/BDI supplementary data | stdlib |
| CftcCotProvider | Futures positioning | Institutional direction (smart money) | stdlib |
| CoinGeckoProvider | Crypto spot | BTC/ETH price, market cap, dominance | stdlib |
| EdgarProvider | SEC filings | Insider trades Form 4, filing search | stdlib |
| BisProvider | Central bank data | Policy rates, credit-to-GDP gap | stdlib |
| WorldBankProvider | Development indicators | GDP, population, trade, macro data | stdlib |
| YFinanceProvider | US options chains | IV, Greeks, put/call ratio, max pain | yfinance |
| FearGreedProvider | Market sentiment | CNN 7-signal composite → 0-100 score | stdlib |
| EastmoneyProvider | China A-share | Quotes, OHLCV, order-size fund flow, sector rotation | stdlib |
| CMEFedWatchProvider | Rate probabilities | Currently 403-blocked by CME — use Kalshi KXFED |
stdlib |
13 out of 15 providers have zero external dependencies and zero API keys. YahooPriceProvider and YFinanceProvider require
pip install yfinance.
WebSearchProvider usage:
web.search("query") → returns WebSearchResult (search summary) — render with .text()web.fetch_page("url") → returns WebPageContent (page body extraction)Data not available via structured providers — use web search instead: VIX, MOVE, CDS spreads, TTF natural gas, BDI freight rates, war risk premiums, high-yield OAS — these need to be fetched from financial web pages. They are still trading data and comply with the methodology.
This is the key to report quality. Don't just summarize data — derive judgment from data.
Four analysis dimensions:
Signal interpretation: What is each data point saying? Derive meaning from price. Not "gold up 3%" but "the market is pricing in tail risk." e.g., Copper/Gold ratio declining → industrial demand weaker than safe-haven demand → risk-off.
Cross-validation: Which signals point in the same direction (resonance)? Which signals disagree (divergence)? Divergence itself is a high-value signal. e.g., gold says "disaster" but equities say "fine" → two markets pricing different time windows.
Time alignment: Group signals by their pricing horizon. Don't mix signals from different time windows in the same vote.
Weight judgment: Not all signals are equally reliable. Signals backed by real money > surveys. Liquid markets > illiquid markets. Direct pricing > indirect proxies. e.g., Polymarket high-liquidity contract > CDS quotes (slow updates, low liquidity).
Core principle: Don't vote by majority. When signals diverge:
Must follow this structure. You can adjust the number of layers and wording, but the four main sections (data summary, analysis, probability estimates, conclusion) cannot be omitted or merged into prose paragraphs:
# [Question Title]: Multi-Signal Synthesis
## Data Summary
### Layer 1: [Most direct signal source]
| Signal | Data | What it's saying |
|--------|------|-----------------|
(table, one signal per row, third column is reasoning from price to meaning)
### Layer 2: [Secondary signal source]
(same format)
### Layer N: ...
(as needed, typically 3-5 layers)
## Analysis
### Resonance signals
(which signals point in the same direction, and what judgment they form)
### Key divergences
(A says X, B says Y → explain why + who is more credible)
### Time stratification
(what do short-term / medium-term / long-term signals each point to)
## Probability Estimates
| Scenario | Probability | Basis |
|----------|-------------|-------|
### Most likely path: [one-sentence summary]
**Core logic chain:** (2-3 paragraphs, reasoning from data to conclusion)
## Conclusion
> [One-sentence summary, preferably including a specific probability estimate]
### Sub-conclusions
| Dimension | Judgment | Confidence |
|-----------|----------|------------|
| Short-term (6-12mo) | ... | High/Medium/Low |
| Medium-term (1-3yr) | ... | High/Medium/Low |
| Long-term (3-5yr) | ... | High/Medium/Low |
| Systemic risk | ... | High/Medium/Low |
(adjust dimensions to match the question — e.g., replace "systemic risk" with whatever dimension is most relevant)
### Risk factors
- **Upside risk:** what scenario would make things better than expected
- **Downside risk:** what scenario would make things worse than expected
### Signals to monitor
| Signal | Current value | Threshold | Meaning |
|--------|--------------|-----------|---------|
| ... | ... | if crosses X | then Y |
(3-5 concrete signals with specific trigger levels and what they would imply)
---
*Data sources: [list all structured and web data sources]*
*Fetched at: [date]*
slug_contains search is fuzzy — filter results by title keywords after fetching=F suffix (e.g. GC=F, CL=F, HG=F), forex uses =X suffix (e.g. EURUSD=X), US stocks/ETFs use plain tickers (e.g. SPY, LMT)yfinance — install with uv pip install --target .deps yfinanceRHM.DE for Rheinmetall, BA.L for BAE Systems)EdgarProvider(user_email="you@example.com") — SEC requires email in User-Agent, otherwise 403. First call parses ticker→CIK mapping, slightly slowNoneuv pip install yfinance (auto-installs pandas). After-hours IV may be inaccurate (bid/ask = 0) — use during market hoursget_chain() auto-computes Black-Scholes Greeks (pure stdlib math.erf, no scipy needed)series_ticker or event_ticker to filter markets. Find tickers by browsing kalshi.com or listing markets without filters first. Common series: KXFED (Fed rates), KXINX (S&P 500 range), KXGDP (GDP)get_futures_term_structure(), not get_futures_curve(). Option chain method is get_option_chain()KXFED for the rate pathEDGAR_USER_EMAIL to identify yourself properly under SEC's fair-access policyget_credit_to_gdp() returns the gap (deviation from long-run trend, e.g. US ≈ -12pp), not the raw credit-to-GDP ratio (≈ 140%). Pass series=CREDIT_GAP_SERIES["ratio"] if you want the level instead. A double-digit positive gap is the classic credit-bubble warningto_secid() resolves the exchange (6xxxxx/5xxxxx/9xxxxx → Shanghai, everything else → Shenzhen). Fund flow amounts are CNY and publish after the close. main_net = extra_large_net + large_net, i.e. institutional; medium/small are retailget_history sources from Tencent first and only falls back to Eastmoney, since Eastmoney's history host is the one it throttles hardest — that means turnover_cny is None on bars that came from Tencent, but the OHLCV is completeUSD instead of $ to avoid markdown renderers interpreting $...$ as LaTeXEnglish | 中文
Digital Oracle 是一款让 AI Agent 基于从海量金融数据中,挖掘出宏观事件发展趋势的开源 Skill。
适用于 OpenClaw / Claude Code / Cursor / Codex。
我们生活在一个噪音极度泛滥的时代。社交媒体上充斥着情绪化的预测 — 有人说房价要崩了,有人说黄金要上天,有人说明天就打仗。这些观点往往顺应人群情绪,而不是基于客观数据的理性分析。
但交易数据不一样。
价格是绝对理性的 — 当一个人要把自己的钱押在某个结果上时,他会比发一条短视频认真很多。
这就是有效市场理论的核心洞察:所有公开信息都已经被价格消化了。一切信息都在 K 线里。
Digital Oracle 把这个洞察变成了一个可执行的工具。它接入了 13 个权威金融数据源 — 从 Polymarket 和 Kalshi 这样的预测市场,到美国国债收益率曲线、CFTC 机构持仓、SEC 内部人交易、各国央行利率、加密衍生品,以及 A 股的拆单资金流与板块轮动。
它不看报纸不读新闻,不消费文章、短视频、播客,只通过从金融数据中挖掘出的价值信号,来回答房价涨跌、黄金走势、比特币周期、军事冲突概率这类问题,并给出结构化的概率估计和推理链。
某种意义上,这就是新时代的数字先知。
只要有市场在定价这件事,Digital Oracle 就能给出一个基于交易数据的概率估计。
| Provider | 数据类型 | 用途 |
|---|---|---|
| Polymarket | 预测市场合约 | 事件概率定价 |
| Kalshi | SEC 监管二元合约 | 美国政治/经济事件 |
| Stooq | 股票/ETF/外汇/商品 | 价格历史和趋势 |
| Deribit | 加密衍生品 | 期货 term structure、期权 IV |
| US Treasury | 国债收益率 | 利率曲线、通胀预期 |
| CFTC COT | 期货持仓 | 机构仓位方向(smart money) |
| CoinGecko | 加密现货 | BTC/ETH 价格、市值 |
| SEC EDGAR | 内部人交易 | Form 4 买卖信号 |
| BIS | 央行数据 | 政策利率、信贷/GDP 缺口 |
| World Bank | 发展指标 | GDP、人口、贸易 |
| Yahoo Finance | US 期权链 | IV、Greeks、put/call ratio |
| Eastmoney | A 股行情与资金流 | 个股/ETF 行情、K 线、拆单量级资金流、板块轮动 |
| Web Search | 网页搜索 | VIX、CDS 等补充数据 |
所有 API 均免费、无需 API Key。
clawhub install digital-oracle
直接告诉你的 Agent:
安装这个开源项目并读取 SKILL.md 作为你的工作指令:https://github.com/komako-workshop/digital-oracle
Agent 会自行 clone 代码、阅读方法论、调用 provider。
uv pip install yfinance
gather() 同时调用多个 providerdigital-oracle/
├── SKILL.md # Skill 定义(OpenClaw 读取这个文件)
├── digital_oracle/ # Python 源码
│ ├── concurrent.py # 并行执行工具
│ ├── http.py # HTTP 客户端抽象
│ ├── snapshots.py # HTTP 响应录制/回放(测试用)
│ └── providers/ # 13 个数据 provider
├── references/ # API 速查
│ ├── providers.md # Provider API 参考
│ └── symbols.md # 交易符号目录
├── scripts/ # Demo 脚本
└── tests/ # 单元测试 + fixtures
pip installhttp_client 参数,方便测试MIT © 2026 komako-workshop — see LICENSE.