Global Market Snapshot
简介
Global Market Snapshot
原始描述
Generate a structured global market snapshot report including major stock indices and commodities. Use when user asks for market data, stock market report, d...
通过你的 Agent 添加
安装目录:market-global-snapshot/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: market-global-snapshot
description: Generate a structured global market snapshot report including major stock indices and commodities. Use when user asks for market data, stock market report, daily market summary, or needs current prices and changes for indices (S&P 500, Dow Jones, NASDAQ, SSE Composite, Shenzhen, STAR Market, Nikkei 225, Sensex) and commodities (Gold, Silver, Crude Oil, Copper).
Market Report Skill
Generate a structured global market snapshot report with stock indices and commodities data.
Fallback Order
- Yahoo Finance (Primary) - Fast, comprehensive
- Trading Economics (Fallback for most indices)
- Sina Finance (Fallback for STAR Market Composite)
If Yahoo Finance fails (rate limit, error, no data), use Trading Economics as fallback. For STAR Market Composite specifically, use Sina Finance as fallback.
Primary: Yahoo Finance
Ticker Symbols
Use these exact ticker symbols:
- S&P 500:
^GSPC - Dow Jones:
^DJI - NASDAQ:
^IXIC - SSE Composite:
000001.SS - Shenzhen Component:
399001.SZ - STAR Market:
000680.SS(NOT 000688.SS) - Nikkei 225:
^N225 - Sensex:
^BSESN - Gold:
GC=F - Silver:
SI=F - Crude Oil:
CL=F - Copper:
HG=F
Query Method
Use curl to query Yahoo Finance API:
curl -s "https://query1.finance.yahoo.com/v8/finance/chart/{TICKER}?interval=1d&range=5d" -H "User-Agent: Mozilla/5.0"
Fallback: Trading Economics
If Yahoo Finance fails, use Trading Economics web fetch:
Indices URLs
- US (S&P 500):
https://tradingeconomics.com/united-states/stock-market
- China (SSE):
https://tradingeconomics.com/china/stock-market
- China (Shenzhen):
https://tradingeconomics.com/china/stock-market (same page, different data)
- Japan (Nikkei):
https://tradingeconomics.com/japan/stock-market
- India (Sensex):
https://tradingeconomics.com/india/stock-market
Extract Data from Trading Economics
https://tradingeconomics.com/united-states/stock-markethttps://tradingeconomics.com/china/stock-markethttps://tradingeconomics.com/china/stock-market (same page, different data)https://tradingeconomics.com/japan/stock-markethttps://tradingeconomics.com/india/stock-marketFrom the page content, extract:
- Actual value: Current price (e.g.,
6762.88) - Previous value: Previous close (e.g.,
6830.71)
Calculate:
- Change = Actual - Previous
- Percent = (Change / Previous) * 100
Example from US page:
Actual: 6762.88
Previous: 6830.71
Change: 6762.88 - 6830.71 = -67.83
Percent: -67.83 / 6830.71 * 100 = -0.99%
Fallback: Sina Finance (STAR Market Composite Only)
If Yahoo Finance fails for STAR Market Composite (000680.SS), use Sina Finance:
Query Method
curl -s "https://hq.sinajs.cn/list=sh000680" -H "Referer: https://finance.sina.com.cn" | iconv -f GB2312 -t UTF-8
Response Format
var hq_str_sh000680="科创综指,open,prev_close,low,high,close,...
Extract Data
curl -s "https://hq.sinajs.cn/list=sh000680" -H "Referer: https://finance.sina.com.cn" | iconv -f GB2312 -t UTF-8
var hq_str_sh000680="科创综指,open,prev_close,low,high,close,...
Extract Data
Parse the response to extract:
- Name: 科创综指 (STAR Market Composite)
- Current: Field 6 (close price)
- Previous: Field 3 (previous close)
Example:
科创综指,1771.6386,1774.0261,1744.2182,1782.4838,1744.0835,...
↑ ↑
previous current
Change: 1744.0835 - 1774.0261 = -29.94
Percent: -29.94 / 1774.0261 * 100 = -1.69%
Critical: Calculating Daily Change (Yahoo Finance)
NEVER use chartPreviousClose - it's often incorrect for Asian markets.
For Chinese indices (SSE, Shenzhen, STAR Market), always:
- Query with
range=5dto get multiple days - Find the LAST close value in the
indicators.quote[0].closearray - this is today's close - Find the SECOND TO LAST close value - this is previous trading day's close
- Calculate: Today's Close - Previous Close = Change
Example for SSE:
close array: [4182.59, 4122.68, 4082.47, 4108.57, 4124.19]
↑ today (last)
↑ previous (second to last)
Change: 4124.19 - 4108.57 = +15.62
Output Format
Generate at this exact format with timestamps:
Latest snapshot from the `market-global-snapshot` skill, generated at `UTC timestamp` and `China time`.
📊 Stock indices:
- 🇺🇸 S&P 500: `price` 📈/📉 `change` (`percent`)
- 🇺🇸 Dow Jones Industrial Average: `price` 📈/📉 `change` (`percent`)
- 🇺🇸 NASDAQ Composite: `price` 📈/📉 `change` (`percent`)
- 🇨🇳 SSE Composite: `price` 📈/📉 `change` (`percent`)
- 🇨🇳 Shenzhen Component Index: `price` 📈/📉 `change` (`percent`)
- 🇨🇳 STAR Market Composite: `price` 📈/📉 `change` (`percent`)
- 🇯🇵 Nikkei 225: `price` 📈/📉 `change` (`percent`)
- 🇮🇳 Sensex: `price` 📈/📉 `change` (`percent`)
🛢️ Commodities:
- 🟡 Gold: `price USD / troy oz` 📈/📉 `change` (`percent`)
- ⚪ Silver: `price USD / troy oz` 📈/📉 `change` (`percent`)
- 🛢️ Crude Oil: `price USD / barrel` 📈/📉 `change` (`percent`)
- 🟠 Copper: `price USD / lb` 📈/📉 `change` (`percent`)
Error Handling
If Yahoo Finance, Trading Economics, AND Sina all fail:
- Return partial data with available indices
- Mark unavailable data as "N/A"
- Include error message at bottom: "⚠️ Some data unavailable due to API errors"
Historical Data
To get previous day's data instead of today:
- Use second-to-last close value in the array (not today's)
- This is the default behavior when asking for "yesterday"
Example:
close array: [4124.19, 4108.57, 4082.47, 4122.68, 4182.59]
↑ ↑
yesterday today
Formatting Rules
- Use two decimal places for all numbers
- Wrap prices in backticks
- Use 📈 for positive, 📉 for negative
- Include + or - sign for changes
- Use percentage in parentheses with % sign
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。