← Back to Skills Marketplace
shoukuan

A Share Daily Report

by Shoukuan · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
604
Downloads
2
Stars
5
Active Installs
3
Versions
Install in OpenClaw
/install a-share-daily-report
Description
生成专业级 A股早报/晚报,包含大盘指数行情、市场情绪、K线走势图、 行业/概念板块排行、个股涨跌榜、主题新闻追踪、综合分析, 输出 Markdown + PNG 图表 + PDF。数据源为东方财富公开 API、 同花顺公开板块页及海外公开行情接口。 Use when asked to create daily...
README (SKILL.md)

A股日报生成器 - Skill 使用说明

Skill ID: a-share-daily-report 版本: v1.0 维护者: 阿宽 最后更新: 2026-04-02


概述

本 Skill 提供 A 股日报自动生成能力,通过 OpenClaw 平台一键生成专业的市场早报和晚报。

适用场景

  • 每日交易前的市场预判(早报,建议 6:00-9:00 生成)
  • 收盘后的复盘总结(晚报,建议 15:30-18:00 生成)
  • 量化策略的辅助决策支持

核心能力

1. 生成早报(盘前预测)

./venv/bin/python3 -m skills.a-share-daily-report.scripts.generate_report \
  --mode morning \
  [--date YYYY-MM-DD] \
  [--publish]

输出reports/morning/A股早报-YYYYMMDD.md

内容

  • 30 秒总览(一句话总结 + 核心机会 + 风险提示)
  • 自选股预测(基于昨日行情 + 均线/量比技术分析)
  • 核心决策(交易策略 + 关注标的含介入区间/止损 + 凯利公式仓位)
  • 主要指数行情
  • 美股市场 + 期指数据
  • 行业资金流向
  • 国内要闻(分级新闻)

2. 生成晚报(盘后复盘)

./venv/bin/python3 -m skills.a-share-daily-report.scripts.generate_report \
  --mode evening \
  [--date YYYY-MM-DD] \
  [--publish]

输出reports/evening/A股晚报-YYYYMMDD.md

内容

  • 30 秒总览(市场走势 + 情绪 + 资金一句话总结 + 明日展望)
  • 自选股复盘(涨跌统计 + 最佳/最差表现 + 明日策略)
  • 市场全景(情绪评分 0-100)
  • 盘面深度(炸板率、涨跌幅统计)
  • 主要指数 + 全球资产
  • 技术面分析(RSI、MACD、支撑阻力)
  • 综合分析(大盘走势、量能、风格分化)
  • 主题投资追踪(算力/半导体/新能源等 8 大主题)
  • 板块全景 + 龙虎榜
  • 今日要闻

3. 飞书发布(可选)

--publish  # 启用发布到飞书

前置配置

在项目根目录 .env 中配置:

FEISHU_NOTIFY_OPEN_ID=ou_xxxxxxxxxxxx   # 飞书用户 open_id
MX_APIKEY=mkt_xxxxxxxx                   # mx-data API 密钥(可选)

或在 config/config.yaml 中配置:

publish:
  feishu_doc:
    enabled: true
    folder_token: ""          # 文件夹 token(可选)
  feishu_message:
    enabled: true
    target_chat_id: "ou_xxxxxxxxxxxx"

发布结果

  • 自动创建飞书云文档
  • 发送消息通知(含文档链接)
  • OpenClaw 环境自动使用真实 API,其他环境使用模拟实现

参数说明

参数 类型 必填 默认值 说明
--mode str morning morning(早报)或 evening(晚报)
--date str 今天 报告日期,格式 YYYY-MM-DD
--publish flag False 是否发布到飞书
--config str 默认路径 自定义配置文件路径
--outdir str 配置值 覆盖输出目录

配置文件

config/config.yaml

# 数据源配置
data_sources:
  akshare:          # 主数据源:A 股指数/板块/情绪/龙虎榜
    enabled: true
    cache_ttl: 3600
  tushare:          # 备用:资金流向
    enabled: true
  mx_data:          # 期指数据(A50、沪深300)
    enabled: true
    api_key_env: "MX_APIKEY"
  sina:             # 新浪财经
    enabled: true
    cache_ttl: 1800

