Linter
Static analysis for prompts with quality scoring, issue detection, and auto-fix suggestions
Overview
The Prompt Linter performs static analysis on your prompts to identify issues, suggest improvements, and ensure consistent quality. Like code linters (ESLint, Pylint), it catches problems before they reach production, with a 0-100 quality score for quick assessment.
Quality Score
0-100 rating system
Issue Detection
Errors, warnings, info
Auto-Fix
One-click fixes
How to Use
- 1Paste Your Prompt - Enter your prompt text into the editor. The linter analyzes as you type.
- 2Click Lint - Run the full analysis to detect issues and generate your quality score.
- 3Review Issues - See all detected issues organized by severity (errors, warnings, info).
- 4Apply Fixes - Click 'Fix' on any issue with an available auto-fix, or 'Fix All' to apply all fixes.
- 5Re-Lint - After making changes, re-lint to verify improvements and check for new issues.
Quality Score
The quality score (0-100) provides an at-a-glance assessment of your prompt's quality:
Score Calculation
- Number and severity of detected issues
- Prompt structure and clarity
- Use of best practices
- Completeness of instructions
Severity Levels
Critical issues that will likely cause problems. Must be fixed before production use. Examples: injection vulnerabilities, contradictory instructions, missing critical context.
Potential issues that may affect quality or consistency. Should be reviewed and addressed. Examples: ambiguous instructions, missing examples, overly long sentences.
Suggestions for improvement that won't cause problems if ignored. Nice-to-haves. Examples: style suggestions, optimization opportunities, readability improvements.
Lint Rules
Structure Rules
- missing-role: No clear role definition for the AI
- missing-task: Task or objective not clearly stated
- missing-format: Expected output format not specified
- missing-constraints: No boundaries or limitations set
Clarity Rules
- ambiguous-instruction: Instructions that could be interpreted multiple ways
- long-sentence: Sentences over 50 words that hurt readability
- vague-quantifier: Words like "some", "few", "many" without specifics
- passive-voice: Excessive passive voice reducing clarity
Security Rules
- injection-risk: Patterns that could enable prompt injection
- pii-exposure: Risk of exposing personal information
- unrestricted-output: No guardrails on AI responses
Optimization Rules
- redundant-text: Repeated instructions or information
- excessive-tokens: Unnecessarily verbose phrasing
- missing-examples: Complex tasks without examples
Auto-Fix
Many issues come with automatic fixes that can be applied with one click:
Fixable Issues
- Trailing whitespace: Automatically trimmed
- Double spaces: Collapsed to single space
- Missing punctuation: Added where appropriate
- Capitalization: Fixed for consistency
- Redundant phrases: Removed or simplified
Manual Review Required
- Ambiguous instructions (need clarification)
- Missing context (need domain knowledge)
- Security issues (need careful review)
AI Expert Use Cases
Quality Gates
Team Standards
Prompt Audits
Onboarding
Tips & Best Practices
Pro Tips
- Aim for a score of 85+ for production prompts
- Fix all errors before addressing warnings
- Use auto-fix for quick wins, review suggestions carefully
- Re-lint after making changes to catch new issues
- Add the Linter to your prompt review checklist
When to Ignore Rules
- Domain-specific terminology flagged as unclear
- Intentionally vague instructions for creative tasks
- Long sentences that are actually clear in context