agentleFS
tolomtolom/prompt-xray-skills/skills/02-prompt-auditor/SKILL.md

prompt-auditor

Skill1 starsChanged 5 months agoMITView on GitHub

Audit LLM prompts for ambiguity, missing context, instruction conflicts, hallucination risk, weak output contracts, and poor testability. Use this skill when the user provides a prompt and asks to improve, debug, harden, evaluate, or make it production-ready.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to audit an existing LLM prompt and identify why it may fail.

    line 10
  2. Distinctive:

    Use this skill when the user asks to:

    line 18
  3. Distinctive:

    Do not stop if some information is missing.

    line 38
  4. Distinctive:

    Ask for or infer when available:

    line 42
  5. Distinctive:

    If the intended behavior is unclear, mark this as a major issue.

    line 84
  6. Distinctive:

    Look for vague or overloaded words such as:

    line 88
  7. Distinctive:

    Check whether the prompt defines:

    line 107
  8. Distinctive:

    Look for conflicts between:

    line 126
  9. Distinctive:

    If the output must be used by software, recommend structured output.

    line 169
  10. Distinctive:

    Check whether it is possible to create:

    line 175
  11. Distinctive:

    If not, explain what is missing.

    line 184
  12. Distinctive:

    do not invent business details.

    line 294
  13. Distinctive:

    prefer concrete rules over vague adjectives.

    line 298
  14. Distinctive:

    keep the prompt reusable;

    line 299

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Auditor Skill

Purpose

Use this skill to audit an existing LLM prompt and identify why it may fail.

The goal is not only to rewrite the prompt.

The goal is to make the prompt clearer, safer, more testable, more reusable, and more reliable across repeated use.

When to use

Use this skill when the user asks to:

  • improve a prompt;
  • audit a prompt;
  • debug poor model output;
  • reduce hallucinations;
  • make a prompt more reliable;
  • make a prompt production-ready;
  • adapt a prompt for an assistant, agent, RAG system, workflow, or API;
  • evaluate whether a prompt is clear enough for repeated use.

Required input

The user should provide at least one of:

  • an existing prompt;
  • a rough instruction;
  • a bad model output;
  • a description of the task the prompt should perform.

Do not stop if some information is missing. Continue the audit and mark assumptions clearly.

Preferred input

Ask for or infer when available:

  1. Intended use case.
  2. Target model or platform.
  3. Expected input data.
  4. Desired output format.
  5. Examples of good outputs.
  6. Examples of bad outputs.
  7. Known failure cases.
  8. Business or product constraints.
  9. Whether the prompt is for chat, API, RAG, extraction, coding, sales, support, or an autonomous agent.

Audit procedure

1. Classify the prompt

Identify the prompt type:

  • one-shot prompt;
  • reusable workflow prompt;
  • system prompt;
  • developer instruction;
  • agent instruction;
  • coding-agent rules;
  • RAG answer policy;
  • extraction prompt;
  • classification prompt;
  • content-generation prompt;
  • sales/support assistant prompt;
  • product-spec generation prompt.

2. Identify the intended behavior

Extract the intended behavior in plain language:

  • What should the model do?
  • For whom?
  • Using what input?
  • Under what constraints?
  • What should the output look like?
  • What should happen if information is missing?

If the intended behavior is unclear, mark this as a major issue.

3. Check ambiguity

Look for vague or overloaded words such as:

  • improve;
  • analyze;
  • optimize;
  • make better;
  • professional;
  • detailed;
  • short;
  • creative;
  • high quality;
  • modern;
  • useful;
  • relevant.

For each ambiguous phrase, explain what the model may interpret incorrectly.

4. Check missing context

Check whether the prompt defines:

  • goal;
  • audience;
  • user role;
  • model role;
  • business context;
  • input data;
  • source of truth;
  • constraints;
  • forbidden actions;
  • desired output;
  • edge cases;
  • uncertainty behavior;
  • escalation behavior;
  • examples.

5. Check instruction conflicts

Look for conflicts between:

  • short and detailed;
  • creative and strict;
  • autonomous and safe;
  • friendly and formal;
  • generic and personalized;
  • JSON output and prose explanation;
  • source-grounded answering and external knowledge;
  • speed and deep reasoning;
  • broad task scope and narrow output format.

6. Check hallucination risk

Flag any part where the model may invent:

  • facts;
  • prices;
  • sources;
  • customer data;
  • technical capabilities;
  • implementation details;
  • legal, medical, financial, or policy-sensitive claims;
  • user preferences;
  • company information;
  • product features.

For each risk, define what the model should do instead.

7. Check output contract

Evaluate whether the prompt defines:

  • required sections;
  • section order;
  • length limits;
  • formatting rules;
  • JSON/schema requirements;
  • citation rules;
  • examples;
  • acceptance criteria;
  • final checklist.

If the output must be used by software, recommend structured output.

8. Check testability

A production prompt should be testable.

Check whether it is possible to create:

  • normal case;
  • edge case;
  • missing-context case;
  • ambiguous-input case;
  • conflicting-instruction case;
  • bad-input case.

If not, explain what is missing.

Scoring

Score the prompt from 0 to 10 on:

  • Clarity
  • Context completeness
  • Constraint quality
  • Output contract
  • Hallucination resistance
  • Testability
  • Reusability

Then give one verdict:

  • Production-ready
  • Good but needs tightening
  • Risky
  • Too vague to reuse

Output format

Return the audit in this structure:

# Prompt Audit Report

## Verdict

- Overall verdict:
- Total score:
- One-sentence summary:

## Prompt Type

- Type:
- Intended use:
- Target output:

## Main Problems

### 1. Problem name

- Severity:
- Evidence:
- Why it matters:
- Fix:

## Missing Information

- [ ] Missing item
- [ ] Missing item
- [ ] Missing item

## Hallucination Risks

| Risk | Why it may happen | How to reduce it |
|---|---|---|

## Instruction Conflicts

| Conflict | Impact | Resolution |
|---|---|---|

## Improved Prompt

```text
<rewritten prompt>

Test Cases

Normal case

Input: Expected behavior:

Edge case

Input: Expected behavior:

Missing-context case

Input: Expected behavior:

Bad-input case

Input: Expected behavior:

Final Checklist

  • Goal is explicit
  • Context is sufficient
  • Role is clear
  • Constraints are concrete
  • Output format is defined
  • Missing-information behavior is defined
  • Hallucination risks are reduced
  • Prompt can be tested

## Rewrite rules

When rewriting:

- preserve the user's original intent;
- do not invent business details;
- clearly mark assumptions;
- separate role, task, context, constraints, and output format;
- define behavior when data is missing;
- prefer concrete rules over vague adjectives;
- keep the prompt reusable;
- make it easy to test repeatedly.

## Boundaries

This skill improves prompt reliability. It does not guarantee factual correctness, legal compliance, safety compliance, or identical behavior across all models.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.