← 返回 Skills 市场
Global Commodity Today
作者
Ruoqin Zou
· GitHub ↗
· v0.1.1
· MIT-0
360
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install global-commodity-today
功能描述
全球大宗商品行情简报工具,支持查询伦敦金、伦敦银、伦敦铜、纽约铂、布伦特原油的当前价格和当日涨跌幅,生成简洁的行情简报。基于akshare获取实时数据。
使用说明 (SKILL.md)
Global Commodity Today Skill
全球大宗商品行情简报工具,快速获取贵金属与原油的实时价格与涨跌幅。
When to Use
当用户请求以下操作时调用此skill:
- 查询伦敦金(XAU)、伦敦银(XAG)、伦敦铜、纽约铂的当前价格
- 查询布伦特原油的当前价格
- 获取贵金属/原油的当日涨跌幅
- 生成大宗商品行情简报
- 了解当日贵金属和原油市场概况
Prerequisites
Python环境要求
pip install akshare pandas
依赖检查
在执行前,先检查akshare是否已安装:
python -c "import akshare; print(akshare.__version__)"
如果未安装,提示用户安装:
pip install akshare pandas
Supported Commodities
| 品种 | 代码 | 单位 | 说明 |
|---|---|---|---|
| 伦敦金 | XAU | 美元/盎司 | London Gold Spot |
| 伦敦银 | XAG | 美元/盎司 | London Silver Spot |
| 伦敦铜 | CAD | 美元/吨 | LME Copper |
| 纽约铂 | PLT | 美元/盎司 | NYMEX Platinum |
| 布伦特原油 | OIL | 美元/桶 | Brent Crude Oil |
Workflow 1: Quick Briefing (快速行情简报)
用户请求查看大宗商品行情或简报时使用。这是最常用的工作流程。
Step 1: Fetch Commodity Data
运行数据获取脚本,获取所有品种的实时价格和涨跌幅(默认输出文本简报):
python scripts/precious_metals_oil_fetcher.py --mode briefing
参数说明:
--mode: 运行模式,briefing为简报模式(获取所有品种)
Step 2: Present Briefing Report
脚本默认直接输出结构化的文本简报(Markdown格式),可直接呈现给用户。
简报格式示例:
📊 大宗商品行情简报
数据时间:2025-01-25 15:30:00
| 品种 | 最新价 | 涨跌幅 | 涨跌额 | 今开 | 最高 | 最低 |
|---|---|---|---|---|---|---|
| 🟡 伦敦金 | 2,758.30 | +0.85% | +23.20 | 2,735.10 | 2,762.50 | 2,730.00 |
| ⚪ 伦敦银 | 31.25 | +1.20% | +0.37 | 30.88 | 31.40 | 30.75 |
| 🟤 伦敦铜 | 9,325.00 | -0.45% | -42.00 | 9,367.00 | 9,380.00 | 9,300.00 |
| 🔘 纽约铂 | 965.50 | +0.30% | +2.90 | 962.60 | 968.00 | 960.00 |
| 🛢️ 布伦特原油 | 78.65 | -1.10% | -0.87 | 79.52 | 79.80 | 78.20 |
市场摘要:
- 贵金属板块整体偏强,伦敦金续创新高
- 原油受需求担忧影响小幅回落
- 伦敦铜受宏观情绪影响微跌
Workflow 2: Single Commodity Query (单品种查询)
用户只关注某一个品种时使用。
Step 1: Fetch Single Commodity
python scripts/precious_metals_oil_fetcher.py --mode single --commodity gold
--commodity 可选值:
gold- 伦敦金silver- 伦敦银copper- 伦敦铜platinum- 纽约铂oil- 布伦特原油
Step 2: Present Result
以单品种详情方式展示,包含当前价格、涨跌幅、日内高低点等。
Error Handling
网络错误
如果数据获取失败,提示用户:
- 检查网络连接
- 稍后重试(可能是接口限流)
- 部分品种可能因交易时间未到而无数据
非交易时间
- 贵金属和原油均为全球交易品种,几乎24小时可获取行情
- 周末和节假日可能只能获取上一交易日的收盘数据
- 脚本会自动标注数据时间,方便用户判断时效性
数据异常
- 如果某个品种获取失败,不影响其他品种的显示
- 失败品种会标注"数据获取失败"
Best Practices
- 数据时效性:显示的价格为最近可获取的行情数据,需注意数据时间
- 汇率换算:所有价格均以美元计价,如需人民币价格可提示用户参考当日汇率
- 投资建议:所有数据仅供参考,不构成投资建议
- 使用频率:建议间隔至少1分钟以上再次获取,避免接口限流
Important Notes
- 本工具仅提供公开市场数据查询功能
- 数据来源为akshare聚合的公开行情接口
- 不同交易所的报价可能略有差异,以实际交易平台为准
- 涨跌幅基于前一交易日收盘价计算
安全使用建议
This skill appears to do what it claims: fetch commodity quotes via akshare and format a brief. Before installing, be aware that: (1) it requires installing akshare and pandas from PyPI — only install packages you trust; (2) akshare will make network requests to its data sources, so expect outbound connections but no credential exfiltration; (3) the script relies on akshare symbol names (some mappings like copper -> "CAD" look unusual and may cause data errors), so verify outputs before using them for decisions; and (4) respect rate limits when calling repeatedly. If you need higher assurance, review the akshare package source or pin known-good versions before installing.
功能分析
Type: OpenClaw Skill
Name: global-commodity-today
Version: 0.1.1
The skill is a legitimate tool for fetching global commodity prices (Gold, Silver, Copper, Platinum, and Oil) using the well-known 'akshare' financial data library. The core logic in 'scripts/precious_metals_oil_fetcher.py' is transparent, focusing on data retrieval, price change calculation, and Markdown formatting, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description claim real-time commodity quotes via akshare; the code and SKILL.md only require akshare and pandas and perform exactly that. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Runtime instructions only ask to install akshare/pandas, check akshare installation, and run the included Python script. The SKILL.md and script do not read local secrets, system config, or files outside their own workspace, nor do they post data to unexpected endpoints.
Install Mechanism
There is no automated install spec — the skill is instruction-only and asks the user to pip install akshare and pandas. Using PyPI is standard for a Python data-fetching tool; no arbitrary archive downloads or custom installers are present.
Credentials
The skill declares no required environment variables or credentials and the code does not reference any secrets or unrelated env vars. Network access is needed to fetch market data (expected for the purpose).
Persistence & Privilege
always is false; the skill does not request persistent system privileges, modify other skills, or write global agent configuration. It only runs as invoked and does not enable autonomous elevated behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install global-commodity-today - 安装完成后,直接呼叫该 Skill 的名称或使用
/global-commodity-today触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
global-commodity-today v0.1.1
- 精简并优化了SKILL.md文档,移除冗余内容,保留核心工作流和操作说明。
- 简化数据获取脚本参数说明,突出核心模式。
- 移除了JSON格式说明及部分细节,提升文档可读性与使用聚焦。
- 保持主流程与错误处理说明不变,方便快速上手。
v0.1.0
Global Commodity Today v0.1.0
- Initial release of a tool for real-time global commodity market briefings.
- Supports querying spot prices and daily changes for London Gold, London Silver, LME Copper, NYMEX Platinum, and Brent Crude Oil.
- Provides both comprehensive market briefings and single-commodity queries in text (Markdown) or JSON format.
- Built on akshare for live data; Python (with pandas/akshare) required.
- Includes error handling for network issues, off-hours, and partial data failures.
元数据
常见问题
Global Commodity Today 是什么?
全球大宗商品行情简报工具,支持查询伦敦金、伦敦银、伦敦铜、纽约铂、布伦特原油的当前价格和当日涨跌幅,生成简洁的行情简报。基于akshare获取实时数据。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 360 次。
如何安装 Global Commodity Today?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install global-commodity-today」即可一键安装,无需额外配置。
Global Commodity Today 是免费的吗?
是的,Global Commodity Today 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Global Commodity Today 支持哪些平台?
Global Commodity Today 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Global Commodity Today?
由 Ruoqin Zou(@m0dzer0)开发并维护,当前版本 v0.1.1。
推荐 Skills