ynab-sqlite-export: Skill for Claude Code

.claude/skills/ynab-db/SKILL.md

ynab-db is a skill for Claude Code from RuBiCK/ynab-sqlite-export. It costs 61 tokens per session (1,021 once invoked), scanned A, original, MIT.

A guide for querying a local SQLite database made from a YNAB account export. YNAB is a budgeting service, and SQLite is a file-based database that can be queried with SQL.

In plain words
What is it for?
Use it to query budgets, accounts, categories, payees, and transactions in ynab.db. It is also for writing SQL reports against the exported YNAB data.
Why use it?
It helps produce accurate spending, income, balance, and budget answers while avoiding deleted records and other common data mistakes. It also explains how to check whether the export needs refreshing.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is RuBiCK/ynab-sqlite-export's own configuration. It tells Claude Code how to work on ynab-sqlite-export itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ynab-sqlite-export configures →

Reuse

Borrowing it

Nothing to install: this file belongs to RuBiCK/ynab-sqlite-export. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/RuBiCK/ynab-sqlite-export/main/.claude/skills/ynab-db/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/RuBiCK/ynab-sqlite-export

Made for: Claude Code.

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 ynab-db

README.md
[![agentmods](https://agentmods.dev/badge/skills/rubick/ynab-sqlite-export/ynab-db/github.svg)](https://agentmods.dev/skills/rubick/ynab-sqlite-export/ynab-db)
Your own site
<a href="https://agentmods.dev/skills/rubick/ynab-sqlite-export/ynab-db"><img src="https://agentmods.dev/badge/skills/rubick/ynab-sqlite-export/ynab-db/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ynab-db

Your own site · 80×15
<a href="https://agentmods.dev/skills/rubick/ynab-sqlite-export/ynab-db"><img src="https://agentmods.dev/badge/skills/rubick/ynab-sqlite-export/ynab-db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00061 $0.01021
Opus 5.5 $0.00024 $0.00408
Sonnet 5.5 $0.00012 $0.00204
Haiku 4.5 $0.00006 $0.00102

Measured 2mo ago against content hash 6bdf7e572388, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ynab-db 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 2mo 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/ynab-db/SKILL.md · 80 lines

How it starts

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

Querying ynab.db

A local SQLite export of a YNAB account, produced by ynab_to_sqlite.py. Refresh it anytime with python3 ynab_to_sqlite.py (incremental, cheap); check staleness first: SELECT MAX(updated_at) FROM sync_state;

Schema in one look

budgets(id, name, last_modified_on, first_month, last_month, currency_iso, currency_symbol)
accounts(id, budget_id, name, type, on_budget, closed, balance, cleared_balance, uncleared_balance, last_reconciled_at, deleted)
category_groups(id, budget_id, name, hidden, deleted)
categories(id, budget_id, category_group_id, name, hidden, budgeted, activity, balance, goal_type, deleted)
payees(id, budget_id, name, transfer_account_id, deleted)
transactions(id, budget_id, account_id, date, amount, memo, cleared, approved, flag_color, payee_id, category_id, transfer_account_id, import_id, deleted)
subtransactions(id, transaction_id, amount, memo, payee_id, category_id, deleted)
sync_state(budget_id, resource, server_knowledge, updated_at)   -- internal, ignore for analysis

Rules that prevent wrong answers

  1. Always filter deleted = 0. Deletions are soft — deleted rows stay in every table with deleted = 1. Skipping this inflates all totals.
  2. Always scope by budget_id (or JOIN budgets and GROUP BY). One account often has several budgets; mixing them produces nonsense. List them first: SELECT id, name, currency_iso FROM budgets;
  3. Exclude transfers from income/spending math. A transfer between the user's own accounts has transfer_account_id IS NOT NULL and is not real income or spending — counting it double-counts money.
  4. Amounts are decimal currency units (already converted from YNAB milliunits): negative = outflow, positive = inflow.
  5. Income = inflows to the category named Inflow: Ready to Assign (a real row in categories). Don't treat every positive amount as income — refunds and transfers are also positive.
  6. Splits: a split transaction's own category_id may be NULL; its line items live in subtransactions. For per-category accuracy, take categorized rows from transactions where the id is NOT in subtransactions' parents, plus all subtransactions rows.
  7. category_id IS NULL + transfer_account_id IS NULL = genuinely uncategorized spending — report it as such rather than dropping it.
  8. Dates are TEXT YYYY-MM-DD — safe for lexicographic comparison and SQLite date functions (date('now','-3 months'), strftime).

Read the full file on GitHub · 80 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. 2mo ago First seen · 80 lines · 61 tokens per session scan A 6bdf7e572388

Subscribe to this mod's changes

ynab-db is a skill published in the GitHub repository RuBiCK/ynab-sqlite-export (12 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 1,021 once invoked, about $0.0002 per session on Opus 5.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

ynab-db compared with skills from other repositories

ynab-db next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ynab-dbRuBiCK/ynab-sqlite-exportSkill123mo agoMITA61Claude Code
sector-rotationHKUDS/Vibe-TradingSkill38kyesterdayMITA39Claude Code, Codex
strategy-pivot-designertradermonty/claude-trading-skillsSkill3.7ktodayMITA28Claude Code, Codex
twitter-readerhimself65/finance-skillsSkill3.5k5d agoMITA110Claude Code
energy-procurementhashgraph-online/awesome-codex-pluginsSkill1.5kyesterdayApache-2.0A93Claude Code, Codex
airdrop-hunting-guidenirholas/three.wsSkill271yesterdayApache-2.0A54Claude Code, Codex
alpaca-broker-reconciliation-idempotencyalpacahq/alpaca-skillsSkill1652d agoApache-2.0A83Claude Code, Codex