← Back to Skills Marketplace
gclyde768-arch

CNInfo Reports

by gclyde768-arch · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
184
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install cninfo-report-downloader
Description
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...
README (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

  1. Confirm that a stock CSV exists and that its first column contains stock codes (6-digit A-share codes).
  2. If unsure, run --dry-run first to preview matches without downloading.
  3. Run the command from the skill directory. The script tracks progress in SQLite and can resume after interruption.
  4. Check runtime/manifest_\x3Cyear>.csv and runtime/logs/cninfo_\x3Cyear>.log after the run.
  5. 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 outputruntime/manifest_\x3Cyear>.csv with full metadata for every eligible report.
  • Idempotent naming{code}_{year}_{kind}.pdf for 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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cninfo-report-downloader
  3. After installation, invoke the skill by name or use /cninfo-report-downloader
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug cninfo-report-downloader
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 184 downloads so far.

How do I install CNInfo Reports?

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

Is CNInfo Reports free?

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

Which platforms does CNInfo Reports support?

CNInfo Reports is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created CNInfo Reports?

It is built and maintained by gclyde768-arch (@gclyde768-arch); the current version is v1.0.1.

💬 Comments