Static analysis for LLM prompts — treats prompts as code
Install, point at your prompts, get results.
Every rule has an ID, a default severity, and a clear description of what it catches.
| Category | IDs | What It Checks |
|---|---|---|
| Token Budget | PL001-003 | Token count thresholds, filler content density |
| System Prompt | PL010-014 | Missing/misplaced system prompt, injection vectors, conflicting instructions |
| Formatting | PL020-024 | Trailing whitespace, inconsistent delimiters, missing output format, repetition |
| Variables | PL030-033 | Undefined/unused variables, missing defaults, mixed placeholder formats |
| Pipeline | PL040-043 | Handoff gaps, context overflow, orphan references, persona drift |
| Hallucination | PL050-054 | Requests for numbers/URLs/citations without data, no uncertainty instructions |
| Security | PL060-063 | PII in prompts, API keys, no output constraints, unbounded tool use |
| Smells | PL070-074 | Ambiguous quantifiers, buried instructions, no examples, wall of text |
| Gates | PL080-083 | Conditional logic without enforcement, missing fallbacks, no evidence gates |
| Tokenizer | PL090 | Warns when model profile uses an approximate tokenizer (Claude, Gemini) |
Not just a linter. A complete prompt quality toolkit.
--model claude-3-sonnet to auto-configure context windows and tokenizers. Supports GPT-4, Claude, and Gemini families.--fix to automatically repair fixable violations: trailing whitespace, inconsistent delimiters, missing defaults.--format github. JSON output for scripting. Baseline mode to only fail on new violations.Parses the prompt formats you already use.
Drop a .promptlint.yaml in your project root, or run promptlint init to scaffold one.
Human-readable by default. Machine-readable when you need it.