🧑‍💻

System Prompt Linter

🔒 In your browser

Review a system prompt for role clarity, guardrails & prompt-injection resistance.

How it works

Paste a system prompt (or agent instructions) and get a quick review: is the role clear, are there guardrails, does it handle untrusted content safely, and is it concise? You get a grade, a token estimate and concrete suggestions. Runs entirely in your browser.

Heuristic guidance, not a rulebook — a high grade doesn't guarantee safe behaviour, and a low one doesn't mean the prompt is broken. The token estimate is approximate (~4 chars/token). Your prompt is never uploaded.

🛑You might also need Prompt Injection Checker

About the System Prompt Linter

A system prompt is the most important text in any AI agent — it sets the role, the rules and the safety boundaries. This free system prompt linter reviews yours for the things that most affect behaviour: a clear role, explicit guardrails, resistance to prompt injection, output guidance and length, then gives you a grade and concrete fixes.

The review runs entirely in your browser with a rough token estimate; your prompt is never uploaded.

What it checks

  • Role — does the prompt clearly say who the assistant is and what it does?
  • Guardrails — are there explicit boundaries and a way to decline out-of-scope requests?
  • Injection resistance — if the agent reads user or external content, does it say to treat that content as data, not instructions?
  • Output — is there guidance on format, tone or length?
  • Clarity and length — vague wording and prompts that are far too short or very long.

Why the injection check matters

The moment an agent reads content it didn't write — a document, a web page, a tool result — that text can try to hijack it. A single line telling the model to treat external content as data rather than commands is one of the cheapest, most effective defences, so the linter flags prompts that consume outside content without one.

Frequently asked questions

How is the grade calculated?

It starts at 100 and deducts points for missing role, missing guardrails, no injection guard when the prompt reads external content, vague wording, and problematic length. The remaining score maps to an A–D grade.

Does a grade A prompt guarantee good behaviour?

No. This is heuristic guidance, not a test of the model's actual output. A high grade means the prompt covers the common bases; always evaluate real responses too.

How accurate is the token estimate?

It's a rough approximation (about four characters per token). For exact counts, use a model-specific token counter, but the estimate is fine for spotting a prompt that's getting expensive.

Is my prompt uploaded?

No. The whole review happens in your browser, so your system prompt stays private.

Related searches

system prompt lintersystem prompt checkerimprove system promptagent instructions reviewprompt guardrailsprompt injection resistance

Related Developer tools

🔗 Embed this tool on your website — free

Copy this and paste it into your page's HTML. The tool runs in the visitor's browser, just like here. Change height to fit, or add the optional auto-resize snippet below. Add ?theme=dark to the URL for dark mode.

<iframe src="https://toolhq.dev/embed/system-prompt-linter/" title="System Prompt Linter — ToolsHub" width="100%" height="520" style="border:1px solid #e5e7eb;border-radius:12px;max-width:680px" loading="lazy"></iframe>
Optional: auto-resize the iframe height

Add this once on the same page so the iframe grows to fit the tool:

<script>
addEventListener("message", function (e) {
  if (e.data && e.data.type === "toolshub:resize") {
    document.querySelectorAll('iframe[src*="/embed/"]').forEach(function (f) {
      if (f.contentWindow === e.source) f.style.height = e.data.height + "px";
    });
  }
});
</script>