← 返回 Skills 市场
sunnycpk

我的技能

作者 sunnycpk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
238
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install a-share-market-query
功能描述
获取股票行情与新闻情报并结构化输出。用户要求查询个股/指数、新闻追踪或多源交叉验证时调用。
使用说明 (SKILL.md)

OpenClaw Market Intel

目标

在用户查询股票、指数或市场主题时,统一拉取多源行情与新闻/搜索情报,输出可执行、可追溯、可降级的结构化结论。

何时调用

  • 用户要查个股/指数最新行情与涨跌变化
  • 用户要看相关新闻、舆情、催化与风险点
  • 用户要求多源交叉验证,避免单源偏差
  • 用户要快速生成“行情 + 新闻 + 风险提示”简报
  • 用户明确要求输出策略研判(如趋势、风控、仓位倾向)

触发判定

  • 用户明确“只查信息/不要建议”时,使用 --mode info
  • 用户要求“给策略/给判断/给计划”时,使用 --mode strategy
  • 用户未说明时,默认先输出信息版,再提示可切换策略版

数据源

行情数据源

  • Eastmoney(A股/指数优先兜底)
  • YFinance
  • AkShare
  • Tushare
  • Pytdx
  • Baostock

新闻/搜索数据源

  • Tavily
  • SerpAPI
  • Brave
  • Bocha
  • MiniMax
  • Local Fallback(自动兜底,不阻塞主流程)

AI 分析通道(可选)

  • AIHubMix
  • Gemini
  • OpenAI 兼容
  • DeepSeek
  • 通义千问
  • Claude

执行流程

  1. 识别用户意图:标的、市场(A/H/US)、时间范围、关注点
  2. 行情采集:优先多源查询,支持失败回退
  3. 新闻采集:优先用户指定源,未配置则跳过并降级
  4. 情报融合:结构化汇总价格、涨跌、均线、事件与风险
  5. 结论输出:一句话结论、关键风险、数据源与时间戳
  6. 策略模式:补充策略类型、信号、动作与风险等级

执行脚本

  • 脚本路径:{baseDir}/market_intel.py
  • 运行环境:Python 3

命令清单

  • quote:查询多源最新行情
  • history:查询多源历史K线
  • news:查询多源新闻/搜索
  • intel:一键执行行情 + 历史 + 新闻,支持信息/策略双模式

快速示例

python3 {baseDir}/market_intel.py quote --symbol 欧菲光 --sources eastmoney,yfinance
python3 {baseDir}/market_intel.py quote --symbol 中国铝业 --sources yfinance
python3 {baseDir}/market_intel.py news --query "中国铝业 业绩" --sources minimax --max-results 3
python3 {baseDir}/market_intel.py intel --symbol 中国铝业 --query "中国铝业" --mode strategy --strategy cn_review --market-sources yfinance --news-sources minimax

参数说明

  • --mode info:仅返回事实数据(行情/历史/新闻)
  • --mode strategy:在事实数据基础上增加策略研判
  • --strategyautoma_crossma_trendbias_guardwavecn_reviewus_regime
  • --bias-threshold:乖离率策略阈值,默认 5.0

环境变量

  • TAVILY_API_KEY
  • SERPAPI_API_KEY
  • BRAVE_API_KEY
  • BOCHA_BASE_URLBOCHA_API_KEY
  • MINIMAX_BASE_URLMINIMAX_API_KEY
  • TUSHARE_TOKEN
  • MARKET_INTEL_HTTP_RETRIES(默认 3)
  • MARKET_INTEL_HTTP_BACKOFF(默认 0.8)

稳定性与降级策略

  • 每个数据源独立返回 ok/error,单源失败不影响整体结构输出
  • 行情在关键源不可用时自动执行回退,输出 fallback_source_used
  • 新闻源未配置时会标记“已跳过”,全部不可用时自动回退 local_fallback
  • 保留统一 JSON 结构,避免下游消费失败

输出结构

基础字段

  • symbol / query / timestamp / type
  • results.\x3Csource>.ok
  • results.\x3Csource>.data | error

