← Back to Skills Marketplace
financial-ai-analyst

fund-diagnosis

by Financial AI Analyst · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
345
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install fund-diagnosis
Description
面向公募基金的单基金综合诊断能力。适用于用户提出“这只基金怎么样”“适不适合继续持有”“风险和收益特征如何”等泛化问题时,返回结构化的Markdown诊断报告。每次仅分析一只基金,不处理多基金对比与量化建模。触发核心条件:用户问法为概括性诊断,未要求具体指标公式计算或回测建模。
README (SKILL.md)

基金综合诊断

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

  • 基金整体判断(收益表现 + 风险特征 + 持仓结构)
  • 持有决策参考(继续持有/观望/调整仓位)
  • 波动市场中的基金风险排查
  • 用户泛化问法的一站式诊断回答

密钥来源与安全说明

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

功能范围

基础诊断能力

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

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

  • 用户问题是笼统/概括性诊断:如“这只基金怎么样”“值得继续持有吗”“风险大吗”
  • 问句中未明确要求具体指标计算、回测建模或程序化导出
  • 若上下文已明确基金实体,用户后续使用“它/这只基金”等代词继续提问,也应触发

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

  • 用户要求 Python 回测、组合优化、量化建模等高级计算任务
  • 用户明确要求导出净值明细、构建CSV或做数据工程处理
  • 用户要求多只基金横向对比(应走多标的分析类能力)

触发示例

触发(泛化诊断) 不触发(建模/工程)
华夏成长混合基金怎么样? 帮我用Python回测华夏成长混合基金策略
这只基金适合长期持有吗? 帮我建一个基金组合优化模型
它近期风险大吗? 把这只基金净值数据导出为CSV

前提条件

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/fund_diagnosis/fund_diagnosis_90bf169c.md
(随后输出 Markdown 诊断内容)

参数说明:

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

2. 代码调用

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

async def main():
    result = await diagnose_fund(
        question="华夏成长混合基金",
        output_dir=Path("workspace/fund_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。
  • 环境变量按敏感信息处理,不在日志或回复中泄露。
  • 接口失败时不得编造结论,应返回明确错误或不确定性说明。
Usage Guidance
This skill appears coherent, but note: it sends your natural-language question to EastMoney's fund-analysis API (https://ai.eastmoney.com/mxClaw / ai-saas.eastmoney.com), so do not include sensitive personal data in queries. Only provide an EM_API_KEY from a trusted source and verify its scope/expiration; you can avoid writing files by using the --no-save flag. If you run this in a shared or CI environment, ensure the EM_API_KEY is stored securely and can be revoked. Finally, confirm that using EastMoney's API complies with any applicable data or compliance rules you must follow.
Capability Analysis
Type: OpenClaw Skill Name: fund-diagnosis Version: 1.0.0 The skill is designed to provide fund diagnosis reports by querying a legitimate Eastmoney API endpoint (ai-saas.eastmoney.com). The implementation in `scripts/get_data.py` uses standard Python libraries, handles the required `EM_API_KEY` via environment variables as specified in `SKILL.md`, and contains no evidence of data exfiltration, malicious execution, or prompt injection attacks.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The skill is a single-fund diagnosis tool and only requires EM_API_KEY to call EastMoney's fund-analysis endpoint. The code posts the user question to https://ai-saas.eastmoney.com/proxy/.../fund-analysis and extracts displayData; no unrelated services or credentials are requested.
Instruction Scope
SKILL.md restricts scope to high-level diagnostic questions and explicitly forbids modeling/engineering tasks; runtime instructions and the script only read the question, call the API, extract content, and optionally write a .md file. The skill does not read unrelated files or env variables.
Install Mechanism
This is instruction-only with a bundled Python script and no install spec; nothing is downloaded or extracted at install time, which minimizes install-time risk.
Credentials
Only EM_API_KEY is required and is consistent with the stated EastMoney API usage. No other sensitive env vars or credentials are requested. The SKILL.md warns not to hard-code the key.
Persistence & Privilege
The skill is not always-enabled and does not modify other skills or system-wide settings. It may save outputs under a project subdirectory (miaoxiang/fund_diagnosis) when requested, which is a reasonable, limited persistence behavior.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install fund-diagnosis
  3. After installation, invoke the skill by name or use /fund-diagnosis
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Publish 1.0.0
Metadata
Slug fund-diagnosis
Version 1.0.0
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is fund-diagnosis?

面向公募基金的单基金综合诊断能力。适用于用户提出“这只基金怎么样”“适不适合继续持有”“风险和收益特征如何”等泛化问题时,返回结构化的Markdown诊断报告。每次仅分析一只基金,不处理多基金对比与量化建模。触发核心条件:用户问法为概括性诊断,未要求具体指标公式计算或回测建模。 It is an AI Agent Skill for Claude Code / OpenClaw, with 345 downloads so far.

How do I install fund-diagnosis?

Run "/install fund-diagnosis" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is fund-diagnosis free?

Yes, fund-diagnosis is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does fund-diagnosis support?

fund-diagnosis is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created fund-diagnosis?

It is built and maintained by Financial AI Analyst (@financial-ai-analyst); the current version is v1.0.0.

💬 Comments