stock-diagnosis

v1.0.0

面向沪深京A股的单票综合诊断能力。适用于用户提出“这只股票整体怎么样”“是否值得继续持有/加仓/减仓”“当前风险和机会如何”等泛化问题时,返回结构化的Markdown诊断报告。每次仅分析一只股票,不处理港股/美股及多标的对比。触发核心条件:用户问法为概括性诊断,未指定某个单一技术指标或财务指标(如MACD、RSI...

0· 339·2 current·2 all-time
byFinancial AI Analyst@financial-ai-analyst

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for financial-ai-analyst/stock-diagnosis.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "stock-diagnosis" (financial-ai-analyst/stock-diagnosis) from ClawHub.
Skill page: https://clawhub.ai/financial-ai-analyst/stock-diagnosis
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: EM_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install stock-diagnosis

ClawHub CLI

Package manager switcher

npx clawhub@latest install stock-diagnosis
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (single A-share diagnostic) match the included script and SKILL.md. The skill requires one env var (EM_API_KEY) which the code uses as an API key when calling an Eastmoney ai-saas endpoint; no unrelated services, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to call the provided script or function, pass the user's natural-language question, and prefer the API-provided Markdown output. The runtime code only reads EM_API_KEY, performs an HTTP POST to the documented Eastmoney endpoint, and optionally writes the returned Markdown to a local file. It does not read other system files or additional environment variables.
Install Mechanism
There is no install spec; the skill is instruction-only with a small included Python script that relies only on the standard library. No external downloads, packages, or extracted archives are performed.
Credentials
Only EM_API_KEY is required and used. The key is sent in an HTTP header to ai-saas.eastmoney.com, which matches the claimed provider (Eastmoney). No additional secrets or unrelated credentials are requested.
Persistence & Privilege
always is false (no forced inclusion). The skill writes Markdown output to a local directory (miaoxiang/stock_diagnosis by default) when save_to_file is enabled, which is documented in SKILL.md. It does not modify other skills or system-wide configurations.
Assessment
This skill is coherent with its description, but before installing: (1) verify the EM_API_KEY you receive is from Eastmoney and has appropriate scope/expiration; (2) avoid pasting the key into chat logs and rotate it if exposed; (3) be aware the script will create and write .md files under a miaoxiang/stock_diagnosis directory by default—use the --no-save option or change output_dir if you don't want files written; (4) test with non-sensitive queries first and confirm the returned Markdown comes directly from the API as intended.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvEM_API_KEY
latestvk976fdcc6q1xj12mqa1r5gnq3h851bam
339downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

股票综合诊断

通过自然语言问句对单只A股进行综合分析,返回 Markdown 诊断报告,适用场景包括:

  • 个股整体判断(基本面 + 资金面 + 风险面)
  • 持仓决策参考(持有/减仓/止盈/观望)
  • 热点行情下的个股风险排查
  • 用户泛化问法的一站式诊断回答

密钥来源与安全说明

  • 本技能仅使用一个环境变量:EM_API_KEY
  • EM_API_KEY 由东方财富妙想服务(https://ai.eastmoney.com/mxClaw)签发,用于接口鉴权。
  • 在提供密钥前,请先确认密钥来源、可用范围、有效期及是否支持重置/撤销。
  • 禁止在代码、提示词、日志或输出文件中硬编码/明文暴露密钥。

功能范围

基础诊断能力

  • 输入自然语言问句,调用诊股接口生成结构化结论
  • 每次仅处理一只沪深京A股股票
  • 返回可读 Markdown 报告(优先提取 data.displayData
  • 支持将结果保存为本地 .md 文件,便于复盘追踪

触发规则(何时使用本技能)

  • 用户问题是笼统/概括性诊断:如“这只股票怎么样”“值得买吗”“该不该卖”
  • 问句中未明确要求计算单个技术指标或财务指标
  • 若上下文已明确股票实体,用户后续使用“它/这只股票”等代词继续提问,也应触发

不触发规则(何时不要使用本技能)

  • 用户明确点名具体指标计算:MACD、KDJ、RSI、布林带、ROE、PE 等
  • 用户要求多只股票横向对比(应走多标的分析类能力)
  • 用户咨询港股、美股或其他非A股市场

触发示例

触发(泛化诊断)不触发(指标定向)
丹化科技怎么样?丹化科技的MACD出现金叉了吗?
海康威视亏了怎么操作?海康威视当前市盈率是多少?
华尔泰值得投资吗?华尔泰的RSI是否超买?
全面分析一下中国平安中国平安的ROE趋势如何?

前提条件

1. 注册东方财富妙想账号

访问 https://ai.eastmoney.com/mxClaw 注册账号并获取 API Key。

2. 配置 Token

# macOS 添加到 ~/.zshrc,Linux 添加到 ~/.bashrc
export EM_API_KEY="your_api_key_here"

然后根据系统执行对应的命令:

macOS:

source ~/.zshrc

Linux:

source ~/.bashrc

快速开始

1. 命令行调用

python3 {baseDir}/scripts/get_data.py --query "东方财富股票咋样"

输出示例

Saved: /path/to/workspace/stock_diagnosis/stock_diagnosis_90bf169c.md
(随后输出 Markdown 诊断内容)

参数说明:

参数说明必填
--query用户原始自然语言问句✅(--query 或 stdin 二选一)
--no-save仅输出结果,不写入本地文件

2. 代码调用

import asyncio
from pathlib import Path
from scripts.get_data import diagnose_stock

async def main():
    result = await diagnose_stock(
        question="分析一下东方财富这只股票",
        output_dir=Path("workspace/stock_diagnosis"),
        save_to_file=True,
    )
    if "error" in result:
        print(result["error"])
    else:
        print(result["content"])
        if result.get("output_path"):
            print("已保存至:", result["output_path"])

asyncio.run(main())

输出规范

通过脚本或工具拿到诊股结果后,对用户的可见回复必须以接口返回的 Markdown 正文为主体,避免模型二次转述。仅当接口/脚本明确返回 error、或正文为空时,才用简短文字说明失败原因;禁止在失败时杜撰报告内容。

常见问题

错误:EM_API_KEY is required.
→ 需先配置 EM_API_KEY,请联系官网获取并手动配置。

为什么需要保持原始问句?
→ 诊股接口依赖用户自然语言上下文,建议避免改写导致语义偏移。

如何只看输出,不落盘?

python3 -m scripts.get_data --query "东方财富股票咋样" --no-save

合规说明

  • 诊股结果仅供参考,不构成投资建议,输出时应附风险提示。
  • 禁止在代码或提示词中硬编码账号 ID、会话 ID 或 token。
  • 环境变量按敏感信息处理,不在日志或回复中泄露。
  • 接口失败时不得编造结论,应返回明确错误或不确定性说明。

Comments

Loading comments...