DevTools Logo

Prompt Best Practices Linter

Prompt Best Practices Linter

Lint prompts with transparent static rules — vague verbs, conflicts, buried constraints, missing formats. No model call.

Runs in your browser

Every finding has a rule id, exact span and manual suggestion. Nothing is sent to an AI, nothing is stored, and no numeric quality score is invented.

Try an example

Prompt to lint

1 line · 198 chars
Rules

Findings

6 findings · 30 words · 7 rules
1 high · 5 medium · 0 low
JSON findings (CI schema v1)
{
  "schemaVersion": 1,
  "counts": {
    "high": 1,
    "med": 5,
    "low": 0
  },
  "wordCount": 30,
  "rulesRun": 7,
  "findings": [
    {
      "ruleId": "R-CONFLICT",
      "severity": "high",
      "line": 1,
      "column": 71,
      "message": "Conflicting requirements: \"be brief\" and \"detailed\".",
      "rationale": "Two requirements in the same prompt cannot both be satisfied (brief but detailed). Models silently choose one, so the conflict should be resolved by the author.",
      "suggestion": "Choose one or state which takes priority: \"be brief\" vs \"detailed\"."
    },
    {
      "ruleId": "R-VAGUE-VERB",
      "severity": "med",
      "line": 1,
      "column": 8,
      "message": "Vague phrase \"utilize\" leaves the action ambiguous.",
      "rationale": "Words like utilize, leverage and stuff leave the expected action ambiguous; a concrete verb tells both the reader and the model what to do.",
      "suggestion": "Replace \"utilize\" with a specific, concrete instruction."
    },
    {
      "ruleId": "R-NEGATION-DENSITY",
      "severity": "med",
      "line": 1,
      "column": 125,
      "message": "Negation \"Don't\" adds to a prohibition-heavy prompt.",
      "rationale": "Long chains of prohibitions are hard to follow and models often attend to the forbidden action itself.",
      "suggestion": "Replace \"Don't\" with a specific, concrete instruction."
    },
    {
      "ruleId": "R-NEGATION-DENSITY",
      "severity": "med",
      "line": 1,
      "column": 138,
      "message": "Negation \"don't\" adds to a prohibition-heavy prompt.",
      "rationale": "Long chains of prohibitions are hard to follow and models often attend to the forbidden action itself.",
      "suggestion": "Replace \"don't\" with a specific, concrete instruction."
    },
    {
      "ruleId": "R-NEGATION-DENSITY",
      "severity": "med",
      "line": 1,
      "column": 152,
      "message": "Negation \"never\" adds to a prohibition-heavy prompt.",
      "rationale": "Long chains of prohibitions are hard to follow and models often attend to the forbidden action itself.",
      "suggestion": "Replace \"never\" with a specific, concrete instruction."
    },
    {
      "ruleId": "R-NEGATION-DENSITY",
      "severity": "med",
      "line": 1,
      "column": 169,
      "message": "Negation \"avoid\" adds to a prohibition-heavy prompt.",
      "rationale": "Long chains of prohibitions are hard to follow and models often attend to the forbidden action itself.",
      "suggestion": "Replace \"avoid\" with a specific, concrete instruction."
    }
  ]
}

A prompt-checker that never calls a model. Seven transparent rule families flag vague wording, impossible requirement pairs, missing output formats, negation-heavy prose, constraints buried at the end of long prompts, dense paragraphs and repeated instructions. Findings include rule ids, exact spans, line and column, rationale and manual suggestions; toggling a rule recomputes everything. Use the read-only highlight mirror to see spans, filter by severity and export a Markdown checklist for PRs or versioned JSON for CI consumers. Prompts are neither uploaded nor persisted, and no numeric quality score is invented.

  • Vague verb: R-VAGUE-VERB points at utilize with a suggestion to name the concrete action.
  • Conflicting instructions: R-CONFLICT is high severity even when the requirements are far apart in a long system prompt.
  • Buried output format: R-BURIED-CONSTRAINT flags imperative format instructions in the last fifth of a long prompt.

Examples

Vague wording

Input
Please utilize the provided context.
Output
R-VAGUE-VERB at line 1, column 8

Replace utilize with the specific action you expect from the model.

Impossible requirements

Input
Be brief … Include detailed examples for every point.
Output
R-CONFLICT (high)

The conflict fires regardless of distance, the common case in long system prompts.

Buried format

Input
Six paragraphs of background, then: Respond in JSON only.
Output
R-BURIED-CONSTRAINT (high)

Imperative output instructions count as constraints, not only modal verbs.

