技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 0 · 489 · 4 current installs · 4 all-time installs
⭐ 0
安装量(当前) 4
🛡 VirusTotal :良性 · OpenClaw :良性
Package:aiwithabidi/cost-tracker
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill's code, runtime instructions, and required environment variable (OPENROUTER_API_KEY) are coherent with its stated purpose of tracking OpenRouter usage and producing reports; nothing in the package asks for unrelated credentials or contacts unexpected endpoints.
目的
Name/description (OpenRouter cost tracking) align with the code and SKILL.md: the script calls OpenRouter endpoints (/api/v1/auth/key and /api/v1/models), stores data in a local SQLite DB, produces reports, and provides savings recommendations. Required env var is the OpenRouter API key, which is appropriate.
说明范围
SKILL.md instructs running the included Python script with subcommands (fetch, report, models, budget, savings, export). The script operates on a local data directory and only queries OpenRouter. It does store raw JSON of the /auth/key response in the DB (expected for tracking usage) but does not reference unrelated system files or other environment variables.
安装机制
No install spec is provided (instruction-only + included script). The only third‑party library used is requests; missing this library causes the script to exit with a clear message asking the user to pip install requests. No arbitrary downloads or extracted archives are present.
证书
Only OPENROUTER_API_KEY is required and is used to authenticate to OpenRouter. No additional credentials, secrets, or unrelated env vars are requested. The script stores account/usage JSON locally in data/cost_tracker.db, which is proportional to the stated purpose.
持久
The skill does not request persistent platform privileges (always:false). It writes only to its own data directory (./data/cost_tracker.db) and creates local SQLite tables; it does not modify other skills or global agent configuration.
综合结论
This skill appears to do what it says: it uses your OPENROUTER_API_KEY to query OpenRouter for usage and models, stores results locally in data/cost_tracker.db, and prints reports. Before installing, confirm you trust the skill source (homepage: agxntsix.ai) and are comfortable giving the skill your OpenRouter API key. Note the DB will contain raw JSON from the /auth/key response (account/usage data) — protect that file. The script requires th…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Cost Tracker」。简介:AI spending monitor — track costs across OpenRouter models with daily, weekly, …。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aiwithabidi/cost-tracker/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: cost-tracker
description: AI spending monitor — track costs across OpenRouter models with daily, weekly, and monthly reports. Budget limits with alerts, per-model analysis, savings recommendations, and historical tracking via SQLite. Use for controlling AI costs and optimizing model selection.
homepage: https://www.agxntsix.ai
license: MIT
compatibility: Python 3.10+, OpenRouter API key
metadata: {"openclaw": {"emoji": "ud83dudcb0", "requires": {"env": ["OPENROUTER_API_KEY"]}, "primaryEnv": "OPENROUTER_API_KEY", "homepage": "https://www.agxntsix.ai"}}
---
# 💰 Cost Tracker
AI spending monitor for OpenRouter. Track per-model costs, get daily/weekly/monthly reports, set budget alerts, and get savings recommendations.
## Usage
```bash
# Fetch and store current usage from OpenRouter
python3 {baseDir}/scripts/cost_tracker.py fetch
# Show spending reports
python3 {baseDir}/scripts/cost_tracker.py report --period daily
python3 {baseDir}/scripts/cost_tracker.py report --period weekly
python3 {baseDir}/scripts/cost_tracker.py report --period monthly
# Per-model breakdown
python3 {baseDir}/scripts/cost_tracker.py models
# Set monthly budget + check status
python3 {baseDir}/scripts/cost_tracker.py budget --set 25.00
python3 {baseDir}/scripts/cost_tracker.py budget --check
# Savings recommendations
python3 {baseDir}/scripts/cost_tracker.py savings
# Export data as JSON
python3 {baseDir}/scripts/cost_tracker.py export --format json
python3 {baseDir}/scripts/cost_tracker.py export --format csv
```
## Features
- **Live Usage Fetch** — Pulls real spending data from OpenRouter's `/api/v1/auth/key` endpoint
- **Per-Model Tracking** — See which models cost you the most
- **Period Reports** — Daily, weekly, monthly summaries with trends
- **Budget Alerts** — Set limits and get warned at 80% threshold
- **Savings Tips** — Identifies cheaper models that could handle the same workload
- **Historical Data** — SQLite storage for long-term trend analysis
- **Export** — JSON or CSV export for spreadsheets
## Data Storage
All data stored in `{baseDir}/data/cost_tracker.db` (SQLite).
## Credits
Built by [M. Abidi](https://www.linkedin.com/in/mohammad-ali-abidi) | [agxntsix.ai](https://www.agxntsix.ai)
[YouTube](https://youtube.com/@aiwithabidi) | [GitHub](https://github.com/aiwithabidi)
Part of the **AgxntSix Skill Suite** for OpenClaw agents.
📅 **Need help setting up OpenClaw for your business?** [Book a free consultation](https://cal.com/agxntsix/abidi-openclaw)