Skip to content
SkillModel-led149,841 tokens in use

A-Stock Data

A single-file toolkit of runnable Python for fetching China A-share data: quotes, K-lines, research reports, fund flows, financials, announcements, futures and convertible bonds.

11,955 stars on the repository Apache License 2.0simonlin1212/a-stock-data
curl -o ~/.claude/skills/a-stock-data/SKILL.md https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.md
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing A-Stock Data costs

624tokens idle
149,841tokens in use
158,587tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetectednetworkdetectedwrites filesdetectedcredentialsdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Fair
  • Frontmatter4/15
  • Structure25/25
  • Examples12/15
  • Output5/15
  • Size3/15
  • Resources7/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Good
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 436
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 436
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 2038
  • Reads credentials−15

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 2173

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity76
  • Maintenance92
  • Community60
  • Maturity28
  • Momentum40

A-Stock Data is one very large SKILL.md that embeds working Python code for pulling real market data on Chinese stocks and related markets. It is organized in fifteen layers with 87 endpoints from 34 sources, with the code written out in the file itself.

The skill applies only when a task needs code that fetches data. Questions about concepts, opinions or strategy do not load it. It prefers sources that do not block IPs, rate-limits the Eastmoney calls it uses, and lists backup sources to switch to when a main one fails. The text is in Chinese.

What You Get

  • Ready-to-run Python functions for fifteen layers of A-share data
  • A routing table that maps each need to a section, function and source
  • A backup-source guide and fallback functions for dragon-tiger lists, fund flows and announcements
  • Rate-limited access helpers that protect against being blocked
  • Ticker normalization that stops a code from silently returning another stock’s data

Common Use Cases

  • Fetch daily K-lines with adjusted prices for a stock or ETF
  • Download broker research reports and ratings for a company
  • Pull the day’s limit-up pool, dragon-tiger list and northbound flows
  • Check financial statements, valuation history and announcements for one name
  • Collect futures, option and convertible bond data from exchange sources

What Makes It Unique

The code lives inside the skill file, so no extra files are needed, and the changelog documents silent failures found in real use, such as stale codes that return empty data with a normal HTTP status. It separates ‘no data exists’ from ‘the source is broken’ by raising errors, and it ranks sources by how likely they are to block you.

Under The Hood

The agent reads SKILL.md, picks the section for the data it needs and runs the Python code in it. That code makes HTTP requests to many public finance sites and exchange pages, such as Tencent, Eastmoney, Sina, Tonghuashun, Cninfo and the stock exchanges, and opens TCP connections to Tongdaxin servers and to the Baostock service. It needs several Python packages installed with pip. Some helpers keep a local cache and write downloaded files such as report PDFs. No account keys are required for the main endpoints. The agent runs shell commands and writes files on your machine, and it calls many third-party services that can change or block requests.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers