China Clean Data Xls logo

China Clean Data Xls

Community
jwangkun
china-clean-data-xls

Clean and normalize A-share financial data for modeling. Adapts the original clean-data-xls skill for Chinese financial statements, CAS conventions, and A-share data formats. Triggers on "A股数据清洗", "财务数据清洗", "clean financial data China", "数据清洗", or "normalize financial statements".

Overview

Publisherjwangkun
Repositoryclaude-for-financial-services-cn
Skill namechina-clean-data-xls
Stars
834
Forks
132
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jwangkun on GitHub. Read the source before you install it.

Installation

Install the China Clean Data Xls AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jwangkun/claude-for-financial-services-cn/tree/main/agent-plugins/china-earnings-reviewer/skills/china-clean-data-xls
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jwangkun/claude-for-financial-services-cn.git /tmp/claude-for-financial-services-cn
mkdir -p .claude/skills
cp -r /tmp/claude-for-financial-services-cn/agent-plugins/china-earnings-reviewer/skills/china-clean-data-xls .claude/skills/china-clean-data-xls
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable China Clean Data Xls in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads China Clean Data Xls on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so China Clean Data Xls is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

china-clean-data-xls

Purpose

Clean and normalize A股财务数据 — prepare raw financial data from 巨潮 filings for modeling and analysis.

Data Sources

Tier 0 — 万得 Wind(最全面付费数据)

  • 覆盖:A股/港美股/基金/指数/债券/宏观/研报/分析(44个工具)
  • MCP 服务:wind-mcp(需 WIND_API_KEY 密钥,以 ak_ 开头)
  • 优势:全市场覆盖面最广、数据最全面、包含研报和量化分析
  • 密钥申请:https://aifinmarket.wind.com.cn/#/home

Tier 1 — 同花顺 iFind(付费精确数据)/ AkShare MCP(Tier-2 免费备选)

python
get_financials(ticker, "income")     → Raw income statement
get_financials(ticker, "balance")    → Raw balance sheet
get_financials(ticker, "cashflow")   → Raw cash flow statement

Secondary Sources

  • 巨潮 — original filings (PDF/HTML)
  • 审计报告 — audited figures

Workflow

Step 1: Data Extraction

Extract from source documents:

DocumentKey DataFormat
资产负债表Assets, liabilities, equity千元
利润表Revenue, expenses, profit千元
现金流量表Operating, investing, financing CF千元
报表附注Detail breakdownsText/number
审计报告Audit opinion, adjustmentsText

Extraction checklist:

  • All periods extracted (typically 3-5 years)
  • Quarterly data if needed
  • Prior year comparatives
  • Notes and footnotes captured

Step 2: Normalize Units

Unit standardization:

IssueSolution
千元 vs 万元 vs 元Standardize to 万元
Different report datesAlign to same period-end
Segment dataMap to consistent segments
CurrencyAll CNY

Unit conversion:

From 千元: divide by 10 → 万元
From 元: divide by 10,000 → 万元
From 亿元: multiply by 10,000 → 万元

Step 3: Handle CAS-Specific Items

CAS vs IFRS mapping:

CAS Line ItemEquivalentNotes
营业收入RevenueNet of VAT
营业成本COGSIncludes VAT
税金及附加Tax & surcharges城建税, 教育费附加
销售费用SG&A (selling)
管理费用G&A
研发费用R&DSeparated from G&A in new CAS
财务费用Interest & finance costs
投资收益Investment incomeIncluding 联营/合营
公允价值变动Fair value change
信用减值损失Credit impairmentNew CAS 22
资产减值损失Asset impairment
资产处置收益Asset disposal
营业外收入Non-operating incomeIncluding 政府补助
营业外支出Non-operating expense
所得税费用Income tax
净利润Net income
归母净利润Net income to parentKey metric
扣非净利润Non-GAAP net income

Step 4: Fix Common Data Issues

Common issues and fixes:

IssueDetectionFix
Missing periodsGap in dataFlag for manual fill
Restated figuresFootnote "重述"Use most recent restatement
Segment reclassificationNote disclosureMap to new segments
One-time itemsLarge/unusual itemsFlag for normalization
Related party关联交易标注Identify and quantify
Accounting changePolicy change noteAdjust comparables
ErrorDoesn't sumInvestigate and correct

