finance-analyzer
/install finance-analyzer
Finance Analyzer
Overview
This skill enables reading and analyzing financial statements from Excel (.xlsx/.xls) and CSV files. It understands the structure of Income Statements (损益表), Balance Sheets (资产负债表), and Cash Flow Statements (现金流量表), extracts key line items, and calculates core financial metrics including ROE, ROA, gross margin (毛利率), and net margin (净利率).
Workflow
Step 1: Identify the Input File
Confirm the user has provided or referenced an Excel/CSV file containing financial statements. Supported formats:
.xlsx/.xls(Excel workbook, may contain multiple sheets).csv(single sheet)
If the user has not provided a file, ask them to provide the financial statement file.
Step 2: Install Dependencies
Before running the analysis script, ensure required Python packages are available:
pip install pandas openpyxl
Step 3: Run the Analysis Script
Execute the bundled analysis script to parse the financial data and calculate metrics:
python3 {SKILL_DIR}/scripts/analyze_financials.py \x3Cfile_path>
Optional arguments:
--sheet \x3Csheet_name>— Analyze a specific sheet only--output \x3Coutput.json>— Save results to a JSON file
The script automatically:
- Detects sheet types (Income Statement, Balance Sheet, Cash Flow) by sheet name keywords
- Falls back to content-based detection if sheet names are ambiguous
- Extracts key financial line items using Chinese and English keyword matching
- Calculates all available metrics from the extracted data
Step 4: Interpret and Present Results
After running the script, interpret the JSON output for the user. The output contains:
parsed_data: Raw extracted values from each statement typemetrics: Calculated financial metrics with values, formulas, and component breakdownswarnings: Any data items that could not be found or calculated
When presenting results to the user:
- Display the core metrics the user requested (typically ROE, ROA, gross margin, net margin) in a clear table format
- Show the calculation formula and components so the user can verify the numbers
- Flag any warnings — explain which metrics could not be calculated and why (e.g., missing data)
- Provide professional interpretation — reference
references/financial_statements_guide.mdfor benchmark ranges and contextual analysis
Example output format:
| 指标 | 数值 | 公式 |
|------|------|------|
| ROE(净资产收益率) | 18.5% | 净利润 / 股东权益 × 100% |
| ROA(总资产收益率) | 8.2% | 净利润 / 总资产 × 100% |
| 毛利率 | 35.6% | 毛利润 / 营业收入 × 100% |
| 净利率 | 12.3% | 净利润 / 营业收入 × 100% |
Step 5: Handle Edge Cases
- Unrecognized sheet names: If the script cannot detect sheet types, prompt the user to specify which sheet contains which statement using
--sheet - Missing data: If key line items cannot be found, read the file directly to inspect the format, then adjust the approach or guide the user
- Multiple periods: The script extracts the most recent period's data by default. If the user needs trend analysis across periods, read the file manually and perform the comparison
- Unit differences: Check if amounts are in 元, 万元, or 百万元, and normalize if needed before interpretation
Reference Material
For detailed information about financial statement structures, metric definitions, benchmark ranges, and interpretation guidance, refer to references/financial_statements_guide.md. This reference covers:
- Structure of all three financial statements (Chinese and English)
- Core metric formulas and industry benchmarks
- DuPont analysis framework
- Common Excel format patterns and parsing considerations
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install finance-analyzer - 安装完成后,直接呼叫该 Skill 的名称或使用
/finance-analyzer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
finance-analyzer 是什么?
This skill should be used when a user needs to analyze financial statements (Income Statement, Balance Sheet, Cash Flow Statement) from Excel or CSV files. I... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 304 次。
如何安装 finance-analyzer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install finance-analyzer」即可一键安装,无需额外配置。
finance-analyzer 是免费的吗?
是的,finance-analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
finance-analyzer 支持哪些平台?
finance-analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 finance-analyzer?
由 zhengmengkaiZMK(@zhengmengkaizmk)开发并维护,当前版本 v1.0.1。