poe-usage
Check Poe API usage — queries current point balance and usage history using a Poe API key from the environment or fir config.
- License 许可
- MIT
- 所属仓库
- kfet/fir
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- poe-usage
- builtin
- true
- override
- true
- description
- Check Poe API usage — queries current point balance and usage history using a Poe API key from the environment or fir config.
02 资源文件 1
- 脚本scripts/usage.sh7.5 KB
03 SKILL.md 正文
Poe Usage Skill
Query the Poe Usage API to check your point balance and see per-bot usage history.
Prerequisites
The script resolves your Poe API key from (in order):
POE_API_KEYenvironment variable — set it in your shell- fir models config —
~/.config/fir/models.jsonat.providers.Poe.apiKey - fir auth storage —
~/.config/fir/auth.jsonunder the"poe"provider key. Both credential shapes are supported:{"type": "api_key", "key": "sk-poe-..."}(manual API key){"type": "oauth", "access": "sk-poe-...", "refresh": "...", "expires": 1234}(written byfir login poe)
The OAuth access token is itself a usable Poe API key, so either shape works.
If the stored OAuth token is expired, the script prints a warning and still tries
the token; re-run fir login poe to refresh it.
To store a manual key in fir's auth storage, add a poe entry to ~/.config/fir/auth.json:
{
"poe": { "type": "api_key", "key": "YOUR_POE_API_KEY" }
}
Get your API key at https://poe.com/api/keys.
Step 1 — Run the Script
bash "$SKILL_DIR/scripts/usage.sh"
Options
# Show balance only
bash "$SKILL_DIR/scripts/usage.sh" --balance
# Show usage history (default: last 100 entries)
bash "$SKILL_DIR/scripts/usage.sh" --history
# Show both (default)
bash "$SKILL_DIR/scripts/usage.sh"
# Limit history entries and paginate
bash "$SKILL_DIR/scripts/usage.sh" --limit 50
# Filter to last N days
bash "$SKILL_DIR/scripts/usage.sh" --days 7
| Flag | Description | Default |
|---|---|---|
--balance |
Show only current point balance | off (show both) |
--history |
Show only usage history | off (show both) |
--limit |
Max entries per API page (1-100) | 100 |
--days |
Only show entries from last N days | 30 |
Step 2 — Interpret the Response
Example output:
Poe Point Balance
=================
Current balance: 1,500 points
Usage History (last 7 days)
============================
Bot Calls Points Cost ($)
──────────────────────────────────────────────────────
Claude-3.5-Sonnet 42 3,390 2.53
GPT-4 18 1,908 1.43
──────────────────────────────────────────────────────
TOTAL 60 5,298 3.96
API Fields
| Field | Meaning |
|---|---|
current_point_balance |
Available points across plan + add-ons |
bot_name |
Model/bot used for the query |
cost_points |
Points consumed by a single query |
cost_usd |
USD cost for that query |
creation_time |
Unix timestamp in microseconds |
query_id |
Unique query ID (used as pagination cursor) |
cost_breakdown_in_points |
Per-query breakdown of input/output token costs |
usage_type |
Where points were spent: Chat, API, Canvas App |
Troubleshooting
- 401 error:
POE_API_KEYis invalid or expired. Get a new one at https://poe.com/api/keys. - Empty results: No activity in the queried period. Try
--days 30.
04 同仓库更多 Skills
wt
Spawn a fresh fir agent in its own tmux session on its own git worktree. Use whenever the user wants the work — or the conversation about the work — to happen over there, not here. If the user points at this skill, or has directly loaded it in the context, that alone is the cue — spawn, don't inline.
wrap-up
Wrap up work on a project branch — review, fix, and simplify in a loop until clean, then ff-merge to main.
tmux-observer
Attach a tmux window to an already-running fir session — observe its transcript and drive its input via tmux send-keys. Use when you need to watch or steer another fir agent.
tmux-driver
Drive interactive CLIs (python, gdb, etc.) via named tmux sessions with multi-window support. Falls back to fir's built-in PTY driver when tmux is unavailable.
telegram-bot-setup
Set up a new Telegram bot channel for a fir project — install the telegram MCP, create a per-project state dir, drop in the bot token, wire .fir/mcp.json with TELEGRAM_STATE_DIR, pair the user, and verify. Use when the user asks to add, configure, or onboard a Telegram bot for a fir worktree/project.
sync
Sync with an upstream source repo — detect changed files, apply equivalent downstream edits, update the baseline, and report any new features or non-trivial changes picked up.