← 返回 Skills 市场
asfamilybank

Stock Query

作者 asfamilybank · GitHub ↗ · v2.6.0 · MIT-0
cross-platform ✓ 安全检测通过
736
总下载
1
收藏
2
当前安装
29
版本数
在 OpenClaw 中安装
/install stock-query
功能描述
查询全球股票实时行情(A 股、港股、美股)、ETF、场外基金、指数,支持批量查询、历史K线(含均线)与自选股管理。 TRIGGER when: 用户查询股价/行情/净值/历史K线/自选盈亏/大盘指数时。NOT for: 加密货币、期货、期权、外汇。
安全使用建议
This skill appears coherent for querying market data: it runs bundled Bash scripts that curl a set of documented market-data hosts and reads/writes a single portfolio.csv. Before installing, review the bundled scripts if you wish (they are included) and ensure portfolio.csv does not contain any passwords, API keys, or other secrets (the skill explicitly warns about this). If you are concerned about network access, note the skill contacts specific public endpoints (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). Consider running it in a restricted environment or verifying network traffic if you want to audit requests.
功能分析
Type: OpenClaw Skill Name: stock-query Version: 2.6.0 The stock-query skill is a well-structured tool for retrieving global financial data and managing a local portfolio. It uses shell scripts (sq.sh, fmt.sh) to fetch data from legitimate sources like Tencent, Sina, and Yahoo Finance, and processes it using Python for formatting and technical analysis (Moving Averages). While it employs a 'silent execution' instruction to the AI agent to minimize output clutter and requests shell/network permissions, these actions are strictly scoped to its stated purpose of stock querying and local CSV management (portfolio.csv), with no evidence of data exfiltration or malicious intent.
能力评估
Purpose & Capability
Name/description (stock quotes, history, watchlist) match the included files and declared requirements (curl, iconv, python3). The scripts fetch market data and format it; no unrelated credentials, binaries, or services are requested.
Instruction Scope
Runtime instructions require invoking included bash scripts which call curl/iconv and read/write a portfolio.csv. The skill explicitly documents the allowed remote hosts and prohibits storing secrets in portfolio.csv. One minor note: the file lookup falls back to several legacy skill install directories (~/.openclaw, ~/.claude, ~/.agents) in addition to ~/.config/stock-query — this is reasonable for compatibility but means the script will inspect those paths when locating portfolio.csv.
Install Mechanism
No install spec or external downloads; code is bundled with the skill. No arbitrary remote installers or URL-based extracts are used.
Credentials
The skill requests no environment variables or credentials. Its network and shell usage is proportional to fetching and formatting market data. The README/skill.yaml document the expected endpoints and limit network scope to specific market APIs.
Persistence & Privilege
always:false and user-invocable:true. The skill does not request persistent elevated privileges or modify other skills' configs. It only reads/writes its own portfolio.csv when explicitly commanded.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install stock-query
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /stock-query 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.6.0
v2.6.0 brings major improvements and market data source enhancements: - 增加对 Yahoo Finance 实时数据接口支持(美股行情更加完善)。 - 权限声明中新增 Yahoo 数据源,并在所有相关表述中体现。 - help/version 输出更新为 v2.6.0 并精简 skill 元信息组织。 - 修复 detail_mode 下表格输出指令,需加 --detail 参数。 - 技术文档规范性与兼容性说明优化。
v2.5.1
stock-query v2.5.1 is a documentation refinement release. - 更新 SKILL.md,优化描述与指引,精简了前言说明,更突出自动触发范围与核心能力。 - version/help 输出的版本号由 v2.5.0 升级为 v2.5.1。 - 未变更底层功能及流程,主要聚焦于文档及元数据更正。
v2.5.0
- 重要更新:自选股 portfolio.csv 文件查找逻辑调整为优先支持 ~/.config/stock-query/portfolio.csv,兼容多个旧路径。 - 删除对 scripts/portfolio.sh 的依赖,精简和统一 portfolio 文件相关操作。 - 更新所有相关文档,用法指引与引导说明覆盖新配置目录和模板复制方式。 - 保持所有行情源和行情查询、表格输出流程不变,兼容所有已有功能和调用语义。
v2.4.1
stock-query v2.4.1 - Portfolio(自选股文件)相关字段统一调整为“数量/自选价格”,规范字段命名,文档/帮助/模板均已更新 - 优化描述和文档,展示中“持仓”统一表述为“数量”,“成本价”改为“自选价格” - 帮助信息、示例表格等同步更新字段表述 - 版本号升级,相关内容同步显示为 v2.4.1
v2.4.0
**新增重大功能:支持个股历史K线/历史行情查询,并新增格式化脚本提供更美观的人类可读表格输出。** - 新增“Command 3”命令体系,可直接查询A股、港股、美股等各类标的的日K、周K等历史行情/走势/K线数据。 - 行情查询(`Command 2`)全面支持`--format`参数,调用新引入的`scripts/fmt.sh`脚本输出Markdown表格,显示效果更佳,CJK对齐、均线展示,emoji区分涨跌色系无误。 - 增加历史行情/走势相关触发词识别(历史/K线/日K/周K等),快捷查询近30日等区间的价格明细。 - 行情与历史数据网络权限扩展,涵盖`web.ifzq.gtimg.cn`、`push2his.eastmoney.com`等历史数据源。 - 只允许通过Bash脚本和
v2.3.8
stock-query v2.3.8 is a minor update. - 更新版本号至 2.3.8,版本/帮助命令将同步返回新版本号。 - 移除未使用的 scripts/query_price.sh 文件,统一脚本调用入口。 - 文档(SKILL.md)中相关版本号和命令帮助展示同步调整为 2.3.8。 - 其他功能、调用和接口未变。
v2.3.7
- Version updated to 2.3.7 - 文档调整:version 和 help 输出中的版本号修订为 2.3.7 - SKILL.md 文件访问声明补充:明确 portfolio.csv 默认路径细节 - 技术说明补充:pfile 命令输出说明更新,去除 PATH_REJECTED 分支描述 - 无业务逻辑变更,无新增功能或接口调整
v2.3.6
**stock-query v2.3.6 — Changelog** - New: Added support for a new configuration file (`skill.yaml`). - File access now strictly fixed to the default installation directory (no environment variable for path). - Security: Commands are rejected if file paths contain token/secret/.ssh and similar keywords. - Shell command requirements clarified: only minimal tools (`curl`, `iconv`, `grep`, `awk`, `mktemp`) are used and only on `portfolio.csv`. - Expanded SKILL.md with clearer permission, file access, and network source documentation. - Description improved for clarity; no functional change to market or data source support.
v2.3.5
stock-query v2.3.5 - Help/version信息中的版本号更新为 2.3.5。 - 资源文件 portfolio.csv 移至 assets 目录(assets/portfolio.csv),原 examples/portfolio.csv 删除。
v2.3.4
stock-query v2.3.4 introduces strict separation between skill output and internal process info. - Enforces that process/logging output is never shown to users, only final tables or errors (Claude output constraint clarified). - `scripts/sq.sh` now outputs only structured JSON to stdout, and logs/errors to stderr. - Portfolio path errors now include explicit "PATH_REJECTED" code for credential keyword detection. - Updated version references and help output to v2.3.4. - Removed obsolete manifest files (`clawhub.json`, `skill.yaml`).
v2.3.3
**Summary: Switched query CLI from scripts/sq to scripts/sq.sh and added project metadata.** - Replaced main query CLI from `scripts/sq` to `scripts/sq.sh` for all command invocations and documentation. - Added three new files: `clawhub.json` (metadata), `scripts/query_price.sh`, and `scripts/sq.sh`. - Updated examples, permissions, and workflow details to use the new script path (`sq.sh`). - Bumped version to 2.3.3 in documentation and help outputs.
v2.3.2
- 更新版本号至 2.3.2。 - 所有用户帮助、版本输出中的版本号均同步为 2.3.2,无其他功能或行为变更。
v2.3.1
**stock-query v2.3.1 — Changelog** - 新增 `scripts/portfolio.sh`,优化自选股/持仓文件管理逻辑。 - 行情核心脚本更名为 `scripts/sq`,所有行情相关 shell 操作统一通过该入口调用。 - 精简和调整权限、文件访问及依赖声明,现明确仅允许通过 Bash 工具和官方行情脚本操作。 - 技能文档全面精简,指令路由和查询模块分工更明确,增加“详细模式”输出宽表说明。 - 移除旧版顶层 `portfolio.sh`,升级 portfolio 相关操作实现。
v2.2.1
stock-query v2.2.1 — 强化隐私体验,隐藏所有中间推理 - 严格禁止在用户回复中出现任何市场判断、数据流转、接口切换等过程信息,仅输出最终行情。 - 全文规范描述“静默执行原则”:对执行流程、推理、不透明数据切换等完全不对用户暴露。 - Meta命令(version/help)示例输出版本号同步至 2.2.1。 - 帮助文档与行为细节保持与上一版一致。
v2.2.0
**港股代码兼容大幅升级,支持输入“700”“9988”等自动补全为“00700”“09988”。A股000xxx指数判定修正,同时增加新依赖源并细化权限。** - 港股代码输入支持少于5位自动补零,无需手输前置零(如“700”自动转“00700”) - 沪市000xxx指数区分优化:根据白名单快速判定,避免歧义(如000001自动识别上证指数/平安银行) - 新增数据接口 `push2.eastmoney.com`,扩展后备查询能力 - 权限表明确加入 `grep`、`awk` 命令及新 API 域名,细化网络和 Shell 权限声明 - 帮助文档及版本号同步至 2.2.0
v2.1.2
stock-query v2.1.2 introduces enhanced permission and file safety notes. - 新增权限声明和操作范围说明,提高对 network、shell 等敏感操作的规范描述。 - 明确 portfolio.csv 仅限持仓基础数据,禁止存储账号/Token 等敏感信息。 - 列出技能将自动触发与不会自动触发(如 portfolio 文件操作)的场景。 - version/help 输出版本同步更新至 2.1.2。 - 其他功能及核心逻辑保持不变。
v2.1.1
- 新增支持自动触发(不再仅限斜杠命令),可根据用户上下文需求直接调用股价/净值查询。 - help/version 输出内容已更新为 2.1.1,描述略有调整。 - description 增加 “TRIGGER when” 行,明确触发场景,便于集成。 - 其余功能和接口未作更改。
v2.1.0
**新增组合(持仓)文件操作,丰富自选股/持仓管理:** - 新增 examples/portfolio.csv 示例文件及 portfolio.sh 脚本,支持批量自选股或持仓导入、增删、查阅等管理操作。 - 在交互流程中,新增“Command 3:Portfolio 文件管理”,可通过自然语言或命令操作自选股/持仓(如添加、删除、查看等),并与行情查询流程解耦。 - 优化 meta 指令(version/help)识别逻辑,实现更准确更优先的命令路由。 - 基金净值查询补充新鲜度检测,防止引用滞后估值。 - 部分查询表格字段扩展(如 52周高/低、成交额、换手率等),详细模式可输出更多行情数据。
v2.0.5
stock-query v2.0.5 changelog: - 文档简介部分增加 curl、iconv 依赖说明,更突出前置依赖要求 - 移除无实际变化的内容,使文档更加简洁清晰 - 其余功能及用法保持不变
v2.0.4
- 新增“前置依赖”说明,明确需安装 curl 与 iconv 两个命令行工具。 - help/version 输出中的版本号已更新为 v2.0.4。 - 其余内容与前一版本一致,无接口与功能调整。
元数据
Slug stock-query
版本 2.6.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 29
常见问题

Stock Query 是什么?

查询全球股票实时行情(A 股、港股、美股)、ETF、场外基金、指数,支持批量查询、历史K线(含均线)与自选股管理。 TRIGGER when: 用户查询股价/行情/净值/历史K线/自选盈亏/大盘指数时。NOT for: 加密货币、期货、期权、外汇。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 736 次。

如何安装 Stock Query?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install stock-query」即可一键安装,无需额外配置。

Stock Query 是免费的吗?

是的,Stock Query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Stock Query 支持哪些平台?

Stock Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Stock Query?

由 asfamilybank(@asfamilybank)开发并维护,当前版本 v2.6.0。

💬 留言讨论