← 返回 Skills 市场
jiashuoji838-afk

fund-daily

作者 jiashuoji838-afk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
261
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fund-daily
功能描述
自动生成基金日报,包含持仓基金数据、估值涨跌、单位净值和财经要闻。支持定时任务(每天下午 4 点自动发送),可配置基金代码列表。输出格式:Telegram 消息 + Word 文档。
使用说明 (SKILL.md)

基金日报 Skill

自动生成基金日报,包含基金数据、估值、净值和财经新闻。

核心功能

✅ 自动获取基金数据

  • 单位净值
  • 估值涨跌
  • 数据日期
  • 交易日判断

✅ 财经新闻聚合

  • 东方财富
  • 雪球
  • 富途牛牛
  • 财联社等

✅ 定时任务

  • 默认每天下午 4:00 自动运行
  • 可配置运行时间
  • 支持手动触发

✅ 多格式输出

  • Telegram 消息(文字 + 表情)
  • Word 文档(表格 + 分析)

配置方法

1. 配置基金代码

编辑 fund_daily.py,修改 FUND_CODES 列表:

FUND_CODES = ['001407', '017091', '050025']  # 你的基金代码

2. 配置 Telegram Bot

编辑 fund_daily.py,修改 Telegram 配置:

TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID"

3. 设置定时任务

Windows 任务计划程序:

schtasks /Create /TN "基金日报" /TR "python C:\path	o\fund_daily.py" /SC DAILY /ST 16:00 /F

Linux Cron:

# 每天下午 4 点
0 16 * * * python /path/to/fund_daily.py

使用方法

手动运行

python skills/fund-daily/fund_daily.py

自动运行

定时任务会在每天下午 4:00 自动执行。


输出示例

Telegram 消息

━━━━━━━━━━━━━━━━━━
   📊 最新基金日报
   2026 年 03 月 16 日
━━━━━━━━━━━━━━━━━━
📅 数据日期:2026-03-13 (净值未公布)

【景顺长城稳健回报混合 C】
├ 代码:001407
├ 估值涨跌:+0.75%
└ 单位净值:4.3300

【景顺长城纳斯达克科技 ETF 联接】
├ 代码:017091
├ 估值涨跌:-0.88%
└ 单位净值:2.2422

━━━━━━━━━━━━━━━━━━
📰 财经要闻
━━━━━━━━━━━━━━━━━━

1. 3 月 16 日证券报纸头条摘要
   📌 东方财富
   🔗 链接

...

━━━━━━━━━━━━━━━━━━
注:交易日 15:00 前显示估值,20:00 后显示净值
━━━━━━━━━━━━━━━━━━

Word 文档

  • 📊 基金数据表格
  • 📈 走势分析
  • 📰 财经新闻
  • 📝 总结点评

数据来源

数据类型 来源 说明
基金净值 天天基金网 实时 API
基金估值 天天基金网 盘中实时
财经新闻 news-market skill 多个财经媒体

交易日规则

净值更新时间

时间 状态 显示数据
交易日 9:30-15:00 交易中 实时估值
交易日 15:00-20:00 交易结束 上一交易日净值
交易日 20:00 后 净值公布 当日实际净值
非交易日 休市 上一交易日净值

节假日处理

自动排除:

  • 周末(周六、周日)
  • 法定节假日(元旦、春节、清明、劳动节、端午、中秋、国庆)
  • 调休工作日(自动识别)

文件结构

skills/fund-daily/
├── SKILL.md              # 技能说明(本文件)
├── fund_daily.py         # 主程序
├── requirements.txt      # Python 依赖
└── README.md            # 使用文档

依赖安装

pip install requests python-docx

常见问题

Q: 为什么净值数据不准确?

A: QDII 基金(投资海外)净值公布比普通基金晚 1-2 天,这是正常现象。

Q: 如何修改发送时间?

A: 修改定时任务配置即可。Windows 用 schtasks /Change,Linux 修改 crontab。

Q: 可以添加更多基金吗?

A: 可以,在 FUND_CODES 列表中添加基金代码即可。

Q: 不想发 Telegram 可以吗?

A: 可以,注释掉 Telegram 相关代码,只生成 Word 文档。


更新日志

