berriai/litellm-skills/view-usage
- community
Checking that the SKILL.md file is still in the repository.
Query spend and token activity on a live LiteLLM proxy. Shows daily usage broken down by user, team, org, tag, job, or model. Use when the user wants to see costs, token counts, request volume, or job-level attribution for a given date range.
Install
npx vskill@latest install berriai/litellm-skills/view-usageSKILL.md
View Usage
Query daily activity and spend data from a live LiteLLM proxy.
Setup
Ask for these if not already known:
API reference: https://docs.litellm.ai/docs/proxy/users#get-user-spend
Ask the user
- View by — overall / user / team / org / tag / job (default: overall)
- Date range — default to current month if not given
- Filter by model? (optional)
- Job tag(s)? (optional) — for job cost attribution, ask which request
tag identifies the job, for example job:nightly-eval or job=batch-import.
Job cost attribution
LiteLLM attributes per-request costs through request tags. For LLM jobs, prefer tagging requests with a stable job label such as job:<job-name> and then query tag APIs:
- Use
/tag/daily/activity?tags=<tag>for daily spend, tokens, request count,
and model/provider breakdowns for one or more job tags.
- Use
/global/spend/tags?tags=<tag>for a top-level spend total by tag over a
date range.
- If the user asks "which jobs cost the most?", call
/global/spend/tags
without a tags filter, sort by spend descending, and present the top tags that look like job labels.
Endpoints
Overall spend (across all users)
Overall request and token volume
By team
By org
By user
By tag or job
For multiple tags, pass a comma-separated list:
Top tag spend
Filter to a specific job tag:
Response shape
Note: top-level key is results (not data).
Summarize with python3
Error handling
Before processing results, check the HTTP status:
- 401/403 — invalid or expired
LITELLM_API_KEY; ask the user to verify - 404 — endpoint not available; check LiteLLM proxy version supports activity endpoints
- Empty results — no activity in the given date range; confirm dates are correct
Instructions
- Ask for date range — default to current month.
- Run the appropriate endpoint. For job attribution, prefer tag endpoints and
ask for the job tag if it was not provided.
- Print a table: Date | Requests | Tokens | Spend.
- Show totals row at the bottom.
- Highlight any days with
failed_requests > 0. - If
metadata.total_pages > 1, offer to fetch remaining pages.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingview-usage/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 8
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/berriai/litellm-skills/view-usage)