Financial csv tool
General-purpose command-line transformer for financial and transaction CSV exports (bank, card, vendor billing). Use when an agent needs to filter, map, reshape, group, or conditionally expand statement rows into a target import schema.From its SKILL.md
npx -y skills add sammdu/financial-csv-tool --skill financial_csv_toolAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
financial_csv_tool
A single PEP 723 self-contained uv script: scripts/financial_csv_tool.py. Run it from this skill directory with uv run scripts/financial_csv_tool.py INPUT [flags].
Flag reference
uv run scripts/financial_csv_tool.py --help is the authoritative flag list. Do not rely on this skill for per-flag details; it documents only what --help cannot convey.
Processing order
Transforms run in a fixed order regardless of flag order on the command line:
- Parse input:
--skip-lines-start/--skip-lines-end, delimiter, cell stripping - Exact-value row filtering with
--where --group-bywith--groupand--group-collapse--rename--split--map--date- Date-range filtering
--coalesce, then--concat--expand, selected by--expand-bywhen present (also runs when--group-byis given without--group-collapse, laying out each group as a top entry with continuation rows)- Column selection (
--template,--keep,--drop) and--requirechecks
Consequences:
--group-byand--groupreference original input column names; they run before--rename. The group key is tracked through renames for the expand step.--split,--date,--coalesce,--concat, and--expandreference post-rename names and may consume columns created by earlier steps (a--concatsource can be a--dateoutput, an--expandamount can be a--splitoutput).--map "OUT=COL" "SOURCE=OUTPUT" ...maps every retained source value and fails on unmapped values.--concat-sep "OUT=SEP"overrides the separator for one--concatoutput; repeat it for other outputs. Unspecified outputs use a space, and an emptySEPjoins fields directly.--expand-by COLselects rules written asVALUE=AMOUNT_COL[,COL...]=ACCOUNT:side;*selects every row.--keep,--drop, and--requiresee the final post-transform columns.
Group and expand
--group-by COLreduces rows sharing a key. Repeat--group "OUT=COL[,COL...]"for derived values, choose the reducer with--group-type, and add--group-collapsewhen only the first row of each group should remain.--expandturns one row into multiple lines. Without--expand-by, rules useAMOUNT_COL[,COL...]=ACCOUNT:sideand apply to every row.--expand-by COLselects rules by field value. Rules useVALUE=AMOUNT_COL[,COL...]=ACCOUNT:side; use*for a rule shared by every value.- Grouping and expansion may be combined: grouping establishes parent-entry boundaries and values, then expansion emits their child lines.
Skip-lines symmetry
Exports wrapped in metadata take --skip-lines-start N for lines before the real header and --skip-lines-end M for trailer lines after the data. Both count physical lines. Blank lines inside the data are dropped automatically and need no skipping.
Input and output
- Input
-(or omitting the argument) readsSTDIN; output then goes to stdout unless-ois given. - A file input without
-owrites<input stem>.transformed.csvnext to the input. - Output reuses the input delimiter, so a tab-separated input stays tab-separated.
Keep transforms minimal
Preserve source columns and add as few new ones as possible. Only trim columns (--keep, --drop, --template) when the downstream importer requires a fixed header.
Stay context-agnostic
The tool is vendor-, business-, and importer-agnostic: all vendor-, business-, and importer-specific choices belong in command-line flags, never in its code. Usage of this skill is context-agnostic too; accounting treatment and target-system conventions belong to downstream skills.
Examples
Split a signed amount column into Deposit and Withdrawal by sign:
uv run scripts/financial_csv_tool.py statement.csv --split from=Amount to=Deposit,Withdrawal by=sign
Keep only rows with a specific transaction type:
uv run scripts/financial_csv_tool.py statement.csv --where "Type=Payment"
Map source values and select matching expansion rules:
uv run scripts/financial_csv_tool.py activity.csv --map "Entry Type=Type" "Charge=Journal Entry" "Payment=Bank Entry" --expand-by Type --expand "Charge=Amount=Expense:debit" --expand "Payment=Amount=Bank:credit"
Skip a 4-line preamble and a 2-line footer around the real header, normalizing the date column:
uv run scripts/financial_csv_tool.py export.csv --skip-lines-start 4 --skip-lines-end 2 --date "Date=Posted Date"
Verification
After transforming a financial statement, reconcile the output against the source: row count and per-amount-column sums must match to the cent. Report intentional exclusions, such as rows removed by date-range filtering or skipped lines, together with their totals.
What ships with it: 3 files
21.6 KB alongside SKILL.md, 1 of them executable
evals/
- evals.json1.0 KB
- fixtures/wrapped_statement.csv129 B
scripts/
- financial_csv_tool.pyruns20.4 KB
Gives 0 of the 12 instructions most finance skills give in ~1.2k tokens
Counted across 469 of the 469 authors here whose files we hold, read 2026-08-07
- Extract date vendor amount and descriptionin 15 of 469, across 3 files
- Scan folder for invoice filesin 14 of 469, across 2 files
- Rename files to standard formatin 14 of 469, across 2 files
- Show organization plan before movingin 14 of 469, across 2 files
- Generate summary CSVin 14 of 469, across 2 files
- Organize files by categoryin 13 of 469, across 1 file
- Preserve original filesin 13 of 469, across 1 file
- Flag files missing critical infoin 13 of 469, across 1 file
- Produce the requested output filein 9 of 469, across 4 files
- Build best, base, and worst case scenariosin 9 of 469, across 5 files
- Implement backoff if rate limit errors occurin 8 of 469, across 3 files
- Determine the weighted average cost of capitalin 8 of 469, across 4 files
Said here and by no other author read
- consult --help for authoritative flag details
- preserve source columns and add few new ones
- trim columns only when importer requires fixed header
- keep vendor-specific choices in command-line flags only
- leave accounting treatment to downstream skills
- leave target-system conventions to downstream skills
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.