Security First
Detect prompt injection, jailbreak attempts, hardcoded secrets, PII exposure, and context boundary violations โ all at CRITICAL severity with zero false negatives in production.
Security rules
Catch cost waste, security risks, PII leaks, and quality issues before they reach production. 20 intelligent rules, 5 auto-fixes, zero API calls.
Install via pip or npm, then lint your first prompt:
pip install promptlint-cli
promptlint --file prompt.txtnpm install -g promptlint-cli
promptlint --file prompt.txt- uses: AryaanSheth/promptlint@v1
with:
path: prompts/
fail-level: warn PromptLint v1.3.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ File: prompts/system_prompt.txt (97 tokens ยท ~$0.0005) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ CRITICAL ] prompt-injection (line 3)
Injection pattern detected: 'ignore previous instructions'
[ CRITICAL ] pii-in-prompt (line 7)
Email address detected: us**@example.com
[ WARN ] structure-sections (line -)
No explicit sections detected (Task / Context / Output)
[ WARN ] politeness-bloat (line 1)
Consider removing 'Please' โ models don't need it
[ INFO ] specificity-examples (line -)
No examples provided โ add 1-2 to improve consistency
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Score: 42/100 Grade: F 5 findings (2 critical ยท 2 warn ยท 1 info)
Run with --fix to auto-resolve 3 of these issues| Channel | Command | When to use |
|---|---|---|
| pip | pip install promptlint-cli | Python projects & scripts |
| npm | npm install -g promptlint-cli | Node.js projects & pipelines |
| GitHub Action | AryaanSheth/promptlint@v1 | Any GitHub-hosted CI |
| VS Code | Search "PromptLint" in Extensions | Real-time editor feedback |
| Category | Rules | Auto-fixable |
|---|---|---|
| ๐ฐ Cost & Tokens | cost, cost-limit | โ |
| ๐ Security | prompt-injection, jailbreak-pattern, secret-in-prompt, pii-in-prompt, context-injection-boundary | โ 1 |
| ๐๏ธ Structure | structure-sections, role-clarity, output-format-missing, hallucination-risk | โ 1 |
| โจ Clarity | clarity-vague-terms | โ |
| ๐ฏ Specificity | specificity-examples, specificity-constraints | โ |
| ๐ Verbosity | politeness-bloat, verbosity-redundancy, verbosity-sentence-length | โ 2 |
| ๐ช Actionability | actionability-weak-verbs | โ |
| ๐ Consistency | consistency-terminology | โ |
| โ Completeness | completeness-edge-cases | โ |