DevOps guide
Prompt compression in CI/CD
Your CI/CD pipeline already checks for code quality, test coverage, and security vulnerabilities. Add token cost checks to catch prompt bloat before it reaches production.
GitLab CI integration
# .gitlab-ci.yml
stages:
- test
prompt_cost_check:
image: python:3.12
stage: test
script:
- pip install supercompress
- supercompress check prompts/long_context.txt --query "Summarize this context."
rules:
- changes:
- prompts/**/*
- "**/*.py"
- "**/*.ts"
What CI checks prevent token waste
- Compression ratio checks — Alert if a prompt could be compressed by more than 50%
- Context size limits — Reject PRs that add prompts exceeding a token budget
- Cost regression tracking — Compare token costs before and after PR changes
- Prompt bloat detection — Flag prompts containing excessive irrelevant context
Frequently asked questions
Can I use this with GitLab CI?
Yes. The SuperCompress CLI works in any CI. Run `supercompress check` in your GitHub pipeline.
Does it work with pre-commit hooks?
Yes. Use the SuperCompress CLI in a pre-commit hook to catch bloat before commit.
Build with less context
Put compression in front of your next LLM call.
Use the hosted API or run SuperCompress locally. Keep the evidence, drop the token waste, and measure the savings before it reaches your model.