Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/skill-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Skill Review
on:
pull_request:
paths: ['**/SKILL.md']
jobs:
review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: tesslio/skill-review@22e928dd837202b2b1d1397e0114c92e0fae5ead # main
28 changes: 24 additions & 4 deletions add-key/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
name: add-key
description: >
Generate a new API key on a live LiteLLM proxy. Asks for alias, scope
(user/team), budget, models, and expiry, then calls POST /key/generate.
description: "Generate a new API key on a live LiteLLM proxy. Asks for alias, scope (user/team), budget, models, and expiry, then calls POST /key/generate. Use when the user wants to create, generate, or provision an API key on a LiteLLM proxy instance."
license: MIT
compatibility: Requires curl.
metadata:
Expand Down Expand Up @@ -36,6 +34,9 @@ API reference: https://litellm.vercel.app/docs/proxy/virtual_keys
## Run

```bash
BASE="$LITELLM_BASE_URL"
KEY="$LITELLM_API_KEY"

curl -s -X POST "$BASE/key/generate" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
Expand All @@ -49,10 +50,29 @@ curl -s -X POST "$BASE/key/generate" \
}'
```

## Verify

Confirm the key was created:
```bash
curl -s "$BASE/key/info" \
-H "Authorization: Bearer <new_key>" | python3 -c "
import sys, json
d = json.load(sys.stdin)
info = d.get('info', {})
print(f'Alias: {info.get(\"key_alias\")}')
print(f'Expires: {info.get(\"expires\")}')
print(f'Budget: {info.get(\"max_budget\")}')
print(f'Models: {info.get(\"models\")}')
"
```

## Output

Show the user:
- `key` β€” the actual key value (only shown once, tell them to save it)
- `key_alias`, `expires`, `max_budget`, `models`

On error show `detail` and the likely fix.
On error:
- **401** β€” check that `LITELLM_API_KEY` is a valid admin key
- **400** β€” check required fields; verify `team_id`/`user_id` exists
- Other errors β€” show `detail` and the likely fix
5 changes: 1 addition & 4 deletions add-model/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
name: add-model
description: >
Add a new model to a live LiteLLM proxy. Walks the user through picking a
provider, entering the deployment name and credentials, calls POST /model/new,
then test-calls the model to confirm it routes correctly.
description: "Add a new model to a live LiteLLM proxy. Walks the user through picking a provider, entering the deployment name and credentials, calls POST /model/new, then test-calls the model to confirm it routes correctly. Use when the user wants to add, register, deploy, or configure a new model on a LiteLLM proxy instance."
license: MIT
compatibility: Requires curl.
metadata:
Expand Down
20 changes: 16 additions & 4 deletions add-team/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
name: add-team
description: >
Create a new team on a live LiteLLM proxy. Asks for team name, budget, and
allowed models, then calls POST /team/new and shows the result.
description: "Create a new team on a live LiteLLM proxy. Asks for team name, budget, and allowed models, then calls POST /team/new and shows the result. Use when the user wants to create a new team, set up team budgets, or configure model access for a team on the proxy."
license: MIT
compatibility: Requires curl.
metadata:
Expand Down Expand Up @@ -35,6 +33,9 @@ API reference: https://litellm.vercel.app/docs/proxy/team_based_routing
## Run

```bash
BASE="$LITELLM_BASE_URL"
KEY="$LITELLM_API_KEY"

curl -s -X POST "$BASE/team/new" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
Expand All @@ -47,10 +48,21 @@ curl -s -X POST "$BASE/team/new" \
}'
```

## Verify

Confirm the team was created:
```bash
curl -s "$BASE/team/info?team_id=<team_id>" \
-H "Authorization: Bearer $KEY"
```

## Output

Show the user:
- `team_id` β€” they'll need this to generate keys for the team
- `team_alias`, `max_budget`, `models`

On error show `detail` and the likely fix.
On error:
- **401** β€” check that `LITELLM_API_KEY` is a valid admin key
- **400** β€” check required fields (team_alias is required)
- Other errors β€” show `detail` and the likely fix
4 changes: 1 addition & 3 deletions delete-model/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
name: delete-model
description: >
Delete a model from a live LiteLLM proxy. Ask for the model name or model_id
and confirm before calling POST /model/delete.
description: "Delete a model from a live LiteLLM proxy. Asks for the model name or model_id and confirms before calling POST /model/delete. Use when the user wants to remove, delete, or unregister a model from a LiteLLM proxy instance."
license: MIT
compatibility: Requires curl.
metadata:
Expand Down
21 changes: 13 additions & 8 deletions view-usage/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
name: view-usage
description: >
Query spend and token activity on a live LiteLLM proxy. Shows daily usage
broken down by user, team, org, or model. Use when the user wants to see
costs, token counts, or request volume for a given date range.
description: "Query spend and token activity on a live LiteLLM proxy. Shows daily usage broken down by user, team, org, or model. Use when the user wants to see costs, token counts, or request volume for a given date range."
license: MIT
compatibility: Requires curl and python3.
metadata:
Expand Down Expand Up @@ -111,11 +108,19 @@ print(f'{'TOTAL':<12} {'':>10} {'':>12} \${total_spend:>9.4f}')
"
```

## 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

1. Ask for date range β€” default to current month.
2. Run the appropriate endpoint.
3. Print a table: Date | Requests | Tokens | Spend.
4. Show totals row at the bottom.
5. Highlight any days with `failed_requests > 0`.
6. If `metadata.total_pages > 1`, offer to fetch remaining pages.
3. Validate the response (check for errors before parsing).
4. Print a table: Date | Requests | Tokens | Spend.
5. Show totals row at the bottom.
6. Highlight any days with `failed_requests > 0`.
7. If `metadata.total_pages > 1`, offer to fetch remaining pages.