当前位置: 首页 > Skill >

Manage PocketSmith transactions, categories, budgets and financial data

Manage PocketSmith transactions, categories, budgets and financial data

Manage PocketSmith transactions, categories, budgets and financial data

通过 API 管理 PocketSmith 的交易、分类和财务数据

v1.0.0 2026.11.22 440
获取Skill文件查看使用说明
作 者:林舟 许可证: 更新时间:2026.11.22
本文目录展开

PocketSmith Skill

Manage PocketSmith transactions and categories. Supports listing, searching, creating, updating, and deleting financial data.

Prerequisites

Set these environment variables:

  • POCKETSMITH_DEVELOPER_KEY - Your PocketSmith developer key (from Settings > Security > Manage Developer Keys)
  • POCKETSMITH_ALLOW_WRITES - Set to true to enable create, update, and delete operations (disabled by default for safety)

Commands

All commands should be run from the skill directory using uv run pocketsmith.

Authentication

# Check authentication status and get user info
pocketsmith auth status

# Get current user details
pocketsmith me

Transactions

# Get a single transaction
pocketsmith transactions get <transaction_id>

# List transactions for a user
pocketsmith transactions list-by-user <user_id>
pocketsmith transactions list-by-user <user_id> --start-date 2024-01-01 --end-date 2024-12-31
pocketsmith transactions list-by-user <user_id> --search "coffee"
pocketsmith transactions list-by-user <user_id> --uncategorised
pocketsmith transactions list-by-user <user_id> --needs-review
pocketsmith transactions list-by-user <user_id> --type debit

# List transactions by account
pocketsmith transactions list-by-account <account_id>

# List transactions by category
pocketsmith transactions list-by-category <category_ids>  # comma-separated

# List transactions by transaction account
pocketsmith transactions list-by-transaction-account <transaction_account_id>

# Create a transaction (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith transactions create <transaction_account_id> --payee "Store Name" --amount -50.00 --date 2024-01-15
pocketsmith transactions create <transaction_account_id> --payee "Salary" --amount 5000.00 --date 2024-01-01 --category-id 123

# Update a transaction (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith transactions update <transaction_id> --category-id 456
pocketsmith transactions update <transaction_id> --payee "New Payee" --note "Updated note"
pocketsmith transactions update <transaction_id> --labels "groceries,essential"

# Delete a transaction (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith transactions delete <transaction_id>

Categories

# Get a single category
pocketsmith categories get <category_id>

# List all categories for a user
pocketsmith categories list <user_id>

# Create a category (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith categories create <user_id> --title "New Category"
pocketsmith categories create <user_id> --title "Subcategory" --parent-id 123
pocketsmith categories create <user_id> --title "Bills" --colour "#ff0000" --is-bill true

# Update a category (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith categories update <category_id> --title "Renamed Category"
pocketsmith categories update <category_id> --parent-id 456
pocketsmith categories update <category_id> --no-parent  # Make top-level
pocketsmith categories update <category_id> --colour "#00ff00"

# Delete a category (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith categories delete <category_id>

Labels

# List all labels for a user
pocketsmith labels list <user_id>

Budget

# List budget for a user (per-category budget analysis)
pocketsmith budget list <user_id>
pocketsmith budget list <user_id> --roll-up true

# Get budget summary for a user
pocketsmith budget summary <user_id> --period months --interval 1 --start-date 2024-01-01 --end-date 2024-12-31

# Get trend analysis (requires category and scenario IDs)
pocketsmith budget trend <user_id> --period months --interval 1 --start-date 2024-01-01 --end-date 2024-12-31 --categories "123,456" --scenarios "1,2"

# Refresh forecast cache (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith budget refresh <user_id>

Transaction Filter Options

When listing transactions, these filters are available:

  • --start-date - Filter from date (YYYY-MM-DD)
  • --end-date - Filter to date (YYYY-MM-DD)
  • --updated-since - Only transactions updated after this datetime
  • --uncategorised - Only uncategorised transactions
  • --type - Filter by type: debit or credit
  • --needs-review - Only transactions needing review
  • --search - Search term for payee/memo
  • --page - Page number for pagination

