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.
GitHub Action integration
# .github/workflows/token-check.yml
name: Token cost check
on:
pull_request:
paths: ["prompts/**", "**/*.py", "**/*.ts"]
jobs:
check-tokens:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check prompt costs
uses: arjunkshah/supercompress/.github/actions/supercompress-compress@main
with:
context: prompts/long_context.txt
query: "Summarize this context."
pr-comment: "true"
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 GitLab pipeline.
Does it work with pre-commit hooks?
Yes. Use the SuperCompress CLI in a pre-commit hook to catch bloat before commit.
Try it yourself
Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.