system-prompt-review
Skill0 starsChanged 8 days agoMITView on GitHub
Review and tighten system prompts for business agents and LLM features - role and scope, refusal rules for out-of-scope requests, handover-to-human rules, tool-use rules, answer format, grounding, tone - with a checklist and a script that flags always/never contradictions, missing refusal or handover rules, tools without usage rules, unfilled placeholders, hard-coded dates, credential-like strings, duplicates, vague phrasing and prompts that exceed a token budget. Use when writing, reviewing or debugging a system prompt, when an agent ignores rules or contradicts itself, before launch, or when a prompt has grown by patching.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-deployment-checklistSkill
- agent-scopingSkill
- conversation-log-analysisSkill
- cost-latency-estimatorSkill
- eval-harnessSkill
- guardrails-and-safetySkill
- rag-ingestionSkill
- tool-schema-designSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Before a launch or after changing tools, policies or the model
- Very specific: line 27
No spec yet (scope, handover, out-of-scope unknown): run agent-scoping first
- Distinctive: line 46
Restructure if needed: Use the skeleton in references/prompt-skeleton.md: role, context, scope, rules, tools, handover, format, examples.
- Distinctive: line 64
Rules the model keeps breaking: check if a tool or code can enforce it (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
System prompt review
A good business-agent prompt is short, structured, specific and free of conflicts. Review it like code: automated checks first, then a human read against the checklist, then evals.
Paths below are relative to this skill's folder.
When to use
- "Review my system prompt", "why does the bot ignore rule X?", "make this prompt better"
- A prompt that grew by patching ("ALWAYS do Y" added after each incident)
- Before a launch or after changing tools, policies or the model
- Converting an agent spec into a first prompt
When not to use
- No spec yet (scope, handover, out-of-scope unknown): run
agent-scopingfirst - Problems with tool selection or arguments: run
tool-schema-design - Measuring whether a change helped: use
eval-harness(do it after this review)
Workflow
- Get the full prompt as sent at runtime (with variables filled), plus the tool list and the agent spec if they exist. Ask for 3-5 conversations where it went wrong.
- Run the automated review.
Exit 1 when findings at or abovepython3 scripts/prompt_review.py prompt.txt python3 scripts/prompt_review.py prompt.txt --max-tokens 1500 --tools yes --json python3 scripts/prompt_review.py prompt.txt --fail-on medium # stricter CI gate--fail-on(defaulthigh). Contradiction findings are candidates: read both sentences and decide whether they really conflict. - Read it against the checklist in references/checklist.md: role and audience, scope and refusals, handover, tools, grounding and "I don't know", format, tone, safety, examples, structure. Note each gap with the line it concerns.
- Restructure if needed. Use the skeleton in references/prompt-skeleton.md: role, context, scope, rules, tools, handover, format, examples. Keep facts that change (prices, stock, dates, policies) out of the prompt; fetch them with tools or retrieval.
- Resolve conflicts explicitly. For every contradiction, write which rule wins and when ("If the user asks for a refund above 100 EUR, do not process it; hand over"). Remove duplicate and vague rules; replace "be helpful" with observable behaviour.
- Propose the revised prompt as a diff, with one line per change explaining why. Do not change business rules on your own; list them as questions for the owner.
- Verify with evals. Re-run the eval set (
eval-harness) on the old and new prompt and compare pass rates and regressions before shipping.
Decision points
- Over budget (default ~2500 estimated tokens): move reference material to retrieval, examples to a few short ones, policy detail to tool results.
- Many ALWAYS/NEVER in capitals: usually a sign of patched incidents; consolidate into a short rules list with priorities.
- Rules the model keeps breaking: check if a tool or code can enforce it (e.g. confirmation before write actions) instead of adding more prompt text.
Output
prompt.txt: 1,940 words, ~2,610 tokens (budget 2,500)
[HIGH] possible conflicting rules about: refund, process
'Always process refunds the customer asks for.' vs 'Never process refunds above 100 EUR.'
[HIGH] no handover/escalation rule
[MEDIUM] hard-coded date: "Today is 2026-03-01"
[LOW] 4 vague phrases: as needed, be helpful, try to
Checklist gaps: no "I don't know" rule, no answer length guidance.
Proposed diff: 14 lines removed, 9 added (see below). Questions for owner: refund limit?Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

