Agent skill
dr-extract
Extract validated financial data from Datarails Finance OS to Excel. Creates workbooks with P&L, Balance Sheet, KPIs (including ARR), and validation checks.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/extract-datarails-dr-claude-code-plugi
SKILL.md
Datarails Financial Data Extraction
Extract validated financial data from Finance OS to Excel workbooks with:
- P&L Data: Revenue, COGS, Operating Expenses by month
- KPI Data: ARR, Net New ARR, Churn, LTV, Revenue by quarter
- Validation: Cross-checks between P&L and KPI tables
Arguments
| Argument | Description | Default |
|---|---|---|
--output <file> |
Output filename | tmp/Financial_Extract_YYYY.xlsx |
--scenario <name> |
Primary scenario | Actuals |
--year <YYYY> |
Calendar year to extract | Current year |
Workflow
Step 1: Verify Connection
If any Datarails tool call fails with an authentication or connection error, tell the user:
The Datarails connector isn't connected. Click the "+" button next to the prompt, select Connectors, find Datarails, and click Connect.
Then STOP — do not retry until the user has reconnected.
Step 2: Run Extraction via MCP Tool
Call the extract_financials MCP tool with the parsed arguments:
Use: extract_financials
Arguments:
year: <parsed year, default current year>
scenario: <parsed scenario, default "Actuals">
output_path: <parsed output, or omit for default>
The tool handles:
- Loading the client profile for the environment
- Pagination (500 rows per request) with auto token refresh
- Client-side aggregation
- Excel generation with openpyxl
Step 3: Report Results
Present the extraction summary to the user:
- Output file path
- Year and scenario extracted
- Any errors or warnings
Expected Output
The tool generates an Excel workbook with:
- Summary sheet: Key totals and metrics
- P&L sheet: Monthly breakdown by account category
- KPIs sheet: Quarterly KPI values
- Validation sheet: Cross-checks and profile info
Output location: tmp/ folder (configurable via --output)
Troubleshooting
"profile_not_found" error
Run /dr-learn first to create a profile.
"missing_dependency" error
The MCP server is hosted remotely — this error should not occur. If it does, contact support.
Token expires during extraction
The script auto-refreshes tokens every 20K rows. If you still get 401 errors:
- Reconnect via Connectors UI ("+" > Connectors > Datarails)
Missing months in data
Check System_Year filter value - must be a string ("2025"), not integer.
Related Skills
- Connect via Connectors UI first
/dr-learn- Create/update client profile/dr-tables- Explore available tables/dr-query- Investigate specific records
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?