← 返回 Skills 市场
CNInfo Reports
作者
gclyde768-arch
· GitHub ↗
· v1.0.1
· MIT-0
184
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cninfo-report-downloader
功能描述
Batch-download formal A-share annual and semiannual report PDFs from CNInfo (巨潮资讯) using a stock-code CSV. Supports dry-run preview, resume on failure, force...
使用说明 (SKILL.md)
CNInfo Report Downloader(巨潮资讯报告下载)
批量下载A股上市公司年报/半年报 PDF(数据源:巨潮资讯 cninfo.com.cn)。
When to activate
- User wants to download A-share annual or semiannual reports
- User mentions 巨潮、cninfo、年报下载、半年报、annual report
- User needs to batch-fetch report PDFs from a stock-code list
Prerequisites
pip install -r requirements.txt
Workflow
- Confirm that a stock CSV exists and that its first column contains stock codes (6-digit A-share codes).
- If unsure, run
--dry-runfirst to preview matches without downloading. - Run the command from the skill directory. The script tracks progress in SQLite and can resume after interruption.
- Check
runtime/manifest_\x3Cyear>.csvandruntime/logs/cninfo_\x3Cyear>.logafter the run. - Consult references/filter_rules.md only when adjusting title matching, naming, or reset behavior.
Commands
Normal download (default year 2025):
python scripts/run_cninfo_reports.py --stock-csv \x3Cpath-to-csv>
Dry-run (preview only, no download):
python scripts/run_cninfo_reports.py --stock-csv \x3Cpath-to-csv> --dry-run
Specify year:
python scripts/run_cninfo_reports.py --stock-csv \x3Cpath-to-csv> --year 2024
Force redownload (ignore cache):
python scripts/run_cninfo_reports.py --stock-csv \x3Cpath-to-csv> --force-redownload
Full CLI options:
| Argument | Default | Description |
|---|---|---|
--year |
2025 | Target report year |
--stock-csv |
上市公司基础信息.csv |
CSV with stock codes in column 1 |
--output-dir |
downloads/\x3Cyear> |
PDF output directory |
--runtime-dir |
runtime |
State, manifest, logs directory |
--page-size |
20 | Search results per page |
--sleep-seconds |
1.2 | Min delay between requests |
--timeout-seconds |
30 | HTTP timeout |
--max-retries |
5 | HTTP retry attempts |
--dry-run |
false | Preview matches without downloading |
--force-redownload |
false | Re-download even if file exists |
Features
- Smart title filtering — regex-based matching for formal annual/semiannual reports; auto-rejects summaries, English variants, ESG reports, notices, etc.
- Breakpoint resume — SQLite state tracks search progress and download status per announcement; resumes after interruption.
- Manifest output —
runtime/manifest_\x3Cyear>.csvwith full metadata for every eligible report. - Idempotent naming —
{code}_{year}_{kind}.pdffor primary files, extra variants get_{announcement_id}suffix.
Architecture
scripts/
run_cninfo_reports.py # Entry point
cninfo_annual_reports/
cli.py # Argument parsing & logging
config.py # AppConfig dataclass
service.py # Core orchestration logic
repository.py # SQLite state management
http_client.py # CNInfo API & file download
models.py # Data models
filters.py # Title evaluation & regex
references/
filter_rules.md # Detailed filter/reset docs
agents/
openai.yaml # Codex integration config
Reset
To restart from scratch, delete state files:
rm runtime/state.db runtime/state.db-wal runtime/state.db-shm
安全使用建议
This skill appears coherent with its description: it will run Python code locally, make HTTP requests to cninfo.com.cn, read your provided stock CSV (or search for a file named '上市公司基础信息.csv' in the working tree), and write downloads, logs, and a SQLite state DB under the configured runtime/output directories. If you trust the source, running it is reasonable. If unsure, (1) inspect the included Python files (they are plain and readable), (2) run pip install and the script inside a virtual environment or isolated container, (3) supply a CSV you control (avoid pointing it at sensitive system files), and (4) be aware it will perform many network requests — respect site terms and rate limits.
功能分析
Type: OpenClaw Skill
Name: cninfo-report-downloader
Version: 1.0.1
The cninfo-report-downloader skill is a legitimate utility designed to batch-download financial reports from the official CNInfo (巨潮资讯) website. The code is well-structured, using a local SQLite database (repository.py) to manage state and ensure idempotency, and employs robust regex-based filtering (filters.py) to identify specific annual and semiannual reports. There is no evidence of data exfiltration, malicious execution, or prompt injection; all network activity is directed at the expected domains (cninfo.com.cn and static.cninfo.com.cn), and file operations are confined to user-specified directories.
能力评估
Purpose & Capability
Name/description describe batch-downloading CNInfo A-share annual/semiannual PDFs; code implements search, filtering, SQLite state, and downloads from cninfo.com.cn/static — all directly relevant to the declared purpose.
Instruction Scope
SKILL.md instructs installing requirements, providing a stock-code CSV, running the included script, and inspecting runtime/manifest/logs. The instructions do not request unrelated files, credentials, or external endpoints beyond CNInfo; they do search the working tree for a specifically-named CSV if the provided path is missing (this is search-limited and explained).
Install Mechanism
There is no platform install spec (instruction-only), but the bundle contains multiple Python scripts and a requirements.txt and expects the user to run them locally (pip install -r requirements.txt). This is not inherently risky, but because code will be executed locally, users should review or run in an isolated environment if they don't trust the source.
Credentials
The skill requests no environment variables, no credentials, and no config paths. It only needs network access to cninfo.com.cn and filesystem access to read the CSV and write runtime/ download files — which is proportional to the described task.
Persistence & Privilege
Skill is not force-included (always:false) and does not request system-wide changes or alter other skills. It creates/uses local runtime state (SQLite, logs, downloads) which is expected for resumable downloads.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cninfo-report-downloader - 安装完成后,直接呼叫该 Skill 的名称或使用
/cninfo-report-downloader触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Major update with enhanced features, documentation, and configuration options.
- Adds detailed usage guide with activation scenarios and prerequisites.
- Introduces resume-on-failure using SQLite state tracking.
- Supports dry-run preview, configurable year, download directory, timeout, and retries.
- Refines title filtering with regex-based exclusion of non-official reports.
- Manifest, log, and report file outputs are further described and standardized.
- Clear reset instructions for restarting downloads.
v1.0.0
Initial release.
- Add a CNInfo A-share report downloader skill
- Read stock codes from the first column of a CSV file
- Search CNInfo by stock code with date filtering
- Download formal 2025 annual and semiannual report PDFs
- Exclude summaries, English variants, and non-report announcements
- Support immediate page-level downloads, retry, throttling, manifest export, and SQLite resume
元数据
常见问题
CNInfo Reports 是什么?
Batch-download formal A-share annual and semiannual report PDFs from CNInfo (巨潮资讯) using a stock-code CSV. Supports dry-run preview, resume on failure, force... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 184 次。
如何安装 CNInfo Reports?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cninfo-report-downloader」即可一键安装,无需额外配置。
CNInfo Reports 是免费的吗?
是的,CNInfo Reports 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
CNInfo Reports 支持哪些平台?
CNInfo Reports 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 CNInfo Reports?
由 gclyde768-arch(@gclyde768-arch)开发并维护,当前版本 v1.0.1。
推荐 Skills