360 Secure SkillHub
360 安全技能中心

Expense Tracker v2

这是一款命令行收支追踪工具,支持本地/Notion/Google Sheet/Supabase多存储后端,凭证采用AES-256-GCM加密保障安全。核心功能包括初始化配置、记录带分类备注的收支、按时间/分类查看历史、生成月度统计。适用于个人日常记账、月度收支复盘,通过命令行交互,输出结构化记录或统计结果。

codeblackhole1024
codeblackhole1024
热度 61.16
最近更新 2026-05-17 13:13:50
分类:数据依赖:读写文件 / 第三方 API应用场景:财务 / 数据处理 / 个人理财

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add expense-tracker-v2
Metadata
name
expense-tracker
description
Track expenses and income with multi-backend storage (local/Notion/Google Sheet/Supabase). Credentials are encrypted with AES-256-GCM. Use when user wants to record expenses, view transaction history, or check monthly spending statistics.

Expense Tracker Skill

Quick Start

Initial Setup (First Time)

expense-tracker setup

This will:

  1. Ask you to set a master password (for encrypting credentials)
  2. Select storage backend and configure API keys

Storage backends:

  1. Local file - No config needed
  2. Notion - Requires API Key + Database ID
  3. Google Sheet - Requires credentials path + Spreadsheet ID
  4. Supabase - Requires URL + Anon Key

Set Password (For Subsequent Uses)

expense-tracker pass <your-password>

Or enter interactively when prompted.

Record Expense

expense-tracker add -50 "lunch" food
# Format: expense-tracker add <amount> <note> <category>
# Negative amount = expense

Record Income

expense-tracker add 5000 "salary" salary
# Positive amount = income

View Records

expense-tracker list              # Recent 10 records
expense-tracker list --month     # This month
expense-tracker list --category  # By category

Statistics

expense-tracker stats             # This month
expense-tracker stats -m 2       # 2 months ago

Security

Credentials are encrypted using AES-256-GCM with PBKDF2 key derivation.

  • Config file: ~/.openclaw/expense-tracker/config.enc
  • Never stores plain text passwords or API keys

Categories

  • food - Food & Dining
  • transport - Transportation
  • shopping - Shopping
  • entertainment - Entertainment
  • salary - Salary
  • bonus - Bonus
  • investment - Investment
  • other - Other

Commands Reference

Command Description
setup Set password & configure backend (first time)
pass <password> Set password for decryption
add <amount> <note> <category> Add new record
list View recent records
list --month This month's records
list --category Group by category
stats Monthly summary
stats -m <n> N months ago

Data Format

Each record:

{
  "id": "uuid",
  "type": "expense|income",
  "amount": -50,
  "category": "food",
  "note": "lunch",
  "date": "2026-03-03",
  "created_at": "2026-03-03T20:23:00Z"
}