Skip to content
Agentmart
Submit a tool

model-usage

View LiteLLM Proxy model usage and cost data.

Skill by connor-git-yaml

IndexedMIT★ 4
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/connor-git-yaml-model-usage

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

View LiteLLM Proxy model usage and cost data. Use when: user asks about model costs, token usage, spending breakdown, or API usage statistics. Queries LiteLLM spend endpoints.

Use cases: backend, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/model-usage

What's inside

Skill name
model-usage
Description
View LiteLLM Proxy model usage and cost data. Use when: user asks about model costs, token usage, spending breakdown, or API usage statistics. Queries LiteLLM spend endpoints.
License
MIT
Instructions
77 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Model Usage

Query LiteLLM Proxy spend endpoints for model usage and cost data.

## When to Use

- "How much have I spent on API calls?"
- "What models am I using?"
- "Show me cost breakdown by model"
- "Token usage for today/this week"

## Data Source

OctoAgent uses LiteLLM Proxy as the model gateway. All LLM calls are routed through it,
and LiteLLM tracks per-model spend data internally.

## LiteLLM Spend Endpoints

The LiteLLM Proxy exposes spend tracking via its API:

### Total Spend

```bash
curl -s ${LITELLM_PROXY_URL:-http://localhost:4000}/spend/logs \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq .
```

### Spend by Model

```bash
curl -s "${LITELLM_PROXY_URL:-http://localhost:4000}/global/spend/models?limit=10" \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq .
```

### Spend by API Key

```bash
curl -s "${LITELLM_PROXY_URL:-http://localhost:4000}/global/spend/keys?limit=10" \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq .
```

### Date Range Filtering

```bash
curl -s "${LITELLM_PROXY_URL:-http://localhost:4000}/spend/logs?start_date=$(date +%Y-%m-01)&end_date=$(date +%Y-%m-%d)" \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq .
```

## Quick Summary

To get a quick overview of spending:

```bash
# Total spend
curl -s ${LITELLM_PROXY_URL:-http://localhost:4000}/global/spend/report \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq '.total_spend'

# Top models by cost
curl -s "${LITELLM_PROXY_URL:-http://localhost:4000}/global/spend/models?limit=5" \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" | \
  jq '.[] | "\(.model): $\(.total_spend)"'
```

## Configuration

- LiteLLM Proxy URL: configured via `LITELLM_PROXY_URL` or project config
- Master Key: `LITELLM_MASTER_KEY` environment variable
- Default port: 4000

## Notes

- Spend data is persisted in LiteLLM's internal SQLite database
- Token counts and costs are per-request, aggregated by model
- Use `runtime.inspect` to check current LiteLLM Proxy connection status
- Cost data may have slight delays due to async logging

From connor-git-yaml/OctoAgent, MIT.

Signals

Stars
4
Forks
0
Open issues
0
Last commit (this folder)
Mar 16, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from connor-git-yaml

Cite this page

model-usage skill. Agent Mart. https://agentmart.dev/skills/connor-git-yaml-model-usage (last updated 2026-10-24)