About this tool

The Prompt Best Practices Linter checks prompts against a transparent, static rule set: vague wording, conflicting requirements, missing output formats, negation density, constraints buried at the end, walls of text and repeated instructions. Each finding carries a rule id, a character span, line and column, the rationale and a manual-edit suggestion.

Nothing is sent to an AI, no model rewrites your text and there is no invented quality score. The rule engine is a pure function over text, so results are deterministic and the exported JSON has a schema version for CI consumers. Prose rules skip fenced code blocks and curly apostrophes are normalised for matching without changing offsets.

Use the highlight mirror to see underlined spans, filter or toggle rules, and export a Markdown checklist or versioned JSON. The three sample prompts — clean, mediocre and rules galore — demonstrate how the rules fire and why specificity beats a pile of prohibitions.

What this tool does not do

  • Heuristics are English-tuned and advisory only.
  • No model call, no semantic understanding and no automatic rewriting.
  • Prompts are not persisted; rule toggles last for the session only.
  • JSON mode in a prompt mentions does not validate model output — it is a lint rule, not a runtime guard.

How to use this tool

  1. Paste a prompt

    Add a system prompt or instruction block up to 100 KB; findings update as you type.

  2. Review findings

    Expand a rule group to read each span, rationale and suggested manual rewrite.

  3. Toggle rules

    Disable a rule that does not apply to your team's conventions; exports note how many rules ran.

  4. Export

    Download the Markdown checklist for a PR comment or the versioned JSON for automated checks.

Use cases

Prompt review in PRs

Attach the Markdown checklist to a review so the discussion has concrete, reproducible points.

Author self-check

Spot ambiguity and conflicting instructions before deploying a system prompt.

Teaching prompt writing

Show why concrete verbs, explicit formats and early constraints matter.

Rule set

RuleWhat it checks
R-VAGUE-VERButilize, leverage, stuff, things, somehow and similar filler
R-CONFLICTbrief vs detailed, short vs comprehensive and other impossible pairs
R-NO-FORMATlong imperative generation prompts with no format marker
R-NEGATION-DENSITYmore than four negations per 100 words
R-BURIED-CONSTRAINTconstraints in the last 20% of prompts over 150 words
R-WALL-OF-TEXTdense paragraphs over 120 words with no breaks
R-DUPLICATEverbatim repeated instruction sentences

Findings are sorted by severity then position; severity is shown as text and color together.

Common mistakes

Mistake:Treating findings as a quality score.

Fix:Rules are advisory heuristics; a clean report is not a guarantee of good behavior.

Mistake:Expecting an automatic rewrite.

Fix:Suggestions are manual phrasing hints; you decide the edit.

Mistake:Leaving conflicting instructions in a long prompt.

Fix:Resolve the conflict or state an explicit priority.

Mistake:Using the export in CI without checking schema version.

Fix:The JSON includes schemaVersion; gate consumers should check it before relying on rule ids.

Frequently asked questions

Is my prompt sent to an AI?

No. The linter is a static rule engine in your browser tab: no model call, no network request and no persistence. It never rewrites your prompt automatically — every finding comes with a suggestion you apply yourself.

Which rules does it check?

Seven documented rules: vague wording (R-VAGUE-VERB), conflicting requirements (R-CONFLICT), missing output format (R-NO-FORMAT), negation density (R-NEGATION-DENSITY), constraints buried at the end of long prompts (R-BURIED-CONSTRAINT), dense paragraphs (R-WALL-OF-TEXT) and verbatim repeated instructions (R-DUPLICATE). Each finding has a rule id, span, line/column and rationale.

Why flag utilize but not use?

Utilize, leverage, stuff and things are filler: they leave the expected action vague. Use names a concrete action. The rule is a lexicon heuristic, so it is advisory and can be disabled if your team's style guide differs.

Can the linter rewrite my prompt?

No. It deliberately offers manual suggestions rather than auto-edits, because a deterministic regex engine cannot understand intent. The highlight mirror shows spans while the textarea remains the single source of truth.

Can I use the findings in CI?

The JSON export has a stable schemaVersion and versioned rule ids, so a CI job can gate on high-severity counts. The browser tool is an authoring surface; wire its pure engine into your own runner if you want automated checks on every commit.

Are non-English prompts supported?

The lexicons and sentence heuristics are English-tuned. Other languages will still produce structural findings such as walls of text and repeated sentences, but word-based rules may be silent. Nothing is mangled: typographic quotes and apostrophes are preserved and normalised only for matching.

References & standards