tres-report-create
Create (generate) any TRES Finance report end-to-end via the tres-mcp MCP server and GraphQL — trigger the export, verify a report row was actually created (guarding against silent failures), poll until done, and return the download link. Trigger this skill on ANY report creation request, including phrases like "create a report", "generate a report", "export", "run a report", "I need a Transaction Ledger / Balances / Reconciliation / Cost Basis / Roll Forward / Staking / Audit report", "pull the data for", "download a report for", "give me a CSV/XLSX of", or whenever the user wants TRES to produce a report file. Use together with tres-report-advisor when the user is unsure which report they need.
git clone --depth 1 https://github.com/anthropics/claude-plugins-community /tmp/tres-report-create && cp -r /tmp/tres-report-create/tres-finance-plugin/skills/tres-report-create ~/.claude/skills/tres-report-createSKILL.md
# TRES Report Create
You create TRES Finance reports programmatically through the **tres-mcp** MCP server (GraphQL against the BFF). The flow is always: pick the report → trigger the export → poll until `DONE` → return the presigned `link`. Optionally download and analyze the file afterwards.
If you are unsure *which* report the user needs, use the `tres-report-advisor` skill first, then come back here to generate it.
## Workflow
```
- [ ] Step 0: Clarify report type + date range + currency
- [ ] Step 1: Trigger the export (GraphQL via MCP `execute`)
- [ ] Step 1b: If the report isn't in the tables below, derive it from the schema
- [ ] Step 1c: VERIFY a report row was actually created (poll by exact name) — catches silent failures
- [ ] Step 2: Poll the report query until status == DONE
- [ ] Step 3 (optional): Download + analyze the file
```
### Step 0 — Clarify scope (mandatory before triggering)
Confirm before doing anything:
- **Report type (required).** Match the user's wording to the tables below. If unsure, discover what's available:
```graphql
query { availableReportTypes { name exportType entitiesType llmDescription } }
```
- **Date range (if applicable).** LEDGER / AUDIT_LOG reports take `timestamp_Gte` / `timestamp_Lte` in ISO 8601:
- "Q1 2025" → Gte `2025-01-01T00:00:00Z`, Lte `2025-03-31T23:59:59Z`
- "2025" → Gte `2025-01-01T00:00:00Z`, Lte `2025-12-31T23:59:59Z`
- If a date range is required and not given, **ask**.
- **Currency.** Default `"usd"` unless the user says otherwise.
- **Analysis goal (only if they want the data analyzed, not just the file).** What should the data answer? Default to a general summary (totals, top items, trends). Drives Step 3.
Confirm briefly, e.g. *"I'll generate a Transaction Ledger for Q1 2025 as CSV. Starting now."*
### Step 1 — Trigger the export
Call the GraphQL query that matches the report's `entitiesType`, passing the export parameters. Run it with the MCP `execute` tool (validate first with `validate_query` if unsure).
**`entitiesType` → query to call**
| entitiesType | Query |
|---|---|
| LEDGER | `transaction` |
| ASSETS | `organizationBalance` |
| BALANCE | `organizationBalance` |
| HISTORICAL_BALANCE | `organizationBalance` |
| ACCOUNTS | `internalAccount` |
| GENERAL | `internalAccount` |
| STAKING_DATA | `stakingYieldRecord` |
| AUDIT_LOG | `auditLog` |
| LOGIN_HISTORY | `loginHistoryExport` |
**Report catalog (`exportFormat` values — verified against prod)**
| Report name | exportFormat | entitiesType |
|---|---|---|
| Transaction Ledger | BASIC_RAW_TRANSACTIONS | LEDGER |
| Realized Gains & Losses | EXTENDED_RAW_TRANSACTIONS | LEDGER |
| Cost Breakdown Raw Transactions | COST_BREAKDOWN_RAW_TRANSACTIONS | LEDGER |
| Rollup Breakdown † | ROLLUP_BREAKDOWN | LEDGER |
| Ledger Reconciliation | RECONCILIATION | LEDGER |
| Cost Basis Roll Forward | COST_BASIS_ROLL_FORWARD | LEDGER |
| Asset Roll Forward | ASSET_ROLL_FORWARD | LEDGER |
| ERP Pre-Sync | PRE_SYNC_JOURNAL | LEDGER |
| ERP Post-Sync | POST_SYNC_JOURNAL | LEDGER |
| MT940 Statement | MT940 | LEDGER |
| Asset Balances | RAW_BALANCES | ASSETS |
| Asset Balances V2 | RAW_BALANCES_V2 | ASSETS |
| Asset Balances - Archives † | ARCHIVED_BALANCES | ASSETS |
| Balance Trends | BALANCE_TRENDS | ASSETS |
| Wallet Balances | INTERNAL_ACCOUNTS_BALANCES | ASSETS |
| Cost Basis Stack Per Asset | COST_BASIS_STACK_PER_ASSET | ASSETS |
| Asset Fiat Values | DAILY_ASSET_PRICING | ASSETS |
| Revaluation Report | REEVALUATION | ASSETS |
| Historical Balance Format | HISTORICAL_BALANCE | HISTORICAL_BALANCE |
| Cost Basis Inventory † | COST_BASIS_INVENTORY | BALANCE |
| Organization Wallets | INTERNAL_ACCOUNTS | ACCOUNTS |
| Contacts | CONTACTS | ACCOUNTS |
| Third Party Addresses | THIRD_PARTY_ADDRESSES | ACCOUNTS |
| Chart of Account | CHART_OF_ACCOUNT | GENERAL |
| ERP Rules | ERP_RULES | GENERAL |
| Connected Custodians | CONNECTED_CUSTODIANS | GENERAL |
| Staking Rewards & Positions | STAKING_DATA | STAKING_DATA |
| Audit Trail / Log | AUDIT_LOG | AUDIT_LOG |
| Login History | LOGIN_HISTORY | LOGIN_HISTORY |
† = special handling (see "Reports needing extra parameters" below). The org catalog evolves — `availableReportTypes` is authoritative. **If a requested report isn't in this table, go to Step 1b and derive it from the schema** rather than guessing.
**Export parameters (always include):**
- `exportFormat` — value from the table above (UPPER_CASE)
- `exportName` — a descriptive, unique name (e.g. `"Transaction Ledger Q1 2025"`) — you'll match on this in Step 2
- `currency` — `"usd"` unless told otherwise
- `outputFormat` — `"CSV"` for downstream analysis, or `"XLSX"` if the user wants a spreadsheet
Add `timestamp_Gte` / `timestamp_Lte` for date-ranged reports (LEDGER, AUDIT_LOG).
> ### ⚠️ GraphQL variable types — get these EXACTLY right (first-run correctness)
>
> The BFF **strictly validates variable types**. A wrong type returns HTTP 400 and **no report is created** — and the `execute` tool surfaces this under an `error` / `error_type` field, *not* the GraphQL `errors` array, so it is easy to miss. Declare variables with these exact types:
>
> | Variable | GraphQL type | Notes |
> |---|---|---|
> | `exportFormat` | `String` | the UPPER_CASE value |
> | `exportName` | `String` | unique name |
> | `currency` | `String` | e.g. `"usd"` |
> | `outputFormat` | **`ReportOutputFormat`** | NOT `String`. Value `"CSV"` / `"XLSX"` |
> | `timestamp_Gte` / `timestamp_Lte` | **`DateTime`** | NOT `String`. ISO 8601 value |
> | `identifier_In`, `children_Asset_AssetClass_In`, `children_BelongsTo_In` | **`[String]`** | NOT `[ID]` |
>
> The params must be passed as **variables named exactly** `exportName`, `exportFormat`, etc. — the BFF reads them from `info.variable_values` by name. Inline literals or renamed variables (`$ef`) silently create **no** report.
Example — trigger a Transaction Ledger export (verified working form):
```graphql
query($limit: Int, $offset: Int,Explain a topic like I'm a 5 year old. Use when the user types /eli5 <topic> or asks for a dead-simple picture explainer of how something works.
Use the `quickdesign` CLI to generate AI media — UGC promo videos, image edits, product creatives, video upscales — through Seedance, Kling, Sora2, Nano Banana, and GPT Image. Invoke this skill whenever the user asks for a talking-avatar video, multi-segment ad / promo / explainer, image edit (object swap, angle change, state change), product photoshoot, or video upscale via QuickDesign.
Use only when the user explicitly asks for a TestDino audit of Playwright automated test code. Routes through the audit tools the TestDino MCP server exposes (get_audit_report + submit_audit_report, or the legacy test_audit). For generic code review or non-Playwright targets, do a normal review instead.
Use when the user wants to check TestDino connection status, validate their PAT, discover available organizations and projects, or find the right projectId. Always call this first when the project context is ambiguous before any other TestDino tool.
Use when the user wants to manage a manual execution run or update case-level results inside a run — listing runs, creating runs for a release, inspecting a run, assigning cases, or marking case results (passed/failed/blocked/skipped/retest/untested). Accepts counter-style IDs like RUN-12 and TC-156.
Use when the user wants to create, update, or browse manual QA test cases and suites in TestDino — not execution runs. Covers list_manual_test_suites, list_manual_test_cases, get_manual_test_case, create_manual_test_case, update_manual_test_case, create_manual_test_suite.
Use when the user wants to browse, inspect, create, or update releases/milestones in a TestDino project. Covers list_releases, get_release, create_release, and update_release. Accepts counter-style IDs like MS-12.
Use when the user wants to inspect automated test runs, list failed or flaky tests, debug a failing testcase with historical context, or filter runs by branch, commit, author, environment, browser, status, or tags. Includes list_testruns, get_run_details, list_testcase, get_testcase_details, and debug_testcase.