Category Options

When creating/updating categories:

  • --title - Category name
  • --colour - CSS hex colour (e.g., #ff0000)
  • --parent-id - Parent category ID for subcategories
  • --no-parent - Make category top-level (update only)
  • --is-transfer - Mark as transfer category (true/false)
  • --is-bill - Mark as bill category (true/false)
  • --roll-up - Roll up to parent category (true/false)
  • --refund-behaviour - debit_only or credit_only

Output Format

All commands output JSON. Example transaction:

{
  "id": 1234567,
  "payee": "Coffee Shop",
  "amount": -5.50,
  "date": "2024-01-15",
  "category": {
    "id": 123,
    "title": "Eating Out"
  },
  "transaction_account": {
    "id": 456,
    "name": "Checking Account"
  }
}

Date Format

All dates use YYYY-MM-DD format (e.g., 2024-01-15).

Write Protection

Write operations (create, update, delete) are disabled by default for safety. To enable them:

export POCKETSMITH_ALLOW_WRITES=true

Without this, write commands will fail with:

{"error": "Write operations are disabled by default. Set POCKETSMITH_ALLOW_WRITES=true to enable create, update, and delete operations.", "hint": "export POCKETSMITH_ALLOW_WRITES=true"}

Common Workflows

Search and Categorize Transactions

# Find uncategorised transactions
pocketsmith transactions list-by-user 123456 --uncategorised

# Search for specific transactions
pocketsmith transactions list-by-user 123456 --search "Netflix"

# Categorize a transaction
pocketsmith transactions update 789012 --category-id 456

Organize Categories

# List existing categories
pocketsmith categories list 123456

# Create a new subcategory
pocketsmith categories create 123456 --title "Streaming" --parent-id 789

# Move a category under a different parent
pocketsmith categories update 101112 --parent-id 789

Review Transactions

# Find transactions needing review
pocketsmith transactions list-by-user 123456 --needs-review

# Mark as reviewed by updating
pocketsmith transactions update 789012 --needs-review false

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,036
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,020
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
Skill 文件
  • SKILL.md
    • PocketSmith Skill
    • Prerequisites
    • Commands
      • Authentication
      • Transactions
      • Categories
      • Labels
      • Budget
    • Transaction Filter Options
    • Category Options
    • Output Format
    • Date Format
    • Write Protection
    • Common Workflows
      • Search and Categorize Transactions
      • Organize Categories
      • Review Transactions
  • 项目或源文件

相关 Skill

更多
大宗商品解读(二郎神) 大宗商品解读(二郎神) Expert in interpreting financial research reports across stocks, funds, futures, forex, options, treasury bonds, and commodities. Activates when users need to decode research reports, analyze financial data logic, translate industry jargon, or distinguish facts from opinions in market analysis.
eodhd.com | Financial data from around the world eodhd.com | Financial data from around the world 提供EODHD金融数据API访问,涵盖公司信息、市场行情、基本面数据、经济数据、交易所信息及另类数据集
Stocks and Financial Data Pull Crypto Finance Cryptocurrency Price Earnings Dividends Stocks and Financial Data Pull Crypto Finance Cryptocurrency Price Earnings Dividends 股票和加密货币数据获取技能。通过Yahoo Finance提供56+金融数据工具,自动获取股票价格、基本面、盈利、股息、期权等数据。
finance-data-analysis finance-data-analysis AI-powered financial data analysis expert — covers financial statement analysis, KPI tracking, trend analysis, data visualization, and automated reporting. Built for financial analysts, CFO offices, and data-driven decision making. Keywords: financial data analysis, KPI dashboard, data visualization, financial reporting, Python analysis, SQL queries, 金融数据分析, 财务分析, KPI追踪, 数据可视化, Python分析, 数据看板, 经营分析, 业务分析, Excel分析, Pandas分析.
French Business Analyser French Business Analyser Verified French business data for autonomous B2B agents. Without this MCP, agents hallucinate financial data. With it, they get real-time signals from 9 offi...