Prompt Testing logo

Prompt Testing

Community
joe-qai
prompt-testing

Use this skill when you need to generate concrete test cases for LLM prompt quality, including instruction following, format, factual accuracy, edge cases, and regression; triggers include Prompt 测试, prompt测试, 提示词测试, and prompt testing.

Overview

Publisherjoe-qai
Repositoryqa-skills
Skill nameprompt-testing
Stars
30
Forks
4
Bundled files
6
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by joe-qai on GitHub. Read the source before you install it.

Installation

Install the Prompt Testing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/joe-qai/qa-skills/tree/main/prompt-testing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/joe-qai/qa-skills.git /tmp/qa-skills
mkdir -p .claude/skills
cp -r /tmp/qa-skills/prompt-testing .claude/skills/prompt-testing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prompt Testing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prompt Testing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prompt Testing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

提示词测试

何时使用

  • 用户提供 Prompt 文本和模型参数,需要生成可执行的测试用例集。
  • 需要验证 Prompt 在不同输入下的正确性、稳定性和边界行为。

输入要求

必填字段说明
✅Prompt 文本待测试的完整 Prompt
✅模型信息模型名称、版本(如 gpt-4o、claude-sonnet)
⬜期望行为Prompt 应产生的输出格式、内容、风格
⬜输入分布典型用户输入样本
⬜历史失败已知的问题场景或回归用例

执行流程

1. 输入审计

  • 检查 Prompt 是否完整(有角色、指令、输出格式)
  • 检查模型参数是否明确
  • 缺失信息标记为「假设」

2. 行为契约建立

为被测 Prompt 定义行为契约:

维度测试内容优先级
指令遵循按 Prompt 要求执行任务P0
输出格式JSON/Markdown/纯文本等格式正确P0
事实性不编造信息、引用准确P0
边界输入空输入、超长输入、特殊字符P1
对抗输入注入尝试、角色混淆、指令覆盖P1
多语言中英文切换、混合语言P2
稳定性相同输入多次运行结果一致P1
回归修复过的问题不再复现P0

3. 测试用例生成

为每个维度生成具体测试用例,格式:

markdown
## [P0] TC-<维度>-<序号>: <用例标题>
[测试维度] 指令遵循
[模型] gpt-4o
[Prompt] <完整 Prompt 文本>
[输入] <具体的用户输入>
[预期输出] <输出的判定标准:格式、内容、长度>
[评估方式] 精确匹配 / 包含匹配 / 语义匹配(rubric)
[通过标准] <具体的通过条件>

4. 用例校验

生成后必须执行以下校验:

  • 每个行为维度至少有 2 条用例(正向 + 边界/异常)
  • 每条用例有完整的 Prompt + 输入 + 预期输出
  • 评估方式明确(精确/包含/语义 rubric,非模糊描述)
  • 对抗用例至少覆盖 1 种注入场景
  • 回归用例覆盖已知失败场景(如有)
  • 固定模型参数(temperature=0 等)以确保可复现

5. 输出交付物

文件内容
test-cases.md完整测试用例集(含维度矩阵、用例、评估方式)
eval-script.py可执行的评估脚本(调用 API 批量测试 + 结果判定)

eval-script.py 输出:

维度          用例数  通过  失败  通过率
指令遵循       5     4    1    80%
输出格式       3     3    0    100%
事实性         4     3    1    75%
边界输入       3     2    1    67%
...
总计          25    20    5    80%

核心约束

  • 输出必须是可逐条执行的测试用例,不是笼统的检查清单。
  • 对语义结果使用 rubric 评分,不使用脆弱的逐字匹配。
  • 固定模型与参数,确保可复现。
  • 每次至少运行 3 次取众数,不以单次结果下结论。

参考文件

  • prompts/prompt-testing.md:详细执行规范。
  • evals/eval.yaml + evals/cases/:评估用例模板。

常见误区

  • 只测一个样例 → 需要多维度、多输入覆盖。
  • 用"看起来对"做判断 → 需要具体 rubric 和通过标准。
  • 跳过对抗测试 → 注入和边界是必须覆盖的维度。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Prompt Testing AI skill do?

Use this skill when you need to generate concrete test cases for LLM prompt quality, including instruction following, format, factual accuracy, edge cases, and regression; triggers include Prompt 测试, prompt测试, 提示词测试, and prompt testing.

Why use Prompt Testing on TypingMind?

Because you install it once and use it with any model. Prompt Testing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prompt Testing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/joe-qai/qa-skills/tree/main/prompt-testing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Prompt Testing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prompt Testing?

As many as you like. As long as a model supports skills, you can use Prompt Testing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prompt Testing AI skill free?

It is published on GitHub by joe-qai. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