System Prompt Linter
Paste the system prompt of your chatbot or agent and get a line-by-line report of contradictions, fuzzy instructions, broken template variables and missing sections.
S'executa al teu navegador. Els fitxers mai no surten del dispositiu. Mira com comprovar-ho
…
Com es fa
- 1Paste the prompt
Paste your system prompt or open a .txt, .md or template file.
- 2Set the syntax
Choose the variable syntax your application fills in.
- 3Read the report
Start with errors and warnings; each one names the line and a fix.
- 4Filter by area
Use the category buttons to work through structure, clarity, conflicts and variables.
- 5Test the variables
On the fill tab, type sample values and read the exact prompt the model will get.
- 6Export
Download the report as Markdown for a pull request or a prompt review.
Sobre aquesta eina
System prompts grow the way configuration files do: one rule per incident, added by different people, never read top to bottom again. After a few months the prompt asks for concise answers in one line and comprehensive explanations in another, mixes two template syntaxes, and leaves user text sitting between instructions where it can pass itself off as a rule. Models then follow whichever line they weigh more on a given day, and the bug looks random. This linter reads a prompt the way a careful reviewer would and groups what it finds into six areas. Structure covers a missing role line, no output format, long prompts without sections and unclosed XML tags. Clarity covers vague words such as etc, relevant information, try to and good, length words without a number, heavy use of capitals and rules that only say what not to do. Consistency covers pairs of rules that contradict each other, always and never on the same action, and repeated lines. Variables covers placeholders written in another syntax than your app uses, unescaped braces in JSON examples, unbalanced braces and leftover placeholders such as [INSERT NAME]. Safety covers user input that is not fenced off and secrets pasted into the prompt. Each finding has a line number and a suggested fix.
The score
The score starts at 100 and loses 15 points per error, 8 per warning and 3 per notice. It is a rough measure of how much cleanup is left, not of answer quality. You can ignore a finding you disagree with; ignored findings stop counting and can be restored, and the line view highlights every line that still has an issue.
Conflicts the linter knows
It looks for pairs that often end up in the same prompt: short versus detailed answers, formal versus casual tone, Markdown versus plain text, JSON only versus explain your answer, ask clarifying questions versus never ask questions, and always cite versus no links. It also matches always and never followed by the same words. Real conflicts may be fine when the prompt says when each rule applies, so read the two lines it quotes before changing anything.
Template variables
Pick the syntax your code fills in: Mustache or Handlebars double braces, Jinja with spaces and filters, Python format and LangChain single braces, or JavaScript template strings. Placeholders in any other syntax reach the model as literal text and are flagged. With Python-style templates, a JSON example written with single curly braces breaks formatting unless the braces are doubled, which is reported as an error. The fill tab lists every variable, lets you type test values and shows the exact prompt the model would receive.
Limits
The checks are pattern rules distilled from public prompting guides. They do not run the prompt against a model, so a clean report does not prove the prompt works, and some notices are matters of taste. English is the only language with tuned word lists. Test every change on real inputs before it ships.
Exemple resolt
A billing assistant prompt of 13 lines and about 140 tokens scores 31. The linter finds three conflicts: concise versus detailed and comprehensive on line 3, formal versus casual and playful on line 4, and always ask clarifying questions on line 7 against do not ask follow-up questions on line 8. It warns that no output format is given, that the plan placeholder uses single-brace Python syntax while the app fills double-brace Mustache variables such as customer_message, and that the customer message is not wrapped in tags. Notices cover etc, relevant information, try to, good, concise and short without numbers, and today with no date. After rewriting it with one length rule, one tone, an output section and customer_message wrapped in XML-style tags, the score rises above 90.
En resum
- Categoria: Desenvolupament i dades
- S'executa al navegador, sense registre, sense pujar res.
- La informació que introdueixes es queda al dispositiu.
- Disponible en anglès.
- Contingut revisat per última vegada:
- Font oficial: Anthropic prompt engineering guide and OpenAI prompt engineering guide
Preguntes freqüents
Which template syntaxes does it understand?
Double-brace Mustache and Handlebars, Jinja2 with spaces and filters, single-brace Python format strings as used by LangChain, and JavaScript template strings that start with a dollar sign.
Why does it want an output format?
Without one the model chooses length and layout itself, and that choice drifts between calls. Stating the format, the length limit and one example is the most reliable fix for inconsistent answers.
Are capital letters bad?
Not on their own, but recent models already follow instructions closely, and many shouted rules make them apply each rule too broadly. Keep capitals for one or two real limits and give the reason.
What does fencing user input mean?
Putting the user's text inside clear markers such as XML-style user_input tags or a code block, and saying that text inside is data. It helps the model tell your rules apart from instructions hidden in the input.
Can it check prompts in other languages?
Structure, variable, tag and length checks work for any language. The vague-word and conflict lists are English, so expect fewer findings in other languages.
Is my prompt stored?
Only in your browser's local storage on this device, for the undo history. Nothing is uploaded.
