Skip to content
Back to skills

Expense Tracker

ASecurity

Manage expense tracker bot — deploy, check expenses, export data, sync locally

  • 92 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 29, 2026
securitygobashsqlnodeapidatabase

Works with

  • api

Security analysis

A100/100

Scanned May 29, 2026

npx -y skills add aAAaqwq/AGI-Super-Team --skill expense-tracker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Expense Tracker?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Expense Tracker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aaaaqwq-expense-tracker/badge)](https://www.skillsdirectory.com/skills/aaaaqwq-expense-tracker)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: expense-tracker
description: Manage expense tracker bot — deploy, check expenses, export data, sync locally
---
# Expense Tracker

> Telegram bot for expense tracking. Send text or photo to bot, Claude Haiku parses it, stores in D1.

## When to use

- User asks about expenses, spending, budget
- User wants to deploy or update the expense bot
- User wants to see expense summary or export data
- User asks to sync expenses locally

## Dependencies

- External: Cloudflare Workers (wrangler), Node.js
- Services: Telegram Bot API, Claude API (Haiku), Cloudflare D1

## Paths

| What | Path |
|------|------|
| Project | `$HOME/expense-bot/` |
| Source | `$HOME/expense-bot/src/` |
| Schema | `$HOME/expense-bot/schema.sql` |
| Worker config | `$HOME/expense-bot/wrangler.toml` |
| Local export | `$DATA_PATH/personal/expenses_YYYY_MM.csv` |

## How to execute

### Deploy

```bash
cd ~/expense-bot && npx wrangler deploy
```

### Set webhook (after first deploy)

```bash
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/setWebhook?url=https://expense-bot.<subdomain>.workers.dev/webhook"
```

### Apply schema

```bash
cd ~/expense-bot && npx wrangler d1 execute expense-db --file=schema.sql
```

### Check expenses via API

```bash
curl -H "Authorization: Bearer $TOKEN" "https://expense-bot.<subdomain>.workers.dev/api/summary?month=2026-03"
```

### Sync expenses locally

```bash
curl -H "Authorization: Bearer $TOKEN" \
  "https://expense-bot.<subdomain>.workers.dev/api/export?month=2026-03" \
  > $DATA_PATH/personal/expenses_2026_03.csv
```

### Set secrets

```bash
cd ~/expense-bot
npx wrangler secret put TELEGRAM_BOT_TOKEN
npx wrangler secret put ANTHROPIC_API_KEY
npx wrangler secret put API_AUTH_TOKEN
npx wrangler secret put ALLOWED_USERS
```

## Setup (first time)

1. Create bot via @BotFather on Telegram
2. `cd ~/expense-bot && npx wrangler d1 create expense-db`
3. Update `database_id` in `wrangler.toml`
4. `npx wrangler d1 execute expense-db --file=schema.sql`
5. Set secrets (see above)
6. `npx wrangler deploy`
7. Set webhook (see above)

## Bot commands

| Command | Description |
|---------|-------------|
| `/start` | Welcome + usage |
| `/today` | Today's expenses |
| `/week` | This week by category |
| `/month` | Monthly summary |
| `/budget` | Budget vs actual |
| `/setbudget food 200` | Set monthly budget |
| `/export` | Download CSV |
| `/delete 123` | Delete expense by ID |

## Architecture

```
Telegram -> CF Worker /webhook -> Claude Haiku (parse) -> D1 (store) -> TG reply
                                  /api/* (JSON/CSV export, auth by Bearer token)
```

## Cost

~$0.30/month (Claude Haiku API only, everything else is free tier)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.