akshare-a-shares

akshare-a-shares is a skill for Claude Code from Yrzhe/claude-skills. It costs 144 tokens per session (1,202 once invoked), scanned A, original, MIT.

A data lookup tool for Chinese A-share stocks, the shares listed on mainland Chinese stock exchanges. It retrieves current prices, historical price charts, minute-by-minute data, shareholder counts, and company announcements.

In plain words
What is it for?
Use it to query live or historical A-share prices, daily/weekly/monthly or minute data, adjusted prices, shareholder numbers, and announcements from CNINFO.
Why use it?
It avoids having to find and combine these figures manually from different Chinese market-data sources. Results can be returned as CSV or JSON for further use.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the akshare-a-shares plugin — 1 skill shipped together

Good fit Use it to query live or historical A-share prices, daily/weekly/monthly or minute data, adjusted prices, shareholder numbers, and announcements from CNINFO.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yrzhe/claude-skills/akshare-a-shares
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.

Any agent
npx skills add Yrzhe/claude-skills --skill akshare-a-shares
Clone the repo
git clone --depth 1 https://github.com/Yrzhe/claude-skills

Made for: Claude Code.

Or install akshare-a-shares, the plugin that ships this one along with the rest of its 1 skill.

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 akshare-a-shares

README.md
[![agentmods](https://agentmods.dev/badge/skills/yrzhe/claude-skills/akshare-a-shares/github.svg)](https://agentmods.dev/skills/yrzhe/claude-skills/akshare-a-shares)
Your own site
<a href="https://agentmods.dev/skills/yrzhe/claude-skills/akshare-a-shares"><img src="https://agentmods.dev/badge/skills/yrzhe/claude-skills/akshare-a-shares/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for akshare-a-shares

Your own site · 80×15
<a href="https://agentmods.dev/skills/yrzhe/claude-skills/akshare-a-shares"><img src="https://agentmods.dev/badge/skills/yrzhe/claude-skills/akshare-a-shares.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,202 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00144 $0.01202
Opus 5 $0.00072 $0.00601
Sonnet 5 $0.00029 $0.00240
Haiku 4.5 $0.00014 $0.00120

Measured 12d ago against content hash be2bfa24f235, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

akshare-a-shares 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 12d ago.

The scan reads SKILL.md. This mod also ships 59 executable files (akshare/__init__.py, akshare/air/__init__.py, akshare/air/air_hebei.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/akshare-a-shares/skills/akshare-a-shares/SKILL.md · 70 lines

How it starts

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

A股数据查询(akshare)

本Skill指导如何基于本地 akshare 源码目录的数据接口完成 A 股数据查询,并提供一个可直接运行的脚本以便快速拉取数据。

目录约定:本地 akshare 源位于 Recents/akshare(相对当前工作目录)。如不一致,请在执行脚本前修改脚本内 AK_PATH

快速开始

  • 方式一(推荐)脚本直取:使用 scripts/akshare_fetch.py 拉取数据,支持 CSV 或 JSON 输出。
    • 示例见 references/examples.md
  • 方式二 内联Python:在任务中按“接口映射”选定函数与参数,直接编写最小可运行代码。

核心流程

  1. 识别用户意图与来源
    • 行情总览(实时行情)、历史K线(日/周/月)、分钟分时、复权、股东户数、公告检索等
    • 来源优先级:未指定则默认 EastMoney(EM);用户指明“新浪”则用 Sina 接口
  2. 选择接口与参数
    • references/endpoints.md 的“意图→接口”映射与参数说明
  3. 拉取与校验
    • 使用脚本或内联Python调用;如返回为空,检查代码格式(是否需交易所前缀、日期格式、是否退市等)
  4. 返回结果
    • 表格/CSV/JSON;必要时附带参数回显与数据来源

接口映射总览(最常用)

  • 实时全市场 A 股:stock_feature.stock_hist_em.stock_zh_a_spot_em()
  • 历史K线(日/周/月,支持复权):stock_feature.stock_hist_em.stock_zh_a_hist(symbol, period, start_date, end_date, adjust)
  • 分钟分时(1/5/15/30/60,支持复权):stock_feature.stock_hist_em.stock_zh_a_hist_min_em(symbol, start_date, end_date, period, adjust)
  • 股东户数(批量/季度末):stock_feature.stock_gdhs.stock_zh_a_gdhs(symbol);详情:stock_feature.stock_gdhs.stock_zh_a_gdhs_detail_em(symbol)
  • 公告披露(巨潮资讯):stock_feature.stock_disclosure_cninfo.stock_zh_a_disclosure_report_cninfo(...)stock_zh_a_disclosure_relation_cninfo(...)
  • 新浪来源(如指定):实时报价 stock.stock_zh_a_sina.stock_zh_a_spot()、日线/复权 stock.stock_zh_a_sina.stock_zh_a_daily(...)、分钟线 stock.stock_zh_a_sina.stock_zh_a_minute(...)

详细参数、示例与注意事项见 references/endpoints.mdreferences/examples.md

使用内置脚本

脚本路径:scripts/akshare_fetch.py

  • 基本用法(CSV):
    • python3 scripts/akshare_fetch.py spot --source em --format csv
    • python3 scripts/akshare_fetch.py hist --symbol 600519 --period daily --start 20200101 --end 20251231 --adjust qfq --format csv
    • 更多示例见 references/examples.md

脚本特性:

  • 自动将 Recents/akshare 加入 sys.path,直接导入本地 akshare 源
  • 默认输出到标准输出;--format json 输出JSON
  • 依赖:python3pandasrequests(Sina 接口还需 py_mini_racer
  • 若依赖缺失,会给出友好错误提示

符号与日期规范

  • EM 接口通常使用纯数字代码:沪市以 6 开头(如 600519),深市以 0/3 开头(如 000001
  • Sina 接口部分函数使用带交易所前缀的代码(如 sh600519sz000001
  • 日期:YYYYMMDD(日/周/月K);分钟分时使用 YYYY-MM-DD HH:MM:SS
  • 复权:adjust 取值 { "": 不复权, "qfq": 前复权, "hfq": 后复权 }

Read the full file on GitHub · 70 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 70 lines · 144 tokens per session scan A be2bfa24f235

Subscribe to this mod's changes

akshare-a-shares is a skill published in the GitHub repository Yrzhe/claude-skills (33 stars, last pushed 3mo ago), licensed MIT. It adds 144 tokens to every session and 1,202 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.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens

reading-receipt

An image-reading workflow for extracting structured information from receipts, invoices, and hometown-tax donation certificates. It can first extract text from PDFs and otherwise read their images.

kazukinagata/shinkoku · 64 tokens