cninfo

cninfo is a skill for Claude Code, Codex from rollysys/use_cninfo. It costs 139 tokens per session (1,763 once invoked), scanned A, original, MIT.

A tool for downloading public announcements from China-listed companies through CNINFO, a Chinese stock-market disclosure website. It saves each notice as a PDF and as searchable Markdown text.

In plain words
What is it for?
Getting annual, quarterly, half-year, and temporary announcements for a stock code; finding notices about share reductions or major asset restructurings; and filtering announcements by category.
Why use it?
It avoids manually searching, downloading, and converting company filings. Local cached copies can also be returned without downloading them again.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rollysys/use_cninfo/skill
Any agent
npx skills add rollysys/use_cninfo --skill skill
Clone the repo
git clone --depth 1 https://github.com/rollysys/use_cninfo

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cninfo

README.md
[![agentmods](https://agentmods.dev/badge/skills/rollysys/use_cninfo/skill.svg)](https://agentmods.dev/skills/rollysys/use_cninfo/skill)
Your own site
<a href="https://agentmods.dev/skills/rollysys/use_cninfo/skill"><img src="https://agentmods.dev/badge/skills/rollysys/use_cninfo/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00139 $0.01763
Opus 5 $0.00069 $0.00881
Sonnet 5 $0.00028 $0.00353
Haiku 4.5 $0.00014 $0.00176

Measured 5d ago against content hash be9d54626b9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cninfo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cninfo skill — A 股公告按需抓取

本 skill 是对 cninfo-cli 命令的入口,把巨潮资讯网的所有公开公告(法定披露)按需变成本地 PDF + 全文 md。纯按需,不做后台调度

触发场景

  • "拿 600519 的 2024 年报"
  • "茅台 2024 年第一季度报告"
  • "贵州茅台最近 30 天的公告"
  • "4/29 全市场所有年报"
  • "搜含'减持'的公告 / 找重大资产重组类公告"

前置依赖(用户机器上必须先装好)

# 1. 本工具
git clone https://github.com/rollysys/use_cninfo.git
cd use_cninfo && uv tool install -e .            # 装上 `cninfo` 命令

# 2. (可选)公告分类器 — 提供 search 的 --type/--sub-type 标签精准过滤
git clone https://github.com/rollysys/announcement_filter.git
cd announcement_filter && pip install -e .

不装 announcement_filter 时:cninfo search --type ... --sub-type ... 会报错并提示安装命令;其它 5 个命令不受影响。

缓存

默认 ~/.cache/cninfo/(可被 $CNINFO_CACHE_DIR 覆盖):

<root>/
├── orgid_map.json                                    # secCode → orgId
├── pdf/<ts_code>/<ann_date>__<ann_id>.pdf
├── md/<ts_code>/<ann_date>__<ann_id>.md              # 含 YAML frontmatter
└── meta/<ann_id>.json

命中即秒级返回,不发网络。强制重下用 --force

6 个命令(给 agent 自己选)

1. 单股指定定期报告(最常用)

cninfo fetch-report 600519 --year 2024 --kind annual
# kind: annual / q1 / h1 / q3
# 输出 JSON: {ann_id, ann_date, title, pdf_path, md_path, total_pages, extracted_pages, text_chars, cache_hit}

板块(sz/sh/bj)默认按代码推测;把握不准时显式 --plate sh

2. 单股时间窗全公告

cninfo fetch-stock 600519 --since 2024-04-01 --until 2024-04-30          # 仅列表
cninfo fetch-stock 600519 --since 2024-04-01 --until 2024-04-30 --download  # 同时落 PDF+md
cninfo fetch-stock 600519 --since 2024-04-01 --until 2024-04-30 --json      # JSON 输出

3. 全市场切片

# 4/29 当天 sz plate 全部年报
cninfo list --plate sz --category annual --date 2024-04-29
# 时间窗 + 单只关键词
cninfo list --plate sh --since 2024-04-01 --until 2024-04-30 --keyword "重大资产重组"
# 加 --download 才下载;--limit 50 限制条数

4. 标签搜索(走 announcement_filter)

# 单股 + 时间窗 + 标签
cninfo search --stock 600519 --since 2024-01-01 --until 2024-12-31 \
              --type shareholder --sub-type reduce_plan
# 全市场 + 单日 + 标签
cninfo search --plate sz --date 2024-04-29 --type shareholder --sub-type reduce_plan
# 不带标签时退化为 cninfo searchkey 模糊匹配 title
cninfo search --plate sh --date 2024-04-29 --keyword "重组"

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 130 lines · 139 tokens per session scan A be9d54626b9a

Subscribe to this mod's changes

cninfo is a skill published in the GitHub repository rollysys/use_cninfo (22 stars, last pushed 4mo ago), licensed MIT. It adds 139 tokens to every session and 1,763 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.