Mezzle avatar

ynab

Access and manage budgets using the YNAB (You Need A Budget) API. View budgets, accounts, categories

提供方 Mezzle|开源

YNAB Budget Management Skill

An AgentSkills compatible skill for managing budgets with YNAB (You Need A Budget). Works with Claude Code and other skills-compatible AI development tools.

Features

  • Budget Overview: List all budgets and get detailed budget information
  • Account Management: View accounts with balances (cleared, uncleared, total)
  • Category Tracking: Access categories with budgeted amounts, activity, and available balances
  • Transaction Management: List, filter, and create transactions
  • Goal Monitoring: Track budget goals and progress
  • Flexible Filtering: Filter transactions by date, type, account, and category

Quick Start

  1. Install the skill by copying to your skills directory:

    # For Claude Code
    cp -r ynab ~/.claude/skills/
    
    # Or for project-specific use
    cp -r ynab .claude/skills/
    
  2. Install dependencies:

    cd ynab/scripts  # or ~/.claude/skills/ynab/scripts
    npm install
    npm run build
    
  3. Generate a YNAB Personal Access Token:

  4. Set environment variable:

    export YNAB_ACCESS_TOKEN="your-access-token-here"
    
  5. Test the setup:

    node ynab/scripts/dist/list-budgets.js
    

Usage

Once installed, Claude Code will automatically use this skill when you ask about budgets:

  • "Show me my budget overview"
  • "List recent transactions"
  • "What categories am I overspending in?"
  • "Add a $45 expense for coffee"
  • "Show my checking account balance"

Requirements

  • Node.js 18 or higher
  • Active YNAB account with budgets
  • Personal Access Token from YNAB

Documentation

Rate Limits

200 requests per hour per access token (rolling one-hour window)

AgentSkills Compatibility

This skill follows the AgentSkills specification and is compatible with:

  • Claude Code
  • Cursor
  • VS Code with compatible extensions
  • Other AgentSkills-compatible development tools

Scripts

The skill includes six TypeScript-based scripts:

  • list-budgets.js - List all budgets
  • get-budget.js - Get detailed budget information
  • list-accounts.js - List accounts with balances
  • list-categories.js - List categories with budgeted amounts
  • list-transactions.js - List and filter transactions
  • create-transaction.js - Create new transactions

All scripts output JSON for easy parsing and integration.

Understanding Milliunits

YNAB stores monetary values as "milliunits" (1/1000 of a currency unit):

  • $1.00 = 1,000 milliunits
  • $123.45 = 123,450 milliunits
  • -$50.25 = -50,250 milliunits (expenses are negative)

The scripts handle conversion automatically.

Security

  • Personal Access Tokens are stored as environment variables only
  • Never commit tokens to version control
  • Treat tokens like passwords
  • Tokens can be revoked at app.ynab.com/settings/developer

License

MIT

Support

For issues related to: