Agent skill

A Stock Financial

by nigo81 in nigo81/nigo-skills

A股上市公司财务报表查询与导出工具。支持资产负债表、利润表、现金流量表三大报表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。触发词:查财报、财务报表、资产负债表、利润表、现金流量表、财务数据、上市公司财报、导出财报、年报、季报。当用户提到任何A股公司的财务数据、财报分析、三大报表时都应使用此 skill。

MITAuto-check passedDocuments & Office

Install A Stock Financial

skills CLI
$ npx skills add nigo81/nigo-skills --skill a-stock-financial -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nigo81/nigo-skills a-stock-financial --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nigo81/nigo-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/a-stock-financial .claude/skills/a-stock-financial && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
a-stock-financial
GitHub stars
133
Token cost
~627 tokens
SKILL.md length
91 words
Files
3 (incl. scripts)
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

A股上市公司财务报表查询与导出工具。支持资产负债表、利润表、现金流量表三大报表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。触发词:查财报、财务报表、资产负债表、利润表、现金流量表、财务数据、上市公司财报、导出财报、年报、季报。当用户提到任何A股公司的财务数据、财报分析、三大报表时都应使用此 skill。

  • Works in 4 steps: 确认参数 → 查询报表 → 展示结果 → …
  • Tasks that involve Excel spreadsheets
  • SKILL.md covers 依赖, 股票代码查询, 可用数据 and 工作流, plus 1 more section
  • Runs Python scripts from its folder; calls python3 and pip

What it does

A Stock Financial is an agent skill from nigo81/nigo-skills. A股上市公司财务报表查询与导出工具。支持资产负债表、利润表、现金流量表三大报表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。触发词:查财报、财务报表、资产负债表、利润表、现金流量表、财务数据、上市公司财报、导出财报、年报、季报。当用户提到任何A股公司的财务数据、财报分析、三大报表时都应使用此 skill。