策略字段(mode=strategy

  • strategy_used
  • signals
  • summary
  • action
  • risk_level
  • metrics
  • data_basis

输出模板

## 市场情报简报
- 标的:\x3C代码/名称>(\x3C市场>)
- 时间:\x3C本地时间>
- 一句话结论:\x3C结论>

- 行情概览:
  - 最新价:\x3Cprice>
  - 涨跌幅:\x3Cpct>
  - MA5/10/20:\x3Cvalues>
  - 量能变化:\x3Cvolume_trend>

- 新闻与事件:
  - 主要事件 1:\x3Ctitle + source + time>
  - 主要事件 2:\x3Ctitle + source + time>
  - 舆情倾向:\x3C偏多/中性/偏空>

- 关键位与纪律:
  - 支撑/压力:\x3Clevels>
  - 乖离率风险:\x3Clow/medium/high>
  - 操作检查:\x3C满足/注意/不满足>

- 数据源:
  - 行情:\x3Csource_a>, \x3Csource_b>
  - 新闻:\x3Csource_c>, \x3Csource_d>

- 免责声明:仅供参考,不构成投资建议。

规则

  • 默认多源交叉,不给单源绝对结论
  • 明确区分事实与推断
  • 若源间冲突,优先报告冲突并降低置信度
  • 缺少关键数据时标注“数据不足”
  • 输出避免夸张承诺,不使用“稳赚”等措辞
安全使用建议
This skill appears to do what it says (fetch market data and news), but note two issues before installing: (1) The published registry metadata does not list the many API keys and tokens the script actually uses — check SKILL.md and provide only keys for services you trust (Tavily, Serpapi, Brave, Bocha, Minimax, Tushare, etc.). The script will attempt outbound HTTP requests to those provider endpoints. (2) The script creates a local cache file (.cache/market_intel_cache.json) in the skill folder, so it will write to disk. Recommended steps: review market_intel.py in full to confirm there are no unexpected hardcoded endpoints, run the skill in a sandboxed environment or with limited network access if you are unsure, and ask the skill publisher to update the registry manifest to explicitly declare required environment variables and justify each external API endpoint.
功能分析
Type: OpenClaw Skill Name: a-share-market-query Version: 1.0.0 The skill bundle is a legitimate financial analysis tool designed to aggregate stock market data and news from multiple sources (e.g., YFinance, Eastmoney, Tavily). The Python script `market_intel.py` implements standard API request patterns, local caching, and technical analysis logic (Moving Averages, Bias) without any evidence of malicious intent, data exfiltration, or unauthorized command execution. The `SKILL.md` file provides clear, safe instructions for the AI agent to interact with the script.
能力评估
Purpose & Capability
The name/description (market quotes + news intelligence) align with the included Python script and listed data sources (Eastmoney, YFinance, Tushare, Tavily, SerpAPI, etc.). However, the registry metadata declares no required environment variables while SKILL.md and the code require multiple API keys and tokens; that mismatch is unexpected and should be clarified.
Instruction Scope
SKILL.md instructs the agent to run the included Python script and use it to fetch quotes, history, and news. The runtime instructions stay within the advertised scope (data collection, aggregation, structured output) and do not request unrelated system files or broad context collection.
Install Mechanism
There is no installer or external download; this is an instruction-only skill plus a bundled Python file. That is low install risk (nothing fetched/installed at runtime beyond standard HTTP calls made by the script).
Credentials
SKILL.md and the code reference many environment variables/API keys (TAVILY_API_KEY, SERPAPI_API_KEY, BRAVE_API_KEY, BOCHA/MINIMAX base URLs and keys, TUSHARE_TOKEN, etc.). Those credentials are relevant to the data sources — but the registry metadata does not declare them. The discrepancy means a user may be unaware they must provide multiple potentially sensitive API keys; the skill will also raise runtime errors if some required keys are missing for certain sources.
Persistence & Privilege
The skill is not always-enabled and does not claim elevated privileges. It writes a local cache file under .cache/market_intel_cache.json in the skill directory (expected for caching but it does persist data to disk). It does not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install a-share-market-query
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /a-share-market-query 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
1.获取股票行情与新闻信息,多信息源交叉验证。 2.参考十多种技术分析策略,输出对股票的分析。
元数据
Slug a-share-market-query
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

我的技能 是什么?

获取股票行情与新闻情报并结构化输出。用户要求查询个股/指数、新闻追踪或多源交叉验证时调用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 238 次。

如何安装 我的技能?

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

我的技能 是免费的吗?

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

我的技能 支持哪些平台?

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

谁开发了 我的技能?

由 sunnycpk(@sunnycpk)开发并维护,当前版本 v1.0.0。

💬 留言讨论