Xpersona
Y

Ynab Api

CLAWHUB · Unverified

YNAB (You Need A Budget) budget management via API. Add transactions, track goals, monitor spending, create transfers, and generate budget reports. Use this... Skill: Ynab Api Owner: f-liva Summary: YNAB (You Need A Budget) budget management via API. Add transactions, track goals, monitor spending, create transfers, and generate budget reports. Use this... Tags: latest:2.4.0 Version history: v2.4.0 | 2026-04-11T13:13:40.162Z | auto **Improved error handling, retry logic, and API guidance.** - Added robust guidance on handling API errors (especially 401/429), recommending si

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s172qzhaaqgbcj367wdz5xwjjx84m22g:ynab-api
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-f-liva-ynab-api/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

146,356 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: ynab-api
description: "YNAB (You Need A Budget) budget management via API. Add transactions, track goals, monitor spending, create transfers, and generate budget reports. Use this skill whenever the user mentions YNAB, budget tracking, spending analysis, budget goals, Age of Money, or wants to manage their personal finances -- even if they just say 'add an expense', 'how much did I spend', 'check my budget', or 'upcoming bills' without naming YNAB explicitly. Also use for automated budget reports and financial summaries."
user-invocable: true
metadata: {"requiredEnv": ["YNAB_API_KEY", "YNAB_BUDGET_ID"]}
---

# YNAB Budget Management

Manage your YNAB budget via the API with ready-to-use bash scripts. Requires `curl` and `jq`.

## Configuration

Set environment variables `YNAB_API_KEY` and `YNAB_BUDGET_ID`, or create `~/.config/ynab/config.json`:

```json
{
  "api_key": "YOUR_YNAB_TOKEN",
  "budget_id": "YOUR_BUDGET_ID",
  "monthly_target": 2000
}
```

The `monthly_target` field sets your monthly spending cap (used by `daily-spending-report.sh`). Can also be set via `YNAB_MONTHLY_TARGET` env var.

Get your token at https://app.ynab.com/settings/developer. Find your Budget ID in the YNAB URL.

## Available Scripts

All scripts are in `{baseDir}/scripts/` and output to stdout.

| Script | Purpose |
|--------|---------|
| `daily-spending-report.sh` | Yesterday's expenses by category + monthly budget progress + analysis |
| `daily-budget-check.sh` | Morning overview: Age of Money, upcoming bills, overspending alerts |
| `goals-progress.sh [month]` | Visual progress bars for category goals |
| `scheduled-upcoming.sh [days]` | Upcoming scheduled transactions (default: 7 days) |
| `month-comparison.sh [m1] [m2]` | Month-over-month spending comparison |
| `transfer.sh SRC DEST AMT DATE [MEMO]` | Create a properly linked account transfer |
| `ynab-helper.sh <command>` | General helper: search payees, list categories, add transactions |
| `setup-automation.sh` | Test config and list available scripts |

## Key API Concepts

### Amounts use milliunits
YNAB API represents all amounts in milliunits: `10.00` = `10000`, `-10.00` = `-10000`. Always divide by 1000 when displaying, multiply by 1000 when submitting.

### Always categorize transactions
Never create transactions without a category -- it breaks budget tracking. When encountering an unfamiliar merchant, search past transactions for the same payee and reuse the category for consistency.

### Check for pending transactions before adding
Before creating a new transaction, check if an unapproved one already exists for the same amount. If found, approve it instead. This avoids duplicates from bank imports.

