budget-tracker

TotalClaw 作者 totalclaw

跟踪代理支出、设置预算和警报并防止意外账单。当客服人员需要记录费用、检查剩余预算、设置支出限额或获取成本摘要时使用。对于拥有真金白银的自主代理来说至关重要。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~trypto1019-arc-budget-tracker
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~trypto1019-arc-budget-tracker/file -o trypto1019-arc-budget-tracker.md
# Budget Tracker

Track every cent your agent spends. Set hard limits. Get alerts before you blow your budget.

## Why This Exists

Autonomous agents with access to APIs, domains, and services can rack up unexpected bills. This skill gives you a financial safety net — log every transaction, enforce spending limits, and always know exactly where you stand.

## Commands

### Log a transaction
```bash
python3 {baseDir}/scripts/budget.py log --amount 10.00 --merchant "Namecheap" --category "domain" --note "arcself.com registration"
```

### Check balance
```bash
python3 {baseDir}/scripts/budget.py balance
```

### View spending summary
```bash
python3 {baseDir}/scripts/budget.py summary
```

### View recent transactions
```bash
python3 {baseDir}/scripts/budget.py history --limit 10
```

### Set budget limit
```bash
python3 {baseDir}/scripts/budget.py set-budget --total 200.00
```

### Set alert threshold (warn when balance drops below this)
```bash
python3 {baseDir}/scripts/budget.py set-alert --threshold 50.00
```

### Check if a purchase is safe
```bash
python3 {baseDir}/scripts/budget.py check --amount 25.00
```

### Export to CSV
```bash
python3 {baseDir}/scripts/budget.py export --format csv
```

## Data Storage

Budget data is stored in `~/.openclaw/budget-tracker/budget.json` by default. Override with `--data-dir /path/to/dir`.

The JSON structure:
```json
{
  "budget": {"total": 200.00, "alert_threshold": 50.00},
  "transactions": [
    {
      "id": "txn_001",
      "timestamp": "2026-02-15T14:00:00Z",
      "amount": 10.00,
      "merchant": "Namecheap",
      "category": "domain",
      "note": "arcself.com"
    }
  ]
}
```

## Categories

Use consistent categories: `domain`, `hosting`, `api`, `tool`, `subscription`, `marketing`, `other`.

## Alerts

When balance drops below the alert threshold, the skill outputs a warning. When a purchase would exceed the remaining budget, it blocks and warns.

## Tips

- Log transactions immediately after spending — don't batch them
- Use `check` before any purchase to verify budget safety
- Run `summary` at the start of each day for awareness
- Set `--alert-threshold` to 25% of your total budget

---

## 中文说明

# Budget Tracker(预算跟踪器)

跟踪你的代理花费的每一分钱。设置硬性限额。在超支之前获得警报。

## 为什么需要它

可访问 API、域名和服务的自主代理可能会产生意外账单。此技能为你提供财务安全网——记录每笔交易、强制执行支出限额,并始终准确掌握你的状况。

## 命令

### 记录一笔交易
```bash
python3 {baseDir}/scripts/budget.py log --amount 10.00 --merchant "Namecheap" --category "domain" --note "arcself.com registration"
```

### 检查余额
```bash
python3 {baseDir}/scripts/budget.py balance
```

### 查看支出摘要
```bash
python3 {baseDir}/scripts/budget.py summary
```

### 查看最近的交易
```bash
python3 {baseDir}/scripts/budget.py history --limit 10
```

### 设置预算限额
```bash
python3 {baseDir}/scripts/budget.py set-budget --total 200.00
```

### 设置警报阈值(当余额低于此值时发出警告)
```bash
python3 {baseDir}/scripts/budget.py set-alert --threshold 50.00
```

### 检查某笔购买是否安全
```bash
python3 {baseDir}/scripts/budget.py check --amount 25.00
```

### 导出为 CSV
```bash
python3 {baseDir}/scripts/budget.py export --format csv
```

## 数据存储

预算数据默认存储在 `~/.openclaw/budget-tracker/budget.json`。使用 `--data-dir /path/to/dir` 覆盖。

JSON 结构:
```json
{
  "budget": {"total": 200.00, "alert_threshold": 50.00},
  "transactions": [
    {
      "id": "txn_001",
      "timestamp": "2026-02-15T14:00:00Z",
      "amount": 10.00,
      "merchant": "Namecheap",
      "category": "domain",
      "note": "arcself.com"
    }
  ]
}
```

## 类别

使用一致的类别:`domain`、`hosting`、`api`、`tool`、`subscription`、`marketing`、`other`。

## 警报

当余额低于警报阈值时,技能会输出警告。当一笔购买将超出剩余预算时,它会阻止并发出警告。

## 技巧

- 花费后立即记录交易——不要批量记录
- 在任何购买之前使用 `check` 来验证预算安全性
- 每天开始时运行 `summary` 以保持掌握情况
- 将 `--alert-threshold` 设置为总预算的 25%