v1.0.0 (2026-03-16)

  • ✅ 初始版本
  • ✅ 基金数据获取
  • ✅ 财经新闻聚合
  • ✅ Telegram 推送
  • ✅ Word 文档生成
  • ✅ 定时任务支持

License

MIT License


作者

Created by Joshua for OpenClaw.

安全使用建议
Do not run this script as-is. Before installing/running: (1) Replace the hard-coded TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID with your own values or make them configurable via environment variables; do not leave the author's token in place — it will send your fund data to that account. (2) Remove or change the absolute path used in get_finance_news that calls a local script (subprocess.run on C:\Users\ZhuanZ\...); instead use a configurable command or a network API you control. (3) Inspect all subprocess.run calls and any file paths to ensure they won't execute unexpected local code. (4) Run the script in a sandboxed environment (or with network disabled) first and test with dummy tokens/chat IDs. (5) If you don't trust the included author token/chat or the hardcoded path, ask the author to explain why those are embedded and provide a version that only uses user-supplied credentials and configurable news sources.
功能分析
Type: OpenClaw Skill Name: fund-daily Version: 1.0.0 The skill contains hardcoded, live Telegram Bot credentials and a specific Chat ID (7333732220) in `fund_daily.py`, which would result in the user's financial data being exfiltrated to the author if not manually changed. Additionally, the script uses `subprocess.run` to execute a Python file at a hardcoded absolute path (C:\Users\ZhuanZ\...) and attempts to save documents to a specific local directory (D:\System\Desktop\), indicating a high risk of execution failure or unauthorized local file interaction. While these may be artifacts of a personal script, the inclusion of active credentials and rigid local paths is highly irregular for a shared skill bundle.
能力评估
Purpose & Capability
The skill's stated purpose is to fetch fund data, aggregate news, produce a Word doc, and send Telegram messages — which matches most code. However, it hard-codes a Telegram bot token and chat ID (sending data to the author's bot/chat) instead of using user-provided credentials or environment variables, and it assumes/executes a local news-market script at a fixed absolute path. Requiring access to another skill's local script is not proportional to the stated functionality for an end-user unless clearly documented and configurable.
Instruction Scope
SKILL.md describes using a 'news-market' skill for news, but the runtime code directly runs a Python script at an absolute path (C:\Users\ZhuanZ\.openclaw\workspace\skills\news-market\scripts\news_market.py) via subprocess.run. That grants the skill the ability to execute arbitrary code on the host if that file exists, and the instructions do not tell users to review or change that path. The code also contains a hard-coded Telegram token/chat ID which results in automatic data transmission to an external Telegram endpoint belonging to the author unless changed.
Install Mechanism
This is instruction-only with an included requirements.txt (requests, python-docx). No download-from-URL or archive extract steps. The install approach (pip install -r requirements.txt) is typical and proportionate.
Credentials
SKILL.md declares no required env vars, but the shipped code embeds sensitive-looking Telegram BOT token and CHAT_ID values. Embedding someone else's bot token/chat ID is inappropriate: it can exfiltrate generated fund/news data to the author's Telegram. The skill does not provide a secure or documented mechanism (e.g., env vars) to supply user-owned credentials instead.
Persistence & Privilege
The skill does not request always:true and does not modify other skills' configs. However, by executing a local script (news-market) it may access other skill code or local files when run, which increases its runtime privileges relative to a purely self-contained script.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fund-daily
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fund-daily 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of fund-daily. - Automatically generates daily fund reports with holdings data, valuation, net value, and financial news. - Supports scheduled tasks (runs every day at 4 pm by default), with configurable fund codes and send time. - Outputs reports as Telegram messages (with formatting and emojis) and Word documents (with tables and analysis). - Aggregates financial news from popular sources. - Handles trading/non-trading days and fund net value update timings.
元数据
Slug fund-daily
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

fund-daily 是什么?

自动生成基金日报,包含持仓基金数据、估值涨跌、单位净值和财经要闻。支持定时任务(每天下午 4 点自动发送),可配置基金代码列表。输出格式:Telegram 消息 + Word 文档。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 261 次。

如何安装 fund-daily?

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

fund-daily 是免费的吗?

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

fund-daily 支持哪些平台?

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

谁开发了 fund-daily?

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

💬 留言讨论