← 返回 Skills 市场
financial-ai-analyst

fund-diagnosis

作者 Financial AI Analyst · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
345
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install fund-diagnosis
功能描述
面向公募基金的单基金综合诊断能力。适用于用户提出“这只基金怎么样”“适不适合继续持有”“风险和收益特征如何”等泛化问题时,返回结构化的Markdown诊断报告。每次仅分析一只基金,不处理多基金对比与量化建模。触发核心条件:用户问法为概括性诊断,未要求具体指标公式计算或回测建模。
使用说明 (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。
  • 环境变量按敏感信息处理,不在日志或回复中泄露。
  • 接口失败时不得编造结论,应返回明确错误或不确定性说明。
安全使用建议
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.
功能分析
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.
能力标签
requires-sensitive-credentials
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fund-diagnosis
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fund-diagnosis 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Publish 1.0.0
元数据
Slug fund-diagnosis
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

fund-diagnosis 是什么?

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

如何安装 fund-diagnosis?

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

fund-diagnosis 是免费的吗?

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

fund-diagnosis 支持哪些平台?

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

谁开发了 fund-diagnosis?

由 Financial AI Analyst(@financial-ai-analyst)开发并维护,当前版本 v1.0.0。

💬 留言讨论