CommandOpen

test-prompt

Test an AI prompt against multiple scenarios to verify consistent, quality output.

Front matter
name: test-prompt
description: Test an AI prompt against multiple scenarios to verify consistent, quality output.

Test an AI prompt against multiple scenarios to verify consistent, quality output.

Steps

  1. Read the prompt to test (command file, CLAUDE.md rule, or inline prompt).
  2. Generate test scenarios:
  • Happy path: Standard use case with typical input.
  • Edge case: Empty input, very large input, unusual formats.
  • Ambiguous case: Input that could be interpreted multiple ways.
  • Error case: Invalid input that should produce helpful error messages.
  1. For each scenario:
  • Formulate the test input.
  • Execute the prompt with that input.
  • Evaluate the output against expected behavior.
  • Score on: accuracy, format compliance, helpfulness.
  1. Identify failure patterns:
  • Does the prompt break on certain input types?
  • Does it produce inconsistent output formats?
  • Does it hallucinate when information is missing?
  1. Suggest prompt modifications based on test results.

Format

Prompt Test Results: <prompt name>

| Scenario | Input | Result | Score |
|----------|-------|--------|-------|
| Happy path | <input> | pass | 5/5 |
| Edge case | <input> | partial | 3/5 |
| Error case | <input> | fail | 1/5 |

Overall score: <average>/5
Failure patterns: <description>
Recommendations: <improvements>

Rules

  • Test at least 5 scenarios for each prompt.
  • Include at least one adversarial input that tries to break the prompt.
  • Score consistently using the same rubric across all tests.
  • Document the exact input used so tests can be reproduced.
  • Suggest specific prompt changes for each failure, not just "improve X".

Source: https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/plugins/ai-prompt-lab/commands/test-prompt.md

Author: rohitg00, Claude Code toolkit (rohitg00). License: Apache-2.0.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.