skimp
Skimp on tokens, not on quality.
skimp is a local, privacy-first Python CLI that profiles OpenTelemetry (gen_ai.*) and MLflow AI agent traces to diagnose structural token waste and project monthly dollar burn.
Unlike passive observability dashboards that only show what you spent, skimp is prescriptive: it flags why tokens are being wasted and estimates how much money you can save.
Why skimp?
- 100% Privacy-First by Default: All core detectors run strictly on span metadata (token counts, model names, durations, span hierarchy, status codes). Prompt/message payloads (
gen_ai.input.messages,gen_ai.output.messages,mlflow.spanInputs, etc.) are stripped at ingest by default. - Multi-Dialect Telemetry: Parses standard OTLP JSON (
resourceSpans), OTLP NDJSON,opentelemetry-sdkflat exports, OpenLLMetry/OpenInference, and MLflow trace JSON exports. - 4 Prescriptive Waste Detectors:
- Context Snowballing — Flags multi-turn
chatsequences with runaway/quadraticinput_tokensgrowth. - Retry & Tool Thrashing — Flags repeated
execute_toolloops and repeated failed (ERROR) spans, attributing nested LLM retry costs. - Model Overkill — Flags short, low-output-token spans (routing, classification, extraction) running on expensive frontier models.
- Broken Prompt Caching — Flags repeated large-input spans with zero cached tokens on cache-capable models.
- Context Snowballing — Flags multi-turn
- Configurable for All Models (Current & Future): Override built-in rates or define any future/custom model ID in
skimp.toml,[tool.skimp]inpyproject.toml, or~/.config/skimp/config.toml.
Installation
Requires Python 3.11+.
# With uv (recommended)
uv tool install skimp
# Or with pip
pip install skimp
For local development:
git clone https://github.com/rajsinghparihar/skimp.git
cd skimp
uv sync
Quickstart
Generate a realistic, noisy sample OTel trace with baked-in structural waste patterns:
uv run skimp generate-sample --out sample_trace.json
Analyze the trace, project monthly spend at 1,000 runs/day, and export a self-contained HTML audit report:
uv run skimp analyze sample_trace.json --daily-runs 1000 --html report.html
Custom Model Pricing (skimp.toml)
skimp ships with reference per-1M token pricing for OpenAI, Anthropic, Google Gemini, and common open models, and automatically strips provider prefixes (openai/, anthropic/, bedrock/, models/) and dated snapshot suffixes (gpt-4o-2024-11-20).
To configure custom or future models, add a skimp.toml file (or [tool.skimp] in pyproject.toml):
daily_runs = 2500
[models."claude-opus-5-preview"]
input_per_1m = 12.00
output_per_1m = 60.00
cached_input_per_1m = 1.20
tier = "frontier"
provider = "anthropic"
[models."my-finetuned-router"]
input_per_1m = 0.15
output_per_1m = 0.45
tier = "mini"
Pass an explicit config file at runtime with --config path/to/skimp.toml.
Development
uv run pytest -v
uv run ruff check .
uv build
License
Apache-2.0 — see LICENSE.
Metadata
Release files for skimp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skimp-0.1.0.tar.gz | 329.2 kB | Without provenance | Details for skimp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skimp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for skimp-0.1.0-py3-none-any.whl |
Total release size: 364.9 kB
Release files / skimp-0.1.0.tar.gz
| Download URL | skimp-0.1.0.tar.gz |
|---|---|
| Size | 329.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f17d3a94cae8155dc10f1c42c317ec716567ae30db6e005b84351c6f10acb58
|
|
BLAKE2b-256 checksum How to use checksums |
88ec022c6a6e779540d84f32bf2a29bb6e0b1ceec87cde15ab25e0aafd489a24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / skimp-0.1.0-py3-none-any.whl
| Download URL | skimp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57dce279efd87ea33f139de2a4ea6e522e227136e0989d85f892f8a4f313d13e
|
|
BLAKE2b-256 checksum How to use checksums |
839ce3a54a15f52d1f5783fe1e5b1a72121d4f317dbd636bba5292f416a575bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for skimp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.