# 输出配置
output:
  base_dir: "/Users/yibiao/Desktop/openclaw_doc/财经日报"
  morning_subdir: "morning"
  evening_subdir: "evening"

# 自选股路径
watchlist:
  path: "config/watchlist.yaml"

# 发布配置
publish:
  feishu_doc:
    enabled: true
    folder_token: ""
  feishu_message:
    enabled: false
    target_chat_id: ""
  pdf:
    enabled: false
    engine: "wkhtmltopdf"

config/watchlist.yaml

watchlist:
  - code: "002594.SZ"
    name: "比亚迪"
    note: "新能源车龙头"
  - code: "300308.SZ"
    name: "中际旭创"
    note: "光模块龙头"

格式xxxxxx.SZ(深市)、xxxxxx.SH(沪市)。建议 3-5 只核心持仓。


测试

# 全部测试
./venv/bin/python3 -m pytest skills/a-share-daily-report/tests/ -v

# 分析模块(10 用例)
./venv/bin/python3 -m pytest skills/a-share-daily-report/tests/test_analyzer.py -v

# 渲染模块(5 用例)
./venv/bin/python3 -m pytest skills/a-share-daily-report/tests/test_renderer.py -v

架构

generate_report.py (主控制器)
  ├── DataFetcher (数据采集, 1600+ 行)
  │   ├── get_index_data()             # 指数行情
  │   ├── get_market_sentiment()       # 市场情绪
  │   ├── get_money_flow()             # 资金流向
  │   ├── get_sector_data()            # 板块数据
  │   ├── get_lhb_data()               # 龙虎榜
  │   ├── get_us_market()              # 美股市场
  │   ├── get_futures_data()           # 期指数据
  │   ├── get_news()                   # 新闻
  │   ├── get_market_overview()        # 市场全景
  │   ├── get_market_depth()           # 盘面深度
  │   ├── get_major_indices()          # 主要指数
  │   ├── get_global_assets()          # 全球资产
  │   ├── get_industry_fund_flow()     # 行业资金流
  │   └── get_watchlist_performance()  # 自选股行情
  │
  ├── Analyzer (分析引擎, 978 行)
  │   ├── generate_summary()           # 30 秒总览
  │   ├── analyze_watchlist_*()        # 自选股分析
  │   ├── generate_trading_strategy()  # 交易策略
  │   ├── analyze_focus_stocks()       # 关注标的
  │   ├── suggest_position()           # 凯利公式仓位
  │   ├── analyze_market_overview()    # 市场全景
  │   ├── analyze_technical_analysis() # 技术面分析
  │   ├── analyze_comprehensive()      # 综合分析
  │   ├── analyze_theme_tracking()     # 主题投资追踪
  │   └── classify_news()             # 新闻分级
  │
  ├── Renderer (报告渲染, 878 行)
  │   ├── render_morning_report()
  │   └── render_evening_report()
  │
  └── Publisher (发布器)
      ├── publish_morning_report()
      └── publish_evening_report()

数据流:采集 → 分析 → 渲染 → 保存 →(可选)发布

降级策略:主源失败 → 备用源 → Mock 数据。所有源失败时仍可生成报告。


数据源

数据项 主源 备用源 说明
指数数据 akshare yfinance 实时行情含成交额
市场情绪 akshare (涨停/连板) Mock 涨停家数、连板高度
资金流向 akshare (北向资金) Mock 北向/主力净流入
行业板块 akshare Mock 行业/概念板块涨跌
龙虎榜 akshare Mock 机构游资买卖
美股数据 yfinance Mock 纳指/标普/道指
期指数据 mx-data API Mock A50/沪深300 期指
新闻 mx-search API Mock 财经新闻 + 分级
全球资产 mx-data API Mock 美元/黄金/原油

调试

# 启用详细日志
export LOG_LEVEL=DEBUG
./venv/bin/python3 -m skills.a-share-daily-report.scripts.generate_report --mode morning

