Stock Query
查询全球股票实时行情(A 股、港股、美股)、ETF、场外基金、指数,支持批量查询、历史K线(含均线)与自选股管理。 TRIGGER when: 用户查询股价/行情/净值/历史K线/自选盈亏/大盘指数时。NOT for: 加密货币、期货、期权、外汇。 Skill: Stock Query Owner: asfamilybank Summary: 查询全球股票实时行情(A 股、港股、美股)、ETF、场外基金、指数,支持批量查询、历史K线(含均线)与自选股管理。 TRIGGER when: 用户查询股价/行情/净值/历史K线/自选盈亏/大盘指数时。NOT for: 加密货币、期货、期权、外汇。 Tags: china:1.0.3, etf:1.0.3, finance:1.0.3, fund:1.0.3, latest:2.6.0, stock:1.0.3 Version history: v2.6.0 | 2026-04-09T01:55:57.805Z | auto v2.6.0 brings major improvements and market data source enhancements: - 增加对 Yahoo Finance 实时数据接口支持(美股行情更加完
Rank
62
Safety
84
Downloads
1.9k
Updated
Oct 9, 2026
Version
2.6.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 1.9K downloadsadoption · observed Oct 9, 2026
- Latest release
- 2.6.0release · observed Apr 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17d7bw87ak4a3hadkqj6xhted83h9qr:stock-query- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-asfamilybank-stock-query/snapshot"
Documentation
CLAWHUB
127,481 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
--- name: stock-query description: > 查询全球股票实时行情(A 股、港股、美股)、ETF、场外基金、指数,支持批量查询、历史K线(含均线)与自选股管理。 TRIGGER when: 用户查询股价/行情/净值/历史K线/自选盈亏/大盘指数时。NOT for: 加密货币、期货、期权、外汇。 license: MIT compatibility: Requires curl, iconv, python3. macOS/Linux only. metadata: version: "2.6.0" author: asfamilybank repo: https://github.com/asfamilybank/stock-query user-invocable: true allowed-tools: - Bash --- # 全球股票/ETF/基金/指数 实时价格查询 ## 权限与操作范围 | 权限 | 声明用途 | 限制 | |------|---------|------| | `network` | `scripts/sq.sh` 内部调用行情 API | 仅限 `qt.gtimg.cn`、`hq.sinajs.cn`、`push2.eastmoney.com`、`web.ifzq.gtimg.cn`、`query1.finance.yahoo.com`、`fundgz.1234567.com.cn`、`api.fund.eastmoney.com` 七个数据源,不发送用户个人数据 | | `shell` | 执行 `curl`、`iconv`、`grep`、`awk`、`mktemp` | 仅操作 `portfolio.csv`;不执行任意命令 | **文件访问:** 本 skill 仅在用户**显式指令**下读写 `portfolio.csv` 一个文件,优先查找 `~/.config/stock-query/portfolio.csv`,其次兼容旧版安装目录(`~/.openclaw/workspace/skills/stock-query/`、`~/.claude/skills/stock-query/`、`~/.agents/skills/stock-query/`),无需配置任何环境变量。历史数据通过网络实时获取,不写本地文件。 **自动触发范围:** **文件操作(Command 1)不会自动触发**,仅在用户明确发出增/删/改/查 portfolio 指令时执行。 ⚠️ **凭证安全:** `portfolio.csv` 仅应包含股票代码、名称、数量、自选价格。**禁止存放账户密码、API 密钥、Token 或任何认证凭证。** ## 前置依赖 | 工具 | 说明 | |------|------| | `scripts/sq.sh` | 行情查询 CLI,内部使用 `curl` + `iconv` | | `scripts/fmt.sh` | 格式化输出工具,由 `sq.sh --format` 调用,依赖 `python3`,输出人类可读的 Markdown 表格 | ## 支持的市场与标的 | 市场 | 代码格式 | 示例 | |------|---------|------| | 沪/深市股票、ETF、指数 | 6 位数字 | `601991`、`510300`、`000001` | | 港股 | ≤5 位数字(自动补零) | `700`、`00700`、`09988` | | 美股 | 英文 ticker | `AAPL`、`TSLA`、`BIDU` | | 美股指数 | `.DJI` / `.IXIC` / `.SPX` | `.DJI` | | 场外基金 | 6 位数字 | `014978`、`110011` | --- ## 工作流程 ### Step 0: 意图识别与 Command 路由 **Meta 命令**(最高优先级):输入为 `version`、`-v`、`--version`、`help`、`-h`、`--help`(大小写不敏感) → 直接输出版本/帮助信息,**不执行后续步骤** version 输出: ``` stock-query v2.6.0 ``` help 输出: ``` stock-query v2.6.0 — 全球股票/ETF/基金/指数实时行情查询 用法: /stock-query <代码> [代码2 ...] 查询一个或多个标的实时行情 /stock-query <代码> 历史 查询个股历史K线(默认近30个交易日) /stock-query version 显示版本号 /stock-query help 显示本帮助 支持的市场: A股(沪/深) 6位数字,如 601991 000001 港股 5位数字,如 00700 09988 美股 英文ticker,如 AAPL TSLA NVDA 美股指数 .DJI .IXIC .SPX ETF 6位数字,如 510300 159915 场外基金 6位数字,如 014978 常用示例: /stock-query AAPL /stock-query 00700 09988 /stock-query AAPL 00700 601991 510300 /stock-query 600519 近60天日K /stock-query TSLA 周K 最近20周 作者:asfamilybank · https://github.com/asfamilybank/stock-query ``` **Command 1:Portfolio 文件管理**:含操作词(添加/新增/删除/移除/修改/查看/列出)+ 对象词(自选股/持仓/portfolio/watchlist),或明确指令如"把 AAPL 加到自选股" → 直接执行 Command 1,**不进入 Command 2/3 流程** **Command 3:历史行情查询**:含关键词(历史/历史数据/历史行情/历史价格/历史走势/K线/日K/周K/月K) → 直接执行 Command 3,**不进入 Command 2 流程** **Command 2:行情查询**(默认):其余所有输入 → 进入 Command 2 流程(执行 Step 1–6) --- ## 静默执行原则(Claude 对话输出约束) **⛔ 严禁向用户输出任何中间推理或过程信息。** 这是最高优先级约束,覆盖所有步骤。 > 本约束仅适用于 Claude 的对话文本输出。`scripts/sq.sh` stdout 仅输出结构化数据供 Claude 内部消费:行情/基金命令输出 JSON 数组,`pfile` 命令输出文件绝对路径或
_meta.json
{
"ownerId": "kn722wj47zb7qme4e79tqwyg5582tfyp",
"slug": "stock-query",
"version": "2.6.0",
"publishedAt": 1775699757805
}skill-card.md
## Description: Stock Query helps agents retrieve and format real-time market quotes, historical K-line data, and portfolio watchlist views for stocks, ETFs, mutual funds, and indexes across A-share, Hong Kong, and U.S. markets. This skill is ready for commercial/non-commercial use. ## Publisher: [asfamilybank](https://clawhub.ai/user/asfamilybank) ### License/Terms of Use: MIT-0 ## Use Case: External users and agents use this skill to answer stock, fund, index, historical price, and watchlist valuation requests. It is intended for market-data lookup and formatting, not for cryptocurrency, futures, options, or foreign-exchange workflows. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Unsafe input handling in shell-based portfolio and history commands may enable local code execution. Mitigation: Review before installing and use only with trusted prompts until the shell/Python injection paths are fixed. Risk: Portfolio data is stored in portfolio.csv and may be modified during explicit portfolio-management requests. Mitigation: Keep portfolio.csv limited to stock codes, names, quantities, and reference prices; do not store credentials, API keys, tokens, or account passwords in it. Risk: Queried symbols are sent to external market-data services. Mitigation: Avoid querying sensitive or confidential watchlists if disclosure of symbols to external providers is unacceptable. ## Reference(s): - [ClawHub release page](https://clawhub.ai/asfamilybank/skills/stock-query) - [Source repository listed in metadata](https://github.com/asfamilybank/stock-query) ## Skill Output: **Output Type(s):** [Text, Markdown, JSON, CSV, Shell commands, Configuration guidance] **Output Format:** [Markdown tables, JSON arrays or objects, CSV, and concise error text] **Output Parameters:** [1D] **Other Properties Related to Output:** [Requires curl, iconv, and python3 on macOS or Linux; queried symbols may be sent to external market-data services.] ## Skill Version(s): 2.6.0 (source: server release metadata, skill.yaml, and SKILL.md frontmatter) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
skill.yaml
name: stock-query
version: 2.6.0
author: asfamilybank
description: >
查询全球主要市场股票实时行情:A 股、港股、美股,以及 ETF、场外基金、主要指数,支持批量查询、自选市值计算与个股历史K线(含 MA5/MA10/MA20/MA60 均线)。
同时支持在用户显式指令下通过内联 bash 命令管理本地 portfolio.csv 自选股文件(增/删/改/查),文件仅含股票代码、名称、数量、自选价格,禁止存放账户凭证或密钥。
需要:curl(行情 API 请求)、iconv(GBK→UTF-8 转码)。
文件访问:仅限 portfolio.csv,优先查找 ~/.config/stock-query/portfolio.csv,其次兼容旧版安装目录,不访问其他系统文件。
网络访问:仅限 qt.gtimg.cn、hq.sinajs.cn、push2.eastmoney.com、web.ifzq.gtimg.cn、query1.finance.yahoo.com、fundgz.1234567.com.cn、api.fund.eastmoney.com 七个行情数据源。
Use when: 用户提到"查股价""查净值""行情""最新价""自选市值""实时价格""大盘""指数""港股""美股"等。
NOT for: 加密货币、期货、期权、外汇。
emoji: "📈"
requires:
bins: [curl, iconv, python3]
os: [darwin, linux]
license: MIT
repository: https://github.com/asfamilybank/stock-query
permissions:
- network # 用途:curl 调用行情 API(仅限 qt.gtimg.cn / hq.sinajs.cn / push2.eastmoney.com / web.ifzq.gtimg.cn / query1.finance.yahoo.com / fundgz.1234567.com.cn / api.fund.eastmoney.com)
- shell # 用途:执行 curl、iconv 转码、grep/awk 文件操作(仅操作 portfolio.csv,不执行任意命令)
entryPoint:
type: natural
prompt: |
你是一个全球股票行情查询助手。根据 SKILL.md 中的工作流程,
识别用户提供的标的代码(包括 A 股、港股、美股、ETF、基金及指数),
调用腾讯财经接口查询行情,A 股失败时回退新浪接口。
所有腾讯和新浪接口的 curl 响应必须通过 iconv -f GBK -t UTF-8 转码。
triggers:
keywords:
- "查股价"
- "查行情"
- "查指数"
- "大盘"
- "上证指数"
- "查净值"
- "最新价"
- "stock price"
- "实时价格"
- "自选市值"
- "基金估值"
- "港股"
- "美股"
- "纳斯达克"
- "道琼斯"
- "恒生指数"AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/asfamilybank/skills/stock-query",
"sourceUrl": "https://clawhub.ai/asfamilybank/skills/stock-query",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T23:22:02.476Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-asfamilybank-stock-query/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-asfamilybank-stock-query/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T23:22:02.476Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.9K downloads",
"href": "https://clawhub.ai/asfamilybank/stock-query",
"sourceUrl": "https://clawhub.ai/asfamilybank/stock-query",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T23:22:02.476Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.6.0",
"href": "https://clawhub.ai/asfamilybank/stock-query",
"sourceUrl": "https://clawhub.ai/asfamilybank/stock-query",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-09T01:55:57.805Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-asfamilybank-stock-query/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-asfamilybank-stock-query/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.6.0",
"description": "v2.6.0 brings major improvements and market data source enhancements: - 增加对 Yahoo Finance 实时数据接口支持(美股行情更加完善)。 - 权限声明中新增 Yahoo 数据源,并在所有相关表述中体现。 - help/version 输出更新为 v2.6.0 并精简 skill 元信息组织。 - 修复 detail_mode 下表格输出指令,需加 --detail 参数。 - 技术文档规范性与兼容性说明优化。",
"href": "https://clawhub.ai/asfamilybank/stock-query",
"sourceUrl": "https://clawhub.ai/asfamilybank/stock-query",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-09T01:55:57.805Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