Its SKILL.md is about 630 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/export_excel.py` and `scripts/fetch_reports.py`).

It sits in Documents & Office, covering Excel spreadsheets. It works with Microsoft Excel. The repository describes itself as: 审计师专属 AI 技能包 —— 让 AI 拥有资深审计专家的思维方式. The licence is MIT.

When your agent uses it

  • Tasks that involve Excel spreadsheets

Example prompts

  • “/a-stock-financial”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 确认参数
  2. 查询报表
  3. 展示结果
  4. 导出 Excel(用户要求时)

What it can do on your machine

Read from SKILL.md and the folder at commit 6468211. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

A Stock Financial loads about 627 tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 91 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~627

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nigo81/nigo-skills at commit 6468211, republished under its MIT licence (© nigo81). 91 words, ~627 tokens.

Download SKILL.mdSave it as .claude/skills/a-stock-financial/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
a-stock-financial
description
A股上市公司财务报表查询与导出工具。支持资产负债表、利润表、现金流量表三大报表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。触发词:查财报、财务报表、资产负债表、利润表、现金流量表、财务数据、上市公司财报、导出财报、年报、季报。当用户提到任何A股公司的财务数据、财报分析、三大报表时都应使用此 skill。
triggers
财报, 财务报表, 资产负债表, 利润表, 现金流量表, 财务数据, 上市公司, 三大报表, 年报, 季报, 导出财报, 导出Excel
slug
nigo-a-stock-financial
displayName
A股财报查询工具
version
1.0.0
summary
A股上市公司财务报表查询与导出,支持资产负债表、利润表、现金流量表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。
license
MIT

A股上市公司财务报表查询

基于 AkShare(同花顺数据源)获取A股上市公司财务报表,支持查询和导出 Excel。

依赖

bash
pip install akshare openpyxl

股票代码查询

不要用 stock_zh_a_spot_em() 拉全市场行情(极慢,需1分钟+)。

用户说公司名称而非代码时,用 WebSearch 搜索"XX 股票代码"即可。

可用数据

报表列数内容
资产负债表80列流动/非流动资产、流动/非流动负债、权益各明细
利润表46列营收→成本各项→营业利润→净利润→每股收益→综合收益
现金流量表73列直接法三大活动现金流 + 间接法补充资料
财务摘要20+指标净利率、毛利率、ROE、存货周转率、流动比率等

每个报表支持3个时间维度:按报告期(最全)、按年度(多年对比)、按单季度

工作流

1. 确认参数
  • 股票代码:用户给出代码直接用;说公司名则 WebSearch 搜索
  • 报表类型:默认查全部,用户指定则只查对应报表(balance/income/cashflow/abstract)
  • 时间维度:默认 按报告期,年报对比用 按年度,看季度用 按单季度
  • 用户说"近N年/近N期"的映射:
    • "近3年" = --indicator 按年度 --last 3(取最近3个年度)
    • "近4期" = --indicator 按报告期 --last 4(取最近4个报告期,含季报/半年报/年报)
    • "2025年报" = --period 2025-12-31
    • "2025三季报" = --period 2025-09-30
2. 查询报表
bash
SCRIPT=~/.claude/skills/a-stock-financial/scripts/fetch_reports.py

# 查所有报表,按报告期,最近4期
python3 $SCRIPT <股票代码>

# 只查利润表,按年度,最近5年
python3 $SCRIPT <股票代码> --type income --indicator 按年度 --last 5

# 查资产负债表,指定报告期(只返回1期数据)
python3 $SCRIPT <股票代码> --type balance --period 2025-12-31

# 查财务摘要
python3 $SCRIPT <股票代码> --type abstract

# 输出为 JSON
python3 $SCRIPT <股票代码> --output json

--type 可选:balance、income、cashflow、abstract、all(默认) --indicator 可选:按报告期(默认)、按年度、按单季度

3. 展示结果

以表格形式展示关键指标,并提供简要财务分析:

  • 营收趋势、利润率变化
  • 资产负债结构、偿债能力
  • 现金流健康度
  • 与往年数据的同比变化
4. 导出 Excel(用户要求时)
bash
EXPORT=~/.claude/skills/a-stock-financial/scripts/export_excel.py

# 导出所有报告期(默认最近20期)
python3 $EXPORT <股票代码> <公司名称>

# 只导出2025年报(1期数据)
python3 $EXPORT 600326 西藏天路 --period 2025-12-31

# 导出最近3期
python3 $EXPORT 600326 西藏天路 --last 3

# 按年度导出,最近5年
python3 $EXPORT 600326 西藏天路 --indicator 按年度 --last 5

# 指定输出路径
python3 $EXPORT 600326 西藏天路 --output /tmp/财报.xlsx

导出文件包含4个 Sheet:资产负债表、利润表、现金流量表、财务摘要。

注意事项

  • symbol 为 6 位股票代码(如 "600326"),不含交易所后缀
  • 数据源为同花顺,完全免费无需 token
  • 数据单位通常为"亿",带 * 的是核心指标列
  • 如果东财接口报错,同花顺接口(_ths 后缀)是稳定的备选

作者:nigo 微信公众号:逆行的狗

© nigo81, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in a-stock-financial of nigo81/nigo-skills.

  • SKILL.md
  • scripts/export_excel.py
  • scripts/fetch_reports.py

Open the folder on GitHubat commit 6468211

Compare with similar skills

A Stock Financial next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

A Stock Financial compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
A Stock Financial this skillnigo81/nigo-skills133—~627Automated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Data Table Managern8n-io/n8n207k—~2.3kAutomated safety check: PassCustom licence
Docx4jplutext/docx4j2.4k—~2.5kAutomated safety check: PassNone
Instrument Data To Allotropeaws-samples/amazon-bedrock-agents-healthcare-lifesciences2742 repos~2.7kAutomated safety check: PassApache-2.0
Cyber Pptcrazyykhllc-bit/CyberPPT1.8k—~10kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Official

    Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Docx4j

    plutext/docx4j

    A skill your agent uses when writing Java code that creates, reads or edits Word (.docx), PowerPoint (.pptx) or Excel (.xlsx) files with docx4j — including generating documents, editing existing…

    2.4k GitHub stars~2.5k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed
  • Cyber Ppt

    crazyykhllc-bit/CyberPPT

    当用户需要把 DOCX、PDF、TXT、XLSX、研究报告、业务材料或原始数据转成高密度、可编辑、咨询风格 PPTX 时使用;也适用于需要 SCR 论证、视觉风格探索、详细图表和渲染质检的 PPT。

    1.8k GitHub stars~10k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes

More from nigo81/nigo-skills

All 13 skills in this repo
  • Looks up Chinese company registration data in the CICPA industry knowledge base, from a quick search to a full 61-dimension export, subsidiary discovery and Excel output.

    133 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Audit Report Checker

    nigo81/nigo-skills

    Checks audit reports (financial statements and notes) for cross-reference, summation and text errors, with arithmetic done by script and results exported to Excel and Markdown.

    133 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Merges bank statements from several banks and formats into one standard Excel layout, then reconciles them against the general ledger with a layered matching engine.

    133 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • A Chinese-language persona that answers accounting-standards and audit questions in the style of forum moderator Chen Yiwei, checking standards text before it replies.

    133 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Chinese-language tool that turns a business process description into a swimlane flowchart for internal control and audit work, exported as .drawio, PNG, SVG or VSDX.

    133 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Cross-checks a client's own registry data against its customers' and suppliers' to surface undisclosed related-party relationships for an audit.

    133 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about A Stock Financial

What does A Stock Financial do?

A股上市公司财务报表查询与导出工具。支持资产负债表、利润表、现金流量表三大报表及财务摘要,按报告期/年度/单季度查询,可导出 Excel。触发词:查财报、财务报表、资产负债表、利润表、现金流量表、财务数据、上市公司财报、导出财报、年报、季报。当用户提到任何A股公司的财务数据、财报分析、三大报表时都应使用此 skill。. A Stock Financial is an agent skill from nigo81/nigo-skills.

When should I use A Stock Financial?

A Stock Financial fits situations like: tasks that involve Excel spreadsheets.

How do I install A Stock Financial in Claude Code?

Run `npx skills add nigo81/nigo-skills --skill a-stock-financial -a claude-code`. Or copy the skill folder (a-stock-financial in nigo81/nigo-skills) into .claude/skills/a-stock-financial in your project. Claude Code loads it when a task matches its description.

How do I install A Stock Financial in Codex?

Run `npx skills add nigo81/nigo-skills --skill a-stock-financial -a codex`. Or copy the skill folder (a-stock-financial in nigo81/nigo-skills) into .agents/skills/a-stock-financial in your project. Codex loads it when a task matches its description.

Can I use A Stock Financial in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nigo81/nigo-skills --skill a-stock-financial -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/a-stock-financial, .gemini/skills/a-stock-financial, .github/skills/a-stock-financial and .opencode/skills/a-stock-financial in your project.

What does A Stock Financial need to run?

Going by SKILL.md and its folder, A Stock Financial needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and pip). Our summary lists: Python 3.

Does A Stock Financial access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is A Stock Financial safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does A Stock Financial use?

A Stock Financial is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does A Stock Financial use?

About 627 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to A Stock Financial?

Skills that share tags, products or a category with A Stock Financial: Markitdown (ImCa0/just-laws, 781 stars), Data Table Manager (n8n-io/n8n, 207k stars), Docx4j (plutext/docx4j, 2.4k stars) and Instrument Data To Allotrope (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains A Stock Financial?

nigo81 (a GitHub user) maintains it in nigo81/nigo-skills, which has 133 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on August 23, 2026.

Source: nigo81/nigo-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.