# 验证数据源连通性
./venv/bin/python3 -m skills.a-share-daily-report.scripts.verify_data_sources

# 验证数据真实性
./venv/bin/python3 -m skills.a-share-daily-report.scripts.verify_data_truth

已知限制

  1. akshare SSL:当前环境可能存在 SSL 限制,系统自动降级到备用源
  2. 数据延迟:早报基于昨日收盘数据,晚报使用当日数据
  3. 飞书发布:需要用户配置 FEISHU_NOTIFY_OPEN_IDtarget_chat_id
  4. 自选股数量:建议不超过 5 只

扩展开发

添加新数据源

data_fetcher.py 中添加方法,返回统一格式:

def get_your_data(self, dt):
    return {"success": True, "data": ..., "source": "your_source"}

添加新分析维度

analyzer.py 中添加方法,输入 data 字典,返回统一格式。

添加新报告章节

renderer.py 中修改对应的 render_*_report 方法。


状态:生产就绪 最后更新:2026-04-02

Usage Guidance
Summary of what to check before installing: - Metadata vs code mismatch: The package documentation expects MX_APIKEY, TUSHARE_TOKEN, and Feishu credentials, but the skill registry did not declare required env vars. Treat the skill as needing API keys and authenticate accordingly. - Secrets exposure: The skill reads .env and config files and also references other skills by absolute workspace paths. Run it only in an isolated environment (dedicated venv/project) that does not contain unrelated secrets, and inspect your .env before running. - Inspect publisher code: Review scripts/publisher.py to see exactly which external endpoints it calls and how Feishu tokens are used (token scope, whether tokens are stored or transmitted). Consider removing or disabling the --publish path until you verify it. - Absolute/hardcoded paths: The default config uses an absolute user path (/Users/yibiao/...). Update config/config.yaml and outdir to safe, project-local paths before running to avoid accidental writes to unexpected locations. - Dependency imports: The code attempts to import other local skills (tushare-skills, akshare-cn-market). Confirm those imports point to intended, trusted packages in your environment; if they point to shared/global skill directories you don't control, prefer to sandbox or vendor the exact dependencies. - Run tests and dry-run: Execute the provided tests in an isolated environment (CI or throwaway VM) and run verify_data_sources/verify_data_truth to see which endpoints are contacted and whether mock-mode works. If you trust the author and will provide the required API keys, run the skill in an isolated workspace and explicitly set only the minimal env vars needed (avoid putting unrelated secrets in the same .env). If you do not control or trust the environment the skill will run in, treat this package as high-risk and do not install it system-wide.
Capability Analysis
Type: OpenClaw Skill Name: a-share-daily-report Version: 1.0.2 The a-share-daily-report skill bundle is a comprehensive and well-documented tool designed to generate financial market reports for the A-share market. It fetches data from legitimate financial sources such as akshare, yfinance, and East Money (dfcfs.com) APIs, and includes functionality to publish these reports to Feishu. While the code handles sensitive API keys and performs network requests, these actions are strictly aligned with the stated purpose of the skill. No evidence of data exfiltration, unauthorized command execution, or malicious prompt injection was found across the scripts (generate_report.py, data_fetcher.py, publisher.py).
Capability Assessment
Purpose & Capability
The declared purpose (generate A‑share morning/evening reports) matches the included code. However the project clearly expects API credentials (MX_APIKEY, TUSHARE_TOKEN) and a Feishu open_id for publishing—yet the registry metadata lists no required env vars or credentials. The code also imports and reuses other local skills (tushare-skills, akshare-cn-market, mx-data/mx-search) via absolute workspace paths, which is disproportionate to a standalone report generator and implies dependency on other skills' configuration/data.
Instruction Scope
Runtime instructions and SKILL.md tell the agent to read .env and config/config.yaml, write reports to a base_dir (defaulting to an absolute user path), verify data sources, and optionally publish to Feishu. The code/docs reference reading environment variables and other skills' directories (/Users/yibiao/.openclaw/...), performing network calls to public APIs, and falling back to mock data. The instructions therefore require access to local files and network endpoints beyond simply calling a single external API—raising risk of unintended exposure of other workspace secrets or data.
Install Mechanism
There is no install spec (instruction-only at registry level) and no remote download in the metadata. That lowers install-time risk: nothing in the registry will be fetched from an arbitrary URL. However the bundle includes many Python scripts (data_fetcher, publisher, etc.) which will be executed if the skill is run; the lack of an explicit install does not remove runtime risk.
Credentials
The skill expects/uses multiple sensitive env vars and tokens (MX_APIKEY, TUSHARE_TOKEN, FEISHU_NOTIFY_OPEN_ID) per SKILL.md/README/DATA_SOURCES.md, yet the registry declares none. The skill also references reuse of globally-configured tokens in other skills (e.g., 'tushare-skills' with an inbuilt token) which could cause it to access credentials that belong to other skills. Asking to read a repository-level .env or other skills' code/configs is broader than the stated purpose and increases the risk of secret exposure.
Persistence & Privilege
always:false (no forced permanent inclusion). The skill can be invoked autonomously (default), which is normal for skills. Combined with the above (access to env, other skills, and publishing), autonomous invocation increases blast radius—e.g., the skill could autonomously read .env and publish documents/messages—so run permissions and invocation policies should be considered.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install a-share-daily-report
  3. After installation, invoke the skill by name or use /a-share-daily-report
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
**Major initial release with full modular structure and automatic A-share daily report generation.** - Introduced one-click script to generate professional A-share morning and evening reports, supporting Markdown output and Feishu publishing. - Modularized architecture: separate modules for data fetching, analysis, rendering, and publishing with independent configuration and test coverage. - Support for multi-source data (akshare/main, tushare, Sina, MX-Data), fallback and mock strategies to ensure robustness. - Configurable watchlist, flexible output directory, and Feishu API integration for document publishing and notifications. - Added detailed documentation: architecture, data source, interface, structure, testing, and usage guides. - Comprehensive test cases included for core modules and sample configs for quick customization.
v1.0.1
- 增加了同花顺和海外公开行情数据源,支持历史行业板块和全球资产数据接入 - 新增 akshare 依赖以获取历史板块及海外期货等数据 - 飞书文档集成增强:支持自动合并早晚报、通过环境变量配置目标目录和通知用户,可选择跳过飞书同步 - 数据源与产出文件说明更加详细,新增历史模式/实时模式切换说明 - 优化文档说明,提升可用性
v1.0.0
A-share daily report generator - initial release: - Generates comprehensive morning/evening reports for China's A-shares, including 9 modules: major indices, market sentiment, K-line charts, sector/concept rankings, top gainers/losers, theme tracking, news, and overall analysis. - Outputs Markdown, PNG charts, and PDF reports. - Uses public APIs from Eastmoney for all data (no authentication required). - Optional matplotlib integration for chart generation (can be disabled with `--no-charts`). - Command-line interface for easy report generation and output management. - Includes robust error handling for network requests; partial data will still generate a report if some APIs fail.
Metadata
Slug a-share-daily-report
Version 1.0.2
License MIT-0
All-time Installs 5
Active Installs 5
Total Versions 3
Frequently Asked Questions

What is A Share Daily Report?

生成专业级 A股早报/晚报,包含大盘指数行情、市场情绪、K线走势图、 行业/概念板块排行、个股涨跌榜、主题新闻追踪、综合分析, 输出 Markdown + PNG 图表 + PDF。数据源为东方财富公开 API、 同花顺公开板块页及海外公开行情接口。 Use when asked to create daily... It is an AI Agent Skill for Claude Code / OpenClaw, with 604 downloads so far.

How do I install A Share Daily Report?

Run "/install a-share-daily-report" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is A Share Daily Report free?

Yes, A Share Daily Report is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does A Share Daily Report support?

A Share Daily Report is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created A Share Daily Report?

It is built and maintained by Shoukuan (@shoukuan); the current version is v1.0.2.

💬 Comments