### Transfers require transfer_payee_id
To create a real linked transfer between accounts, use the destination account's `transfer_payee_id` (not `payee_name`). Using `payee_name` creates a regular transaction that YNAB won't recognize as a transfer. See [references/api-guide.md](references/api-

README.md

# YNAB API Skill for Claude Code

Manage your [YNAB](https://www.ynab.com/) budget directly from Claude Code. Add transactions, track goals, monitor spending, create transfers, and generate reports.

## Installation

```bash
clawhub install ynab-api
```

## Configuration

Get your API token from https://app.ynab.com/settings/developer and create `~/.config/ynab/config.json`:

```json
{
  "api_key": "YOUR_YNAB_TOKEN",
  "budget_id": "YOUR_BUDGET_ID"
}
```

Or set `YNAB_API_KEY` and `YNAB_BUDGET_ID` environment variables.

## What it does

Once installed, Claude Code can:

- **Add transactions** -- "add a 10 euro expense at Coffee Shop"
- **Check budget** -- "how much did I spend this month?" / "check my budget"
- **Track goals** -- "how are my budget goals doing?"
- **Upcoming bills** -- "what bills are coming up?"
- **Compare months** -- "compare this month vs last month"
- **Create transfers** -- properly linked between YNAB accounts

## Included Scripts

- `daily-budget-check.sh` -- Morning budget overview
- `goals-progress.sh` -- Visual goal progress bars
- `scheduled-upcoming.sh` -- Upcoming scheduled transactions
- `month-comparison.sh` -- Month-over-month spending analysis
- `transfer.sh` -- Properly linked account transfers
- `ynab-helper.sh` -- General helper (search, categories, etc.)

All scripts output to stdout and can be scheduled with any cron/scheduler.

## License

MIT

_meta.json

{
  "ownerId": "kn7d4t1phjfs3v8m6ec3t61bxd80b8yx",
  "slug": "ynab-api",
  "version": "2.4.0",
  "publishedAt": 1775913220162
}

references/api-guide.md

# YNAB API Guide

Detailed API reference and best practices for the YNAB Budget Management skill.

## Table of Contents

- [Transfer Transactions](#transfer-transactions)
- [Monthly Spending Calculation](#monthly-spending-calculation)
- [Account ID Management](#account-id-management)
- [API Endpoints](#api-endpoints)
- [Security](#security)

## Transfer Transactions

To create a **real** transfer that YNAB recognizes as linked transactions between accounts, you MUST use the account's `transfer_payee_id`, NOT a payee name.

### How it works

Each YNAB account has a `transfer_payee_id` field — this is the payee ID that represents transfers TO that account.

**Correct approach** — use `payee_id` with the destination's `transfer_payee_id`:
```json
{
  "transaction": {
    "account_id": "SOURCE_ACCOUNT_ID",
    "date": "2026-03-06",
    "amount": -50000,
    "payee_id": "DEST_ACCOUNT_TRANSFER_PAYEE_ID",
    "approved": true
  }
}
```

**Wrong approach** — using `payee_name` creates a regular transaction, not a transfer:
```json
{"payee_name": "Transfer: To Savings"}
```

### Getting transfer_payee_id values

```bash
# List all accounts with their transfer_payee_id
YNAB_API="https://api.ynab.com/v1"
# GET $YNAB_API/budgets/$BUDGET_ID/accounts
# Then extract: .data.accounts[] | {name, transfer_payee_id}
```

Store these IDs in your config for quick reference.

### What happens when done correctly

- YNAB creates **two linked transactions** (one in each account)
- The matching transaction appears automatically in the destination
- Both are marked as transfers (no budget impact)
- Deleting one side deletes both

### Common mistakes

| Mistake | Result |
|---------|--------|
| Using `payee_name` | Regular transaction, not a transfer |
| Creating both sides manually | Duplicates instead of linked pair |
| Setting a category | Transfers shouldn't have categories |

## Monthly Spending Calculation

When calculating monthly spending:

1. Get all transactions for the month
2. Filter: `amount < 0` (expenses only)
3. Exclude configured non-discretionary categories (taxes, transfers, etc.)
4. Expand Split transactions into subcategories
5. Sum by category or total

Consider separating small recurring expenses from large one-time purchases for better analysis.

## Account ID Management

Store account IDs in config (not hardcoded in scripts):

```json
{
  "accounts": {
    "primary_checking": "UUID-HERE",
    "savings": "UUID-HERE",
    "cash": "UUID-HERE"
  },
  "default_account": "primary_checking"
}
```

## API Endpoints

| Resource | Endpoint |
|----------|----------|
| Budgets | `GET /v1/budgets` |
| Accounts | `GET /v1/budgets/{id}/accounts` |
| Categories | `GET /v1/budgets/{id}/categories` |
| Transactions | `GET/POST /v1/budgets/{id}/transactions` |
| Single transaction | `GET/PUT/DELETE /v1/budgets/{id}/transactions/{id}` |
| Month summary | `GET /v1/budgets/{id}/months/current` |
| Scheduled | `GET /v1/budgets/{id}/scheduled_transactions` |
| Payees | `GE

references/category-examples.md

# Category Examples

This reference provides examples of typical YNAB budget categories. Adapt these to your own budget structure.

## Common Category Groups

### Essential / Fixed Costs

Regular bills that must be paid:
- Rent/Mortgage
- Utilities (Electric, Gas, Water)
- Internet/Phone
- Insurance
- Groceries
- Healthcare
- Transportation

### Quality of Life

Investments in wellbeing:
- Fitness/Gym
- Education
- Books/Learning
- Hobbies

### Discretionary / Fun

Entertainment and treats:
- Dining Out
- Subscriptions (Streaming, etc.)
- Shopping
- Entertainment
- Social (Treating friends/family)

### Work/Business

If self-employed or tracking business expenses:
- Software/Services
- Professional Development
- Business Travel
- Equipment

### Variable but Necessary

Expenses that vary but are still needs:
- Car Maintenance
- Home Repairs
- Personal Care
- Gifts

### Savings/Investments

Future-focused:
- Emergency Fund
- Retirement
- Investments
- Large Purchase Savings

## Category Best Practices

### Be Specific Where It Matters

- **Too broad**: "Food" (mixes groceries with dining out)
- **Better**: "Groceries" + "Dining Out" (tracks spending habits clearly)

### Group Logically

Group related categories together:
- "Auto" group: Fuel, Maintenance, Insurance, Registration
- "Home" group: Mortgage/Rent, Utilities, Repairs, Furnishings

### Handle Edge Cases Consistently

**Parking**: Transportation or Auto? Pick one and stick to it.
**Fuel**: Auto or Transportation? Be consistent.
**Pet expenses**: Dedicated "Pet" category or split across categories?

Document your choices for consistency.

## Merchant-Category Mapping

Create a mapping of common merchants to categories for consistency:

| Type | Typical Category |
|------|------------------|
| Hair salon / Barber | Personal Care |
| Grocery stores | Groceries |
| Gas stations | Auto: Fuel |
| Parking | Transportation |
| Restaurants | Dining Out |
| Streaming services | Subscriptions |
| Gym | Fitness |
| Pharmacy | Healthcare |

Keep this mapping in a local note or config for reference when categorizing.

## Split Transaction Guidelines

Use split transactions when a single purchase spans multiple categories:

**Example**: Grocery store trip
- €50 food → Groceries
- €15 household items → Household Goods
- €10 pharmacy → Healthcare

**Why split**: Accurate category tracking for budgeting decisions.

## Categories to Exclude from Budget Totals

When calculating "true spending" vs income/expenses:

**Common exclusions**:
- **Tax payments**: Mandatory obligations (not discretionary spending)
- **Transfers**: Moving money between accounts (not spending)
- **Reimbursements/Advances**: Temporary (will be paid back)
- **Investments**: Capital allocation (not consumption)

**Depends on goals**:
- Major one-time purchases (car, home repairs) - may want separate "extraordinary" tracking
- Savings goals - are these "spending" or "allocation"?

Define your own exclusion rules based on what you're trying

Sponsored

Ads related to Ynab Api and adjacent AI workflows.