Back to home
Proprietary engine

CARTIE Lens

The first cost linter for application code. SonarQube lints code quality. Snyk lints security. We lint cost.

Paste Python or JavaScript → see every cost-expensive pattern (LLM-in-loop, missing pagination, abandoned streams, retry storms) with the projected dollar-impact and a one-line fix.

Paste your code
Up to 50,000 characters. Nothing is stored unless you sign in and click "Scan & Save".
Findings
Each finding has a fix + projected $-impact at observed traffic.
Paste code on the left, hit Scan.

The catalog

10 cost-pattern signatures live today. Each one is a real anti-pattern we've seen in production codebases — and a documented $-impact at observed traffic.

L001
python
high
LLM call inside for/while loop without batching
OpenAI/Anthropic calls inside a loop pay per-iteration latency tax + miss batch-API 50% discount.
L002
python
high
Cloud SDK list call without pagination
boto3 / google-cloud / azure-sdk calls without paginator silently truncate or repeatedly refetch.
L003
python
medium
Streaming LLM response not fully consumed
Streaming = you still pay for every output token generated, even if your code never reads them.
L004
python
medium
Stable system prompt without prompt-cache marker
Long system prompts repeated across requests are 90% cheaper if marked with provider cache_control.
L005
python
high
Retry decorator without exponential backoff
Naive retry decorators (@retry(tries=5)) trigger retry-storms during provider degradation — you pay for every failed attempt.
L006
javascript
high
fetch() inside for/forEach without Promise.all batching
Sequential awaits inside a loop serialise N requests instead of parallelising.
L007
javascript
medium
OpenAI/Anthropic SDK call in tight loop without rate-limit
Rapid-fire LLM calls hit per-minute rate limits, triggering 429 retries that you pay for.
L008
javascript
low
console.log inside high-throughput request handler
CloudWatch / Stackdriver ingest costs scale per GB of log volume.
L009
python
medium
ORM query inside a loop (N+1 query antipattern)
Each iteration issues a separate DB query — N queries instead of 1.
L010
python
low
time.sleep() inside async coroutine
Blocking sleep in async code freezes the event loop — you pay for idle compute on every request.
Coming next

PR comments + VSCode squiggles + standalone CLI.

Cost-Lens will run as a GitHub Action (15 lines of YAML) and comment on every PR. A VSCode extension surfaces findings as inline squiggles while you type. Standalone CLI binary for local pre-commit.

Want early access? Join the waitlist at /vscode-extension

We value your privacy. Cookies help us improve your experience. Learn more

Install CARTIE AI

Add to your home screen for quick access and offline support