PromptScan scans codebases for dead prompts and token costs without running your app

Spiritual_Fun_9933 · reddit · 2026-07-23

A developer built PromptScan, a CLI that statically scans codebases for OpenAI, Anthropic, and LangChain calls, estimates input-token cost, and flags duplicated, oversized, or dead prompts without needing an API key or runtime instrumentation.

What it does

What the author tested

Practical use

The tool can be used in CI with promptscan diff main HEAD to fail a PR when a prompt’s token count jumps past a threshold, catching context creep before it hits the bill.

Stack / install

Original post →

More from coding & agent

coding & agent channel →