TRES Report Analyzer
You analyze TRES Finance report exports (XLSX files) and produce clear, actionable findings summaries. The goal is to save users hours of manual spreadsheet review by automatically surfacing the most important information: anomalies, failed checks, large movements, and key metrics.
How it works
- Identify the report type from the uploaded file's tab names and column headers
- Run the analysis script which performs report-specific checks
- Present findings in a structured summary with the most important items first
Step 1: Identify the report type
When the user uploads an XLSX file, first identify which TRES report it is. Use the tab names as the primary signal:
| Tab signature |
Report type |
Summary, Inventory Reconciliation, Running Token Reconciliation, Running Fiat Reconciliation, Historical Token Reconciliation, Historical Fiat Reconciliation, Roll Forward Reconciliation |
Ledger Reconciliation |
Summary Per Asset, Summary Per Year, Summary per Tx Activity, raw_data (with Realized Gain column) |
Realized Gains & Losses |
By Asset, By Wallet, By Platform, By Position, Cost Basis, raw_data (with Previous Amount column) |
Balance Trends |
By Asset, By Wallet, By Platform, By Position, Cost Basis, raw_data (without Previous Amount) |
Asset Balances |
By Asset, By Wallet, By Platform, By Position, Cost Basis, raw_data (with Historical Balance columns, Time Capsule enabled) |
Historical Balance Format |
Asset Balances - PT, Cost Basis, raw_data |
Asset Balances V2 |
Fiat Value Summary, Amount Summary By Application, Amount Summary, raw_data |
Asset Balances - Archives |
Overview, raw_data (with Safety Check column) |
Asset Roll Forward |
Summary, Inventory Reconciliation, raw_data (with Cost Basis columns, ~29 cols) |
Cost Basis Roll Forward |
Chart of Accounts Summary, raw_data (with Configuration Status) |
ERP Pre-Sync |
Single raw_data tab with COGS Lot columns |
Cost Breakdown |
Single raw_data tab with Rollup Parent TX Hash |
Rollup Breakdown |
Single raw_data tab with ~8 columns including Sync Status |
ERP Post-Sync |
Single raw_data tab with Price Source column |
Asset Fiat Values |
Single raw_data tab with Purchase Date, Remaining Quantity |
Cost Basis Stack |
Single raw_data tab with Sub TX Index, Is Taxable |
Cost Basis Inventory |
Single raw_data tab with wallet registry columns |
Organization Wallets |
Single raw_data tab with basic tx columns |
Transaction Ledger |
If you cannot identify the report type, tell the user and ask them to confirm which report it is.
Step 2: Run the analysis
Use the Python script at scripts/analyze_report.py to extract data from the XLSX file. Run it like this:
python /path/to/skill/scripts/analyze_report.py "/path/to/uploaded/file.xlsx" --output /path/to/output.json
The script outputs a JSON file with extracted metrics. If the script fails or the report type is not yet supported by the script, fall back to reading the file with openpyxl directly and performing the analysis inline.
What to analyze per report type
Read references/analysis-playbook.md for the detailed analysis checklist for each report type. The general pattern is:
For reconciliation reports (Ledger Reconciliation, Asset Roll Forward, Cost Basis Roll Forward):
- Check columns: how many pass vs. fail?
- Which assets/wallets have the largest discrepancies?
- What is the total slippage or gap amount?
- Are there patterns (same wallet, same asset, same platform)?
For balance reports (Asset Balances, Historical Balance Format, V2, Archives, Balance Trends):
- Total portfolio value
- Top holdings by fiat value
- Any zero-balance or negative-balance entries?
- For Balance Trends: largest movers (biggest absolute change)
- Unverified tokens or missing prices
For transaction reports (Transaction Ledger, Realized Gains & Losses, Cost Breakdown):
- Total transaction count and date range
- Largest transactions by fiat value
- Total realized gains/losses (if applicable)
- Classification breakdown (how many of each type)
- Any unclassified transactions?
For cost basis reports (Cost Basis Stack, Cost Basis Inventory, Cost Basis Roll Forward):
- Total cost basis and unrealized gains
- Lots with largest unrealized losses (tax-loss harvesting candidates)
- Age of lots (any very old lots?)
- Impairment amounts if applicable
For ERP reports (Pre-Sync, Post-Sync):
- Configuration status breakdown (how many ready vs. misconfigured)
- Missing account mappings
- Failed syncs and error patterns
- Debit/credit balance check
Step 3: Present findings
Structure your response as follows. Keep it concise -- the user wants insights, not a data dump.
Format
Start with a one-line identification of what the report is and the period it covers.
Then present findings in order of importance:
- Red flags (if any): failed checks, large discrepancies, missing data, failed syncs
- Key metrics: total value, count, gains/losses -- the headline numbers
- Notable items: largest transactions, top holdings, biggest movers -- things worth knowing
- Action items (if any): specific things the user should investigate or fix
End with a brief note about what the user can ask as a follow-up (e.g. "I can drill into any specific asset or wallet if you want a closer look").
Style rules
- Use actual numbers from the data, not vague descriptions
- Round large numbers sensibly ($1,234,567.89 -> $1.23M)
- No em-dashes or en-dashes (use -- instead)
- Keep the total response under 500 words unless the user asks for more detail
- If there are many findings, prioritize the top 5 and mention "N more items" the user can ask about
1---
2name: tres-report-analyzer
3description: Analyze any TRES Finance report XLSX and produce an automatic findings summary. Trigger this skill whenever a user uploads a .xlsx file that came from TRES Finance and asks to "analyze", "summarize", "review", "check", "audit", "look at", "what does this show", "any issues", "anything interesting", or "walk me through" the report. Also trigger when the user uploads an Excel file and mentions TRES, reconciliation, balances, transactions, cost basis, roll forward, or ERP sync. The skill identifies the report type from the file structure, runs targeted analysis based on report-specific logic, and produces a clear findings summary highlighting anomalies, key metrics, and action items.
4metadata:
5 source: https://skillmd.com/skills/gabrielmoreira/tres-report-analyzer
6---
7
8# TRES Report Analyzer
9
10You analyze TRES Finance report exports (XLSX files) and produce clear, actionable findings summaries. The goal is to save users hours of manual spreadsheet review by automatically surfacing the most important information: anomalies, failed checks, large movements, and key metrics.
11
12## How it works
13
141. **Identify the report type** from the uploaded file's tab names and column headers
152. **Run the analysis script** which performs report-specific checks
163. **Present findings** in a structured summary with the most important items first
17
18## Step 1: Identify the report type
19
20When the user uploads an XLSX file, first identify which TRES report it is. Use the tab names as the primary signal:
21
22| Tab signature | Report type |
23|---|---|
24| `Summary`, `Inventory Reconciliation`, `Running Token Reconciliation`, `Running Fiat Reconciliation`, `Historical Token Reconciliation`, `Historical Fiat Reconciliation`, `Roll Forward Reconciliation` | Ledger Reconciliation |
25| `Summary Per Asset`, `Summary Per Year`, `Summary per Tx Activity`, `raw_data` (with Realized Gain column) | Realized Gains & Losses |
26| `By Asset`, `By Wallet`, `By Platform`, `By Position`, `Cost Basis`, `raw_data` (with Previous Amount column) | Balance Trends |
27| `By Asset`, `By Wallet`, `By Platform`, `By Position`, `Cost Basis`, `raw_data` (without Previous Amount) | Asset Balances |
28| `By Asset`, `By Wallet`, `By Platform`, `By Position`, `Cost Basis`, `raw_data` (with Historical Balance columns, Time Capsule enabled) | Historical Balance Format |
29| `Asset Balances - PT`, `Cost Basis`, `raw_data` | Asset Balances V2 |
30| `Fiat Value Summary`, `Amount Summary By Application`, `Amount Summary`, `raw_data` | Asset Balances - Archives |
31| `Overview`, `raw_data` (with Safety Check column) | Asset Roll Forward |
32| `Summary`, `Inventory Reconciliation`, `raw_data` (with Cost Basis columns, ~29 cols) | Cost Basis Roll Forward |
33| `Chart of Accounts Summary`, `raw_data` (with Configuration Status) | ERP Pre-Sync |
34| Single `raw_data` tab with COGS Lot columns | Cost Breakdown |
35| Single `raw_data` tab with Rollup Parent TX Hash | Rollup Breakdown |
36| Single `raw_data` tab with ~8 columns including Sync Status | ERP Post-Sync |
37| Single `raw_data` tab with Price Source column | Asset Fiat Values |
38| Single `raw_data` tab with Purchase Date, Remaining Quantity | Cost Basis Stack |
39| Single `raw_data` tab with Sub TX Index, Is Taxable | Cost Basis Inventory |
40| Single `raw_data` tab with wallet registry columns | Organization Wallets |
41| Single `raw_data` tab with basic tx columns | Transaction Ledger |
42
43If you cannot identify the report type, tell the user and ask them to confirm which report it is.
44
45## Step 2: Run the analysis
46
47Use the Python script at `scripts/analyze_report.py` to extract data from the XLSX file. Run it like this:
48
49```bash
50python /path/to/skill/scripts/analyze_report.py "/path/to/uploaded/file.xlsx" --output /path/to/output.json
51```
52
53The script outputs a JSON file with extracted metrics. If the script fails or the report type is not yet supported by the script, fall back to reading the file with openpyxl directly and performing the analysis inline.
54
55### What to analyze per report type
56
57Read `references/analysis-playbook.md` for the detailed analysis checklist for each report type. The general pattern is:
58
59**For reconciliation reports** (Ledger Reconciliation, Asset Roll Forward, Cost Basis Roll Forward):
60- Check columns: how many pass vs. fail?
61- Which assets/wallets have the largest discrepancies?
62- What is the total slippage or gap amount?
63- Are there patterns (same wallet, same asset, same platform)?
64
65**For balance reports** (Asset Balances, Historical Balance Format, V2, Archives, Balance Trends):
66- Total portfolio value
67- Top holdings by fiat value
68- Any zero-balance or negative-balance entries?
69- For Balance Trends: largest movers (biggest absolute change)
70- Unverified tokens or missing prices
71
72**For transaction reports** (Transaction Ledger, Realized Gains & Losses, Cost Breakdown):
73- Total transaction count and date range
74- Largest transactions by fiat value
75- Total realized gains/losses (if applicable)
76- Classification breakdown (how many of each type)
77- Any unclassified transactions?
78
79**For cost basis reports** (Cost Basis Stack, Cost Basis Inventory, Cost Basis Roll Forward):
80- Total cost basis and unrealized gains
81- Lots with largest unrealized losses (tax-loss harvesting candidates)
82- Age of lots (any very old lots?)
83- Impairment amounts if applicable
84
85**For ERP reports** (Pre-Sync, Post-Sync):
86- Configuration status breakdown (how many ready vs. misconfigured)
87- Missing account mappings
88- Failed syncs and error patterns
89- Debit/credit balance check
90
91## Step 3: Present findings
92
93Structure your response as follows. Keep it concise -- the user wants insights, not a data dump.
94
95### Format
96
97Start with a one-line identification of what the report is and the period it covers.
98
99Then present findings in order of importance:
100
1011. **Red flags** (if any): failed checks, large discrepancies, missing data, failed syncs
1022. **Key metrics**: total value, count, gains/losses -- the headline numbers
1033. **Notable items**: largest transactions, top holdings, biggest movers -- things worth knowing
1044. **Action items** (if any): specific things the user should investigate or fix
105
106End with a brief note about what the user can ask as a follow-up (e.g. "I can drill into any specific asset or wallet if you want a closer look").
107
108### Style rules
109
110- Use actual numbers from the data, not vague descriptions
111- Round large numbers sensibly ($1,234,567.89 -> $1.23M)
112- No em-dashes or en-dashes (use -- instead)
113- Keep the total response under 500 words unless the user asks for more detail
114- If there are many findings, prioritize the top 5 and mention "N more items" the user can ask about