finance-query

finance-query is a skill for Claude Code, Codex from weklund/fiduciary. It costs 43 tokens per session (728 once invoked), scanned A, original, MIT.

A finance assistant that answers questions using a local SQLite ledger of account balances and transactions. SQLite is a small database stored in a file.

In plain words
What is it for?
Use it to review balances, transactions, spending patterns, merchants, income, and recent purchases.
Why use it?
It turns raw transaction records into answers about spending, income, purchases, and account status.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/weklund/fiduciary/finance-query
Any agent
npx skills add weklund/fiduciary --skill finance-query
Clone the repo
git clone --depth 1 https://github.com/weklund/fiduciary

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for finance-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/weklund/fiduciary/finance-query.svg)](https://agentmods.dev/skills/weklund/fiduciary/finance-query)
Your own site
<a href="https://agentmods.dev/skills/weklund/fiduciary/finance-query"><img src="https://agentmods.dev/badge/skills/weklund/fiduciary/finance-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00728
Opus 5 $0.00022 $0.00364
Sonnet 5 $0.00009 $0.00146
Haiku 4.5 $0.00004 $0.00073

Measured 5d ago against content hash e96f294745f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

finance-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/finance-query/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Instructions

Answer the user's financial question using the unified SQLite ledger.

Data source

Primary: data/finance.db (SQLite — unified ledger of all transactions from Plaid + CSVs)

Query with: sqlite3 data/finance.db "SELECT ..."

Fallback (if DB missing): data/latest/*.json

Schema

transactions (
  id TEXT PRIMARY KEY,
  date TEXT,           -- ISO format YYYY-MM-DD
  description TEXT,
  amount REAL,         -- POSITIVE = debit (money spent), NEGATIVE = credit (income/refund)
  merchant TEXT,
  category TEXT,       -- Plaid category (may be empty for CSV-sourced)
  account_name TEXT,
  account_mask TEXT,   -- last 4 digits
  account_type TEXT,   -- depository, credit, loan, investment
  institution TEXT,
  source TEXT,         -- 'plaid' or 'csv'
  source_file TEXT
);

accounts (
  account_id TEXT PRIMARY KEY,
  name TEXT,
  type TEXT,
  subtype TEXT,
  mask TEXT,
  institution_id TEXT,
  balance_current REAL,
  balance_available REAL,
  balance_limit REAL,
  last_updated TEXT
);

Steps

  1. Check if data/finance.db exists. If not, suggest running python3 scripts/ingest.py first.
  2. Query the database using sqlite3 to answer the user's question.
  3. Present results clearly with specific numbers, dates, and merchant names.

Query patterns

# Date range spending
sqlite3 data/finance.db "SELECT description, amount, date FROM transactions WHERE date >= '2026-06-01' AND amount > 0 ORDER BY amount DESC LIMIT 20"

# Spending by merchant
sqlite3 data/finance.db "SELECT description, SUM(amount), COUNT(*) FROM transactions WHERE amount > 0 GROUP BY description ORDER BY SUM(amount) DESC LIMIT 20"

# Monthly totals
sqlite3 data/finance.db "SELECT substr(date,1,7) as month, SUM(CASE WHEN amount > 0 THEN amount ELSE 0 END) as spent, SUM(CASE WHEN amount < 0 THEN ABS(amount) ELSE 0 END) as income FROM transactions GROUP BY month ORDER BY month"

# Search by merchant
sqlite3 data/finance.db "SELECT date, description, amount FROM transactions WHERE LOWER(description) LIKE '%quills%' ORDER BY date DESC"

# Account balances
sqlite3 data/finance.db "SELECT name, mask, type, balance_current, balance_limit FROM accounts ORDER BY balance_current DESC"

# Income sources
sqlite3 data/finance.db "SELECT date, description, ABS(amount) FROM transactions WHERE amount < 0 AND ABS(amount) > 100 ORDER BY date DESC LIMIT 20"

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 90 lines · 43 tokens per session scan A e96f294745f2

Subscribe to this mod's changes

finance-query is a skill published in the GitHub repository weklund/fiduciary (10 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 728 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Budget Planner

Create, manage, and optimize budgets for projects, departments, and organizations with variance tracking and scenario planning.

eddiebelaval/squire · 23 tokens

financial-planner

Your Personal Finance Manager for Canadians — an AI financial planning partner that conducts thorough financial interviews, builds complete plans, generates interactive dashboards, and provides ongoing coaching. Use this skill whenever someone asks about budgeting, saving, investing, debt strategy, retirement…

cjpatten/canadian-finance-planner-skill · 156 tokens

Construction Estimator

Construction cost estimation, project budgeting, material takeoffs, and bid preparation for contractors and builders.

eddiebelaval/squire · 22 tokens

live-api-verification

Verify response models and MCP transports against the real YNAB API before claiming a tool works.

hs737/mcp-server-for-ynab · 24 tokens

ecommerce-budgeting-forecasting

Build rolling operating budgets for marketing spend, inventory purchases, and operations with variance analysis, scenario modeling, and budget utilization alerts.

finsilabs/awesome-ecommerce-skills · 32 tokens

ynab-debt-payoff-planner

Helps build a sustainable debt-payoff plan that fits inside a real budget instead of fighting it. Use when a user says "help me pay off my credit cards", "snowball or avalanche, which should I do", "how do I set up a debt goal", "I keep going into debt for emergencies while paying off debt", or "what order should I…

auzroz/ynab-mcp · 87 tokens