Step 5: Revenue Breakdown

Revenue by type:

TypeCAS LineNotes
主营业务收入Core revenueMain business
其他业务收入Other revenueAncillary
合计Total revenue

Revenue by geography (if disclosed):

RegionCurrent YearPrior YearGrowth
国内
海外
合计

Step 6: Expense Normalization

Normalize non-recurring items:

ItemTreatment
资产处置收益/损失Exclude from operations
政府补助 (non-recurring)Exclude or note separately
诉讼/罚款Exclude
减值 (one-time)Exclude or normalize
并购相关费用Exclude

Adjusted metrics:

调整后营业收入 = 营业收入 - 其他业务收入
调整后营业成本 = 营业成本 (core only)
调整毛利率 = 调整后毛利 / 调整后收入

Step 7: Balance Sheet Clean-up

Balance sheet mapping:

CAS ItemModeling Category
货币资金Cash & equivalents
交易性金融资产Short-term investments
应收票据Notes receivable
应收账款Accounts receivable
预付款项Prepayments
其他应收款Other receivables
存货Inventory
其他流动资产Other current assets
长期股权投资Long-term investments
固定资产PPE
在建工程Construction in progress
无形资产Intangibles
商誉Goodwill
长期待摊费用Deferred charges
其他非流动资产Other non-current
短期借款Short-term debt
应付票据Notes payable
应付账款Accounts payable
合同负债Contract liabilities
应付职工薪酬Accrued compensation
应交税费Taxes payable
其他应付款Other payables
一年内到期非流动负债Current portion LTD
长期借款Long-term debt
应付债券Bonds payable
预计负债Provisions
递延所得税负债DTL
其他非流动负债Other non-current
股本Share capital
资本公积Capital reserve
盈余公积Retained earnings (statutory)
未分配利润Retained earnings
归属于母公司股东权益Parent equity
少数股东权益Minority interest

Step 8: Quality Checks

Data quality checklist:

CheckPass Criteria
Balance sheet balancesAssets = Liabilities + Equity
Cash flow tiesCF = ending cash - beginning cash
Revenue matchesCross-check with segment data
Tax reasonableTax / pre-tax income ~25%
Depreciation consistentD&A / PPE stable
Interest matchesInterest / debt reasonable

China-Specific Data Issues

Common Issues

IssueExampleFix
单位不一致Some 千元, some 元Standardize
会计政策变更Revenue recognition changeAdjust comparables
报表格式变化New line itemsMap to old format
追溯调整Prior period restatementUse restated figures
外币报表Subsidiary in USDConvert to CNY

CAS-Specific Treatments

ItemCAS Treatment
研发费用Must be expensed (not capitalized, generally)
政府补助总额法 vs 净额法
股份支付Expensed over vesting period
保险合同CAS 25 (if applicable)

Quality Checks

Before passing data for modeling:

  • All periods complete
  • Units standardized
  • Balance sheet balances
  • Cash flow ties
  • CAS items correctly mapped
  • Non-recurring items flagged
  • Restatements applied
  • Quality issues documented

Data Source Mode Switch: Set env var IFIND_DATA_SOURCE_MODE to control data source preference.

  • ifind-only (strict): Use iFind only, error if unavailable
  • ifind-fallback (default): iFind preferred, fallback to AkShare
  • akshare-only: Skip iFind, use AkShare only
  • wind-only: Wind only, error if unavailable
  • wind-fallback: Wind first, fallback to iFind → AkShare

Frequently asked questions

What does the China Clean Data Xls AI skill do?

Clean and normalize A-share financial data for modeling. Adapts the original clean-data-xls skill for Chinese financial statements, CAS conventions, and A-share data formats. Triggers on "A股数据清洗", "财务数据清洗", "clean financial data China", "数据清洗", or "normalize financial statements".

Why use China Clean Data Xls on TypingMind?

Because you install it once and use it with any model. China Clean Data Xls is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install China Clean Data Xls in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jwangkun/claude-for-financial-services-cn/tree/main/agent-plugins/china-earnings-reviewer/skills/china-clean-data-xls. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use China Clean Data Xls?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with China Clean Data Xls?

As many as you like. As long as a model supports skills, you can use China Clean Data Xls with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the China Clean Data Xls AI skill free?

Yes. It is published on GitHub by jwangkun under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