jpskill.com
✍️ ライティング コミュニティ

prompt-tester

AIのプロンプトを体系的に評価し、改善を繰り返すことで、AI機能の構築や指示の最適化、プロンプトの比較、様々な状況下での出力品質評価などを効率的に行うSkill。

📜 元の英語説明(参考)

Design, test, and iterate on AI prompts systematically using structured evaluation criteria. Use when building AI features, optimizing agent instructions, comparing prompt variants, or evaluating output quality across edge cases. Trigger words: prompt engineering, prompt testing, eval, LLM evaluation, prompt comparison, A/B test prompts, prompt optimization, system prompt, instruction tuning.

🇯🇵 日本人クリエイター向け解説

一言でいうと

AIのプロンプトを体系的に評価し、改善を繰り返すことで、AI機能の構築や指示の最適化、プロンプトの比較、様々な状況下での出力品質評価などを効率的に行うSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o prompt-tester.zip https://jpskill.com/download/15296.zip && unzip -o prompt-tester.zip && rm prompt-tester.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15296.zip -OutFile "$d\prompt-tester.zip"; Expand-Archive "$d\prompt-tester.zip" -DestinationPath $d -Force; ri "$d\prompt-tester.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して prompt-tester.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → prompt-tester フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Prompt Tester

概要

プロンプトエンジニアリングに対する体系的なアプローチを構築します。テストケースを設計し、評価基準を定義し、エッジケースに対してプロンプトのバリエーションを実行し、結果を比較して、ユースケースに最適なプロンプトを見つけます。

手順

1. 評価基準を定義する

プロンプトをテストする前に、「良い」状態がどのようなものかを確立します。

## 評価基準: 顧客サポート分類器

| 基準          | 重み  | 説明                                   |
|---------------|--------|------------------------------------------|
| Accuracy      | 40%    | 正しいカテゴリが割り当てられている           |
| Consistency   | 25%    | 同じ入力 → 実行間で同じ出力               |
| Latency       | 15%    | 応答時間が閾値以下                       |
| Format        | 10%    | 出力が期待される JSON スキーマと一致する |
| Edge cases    | 10%    | あいまいな/異常な入力を処理する           |

2. テストケースを作成する

通常ケース、エッジケース、および敵対的な入力を網羅するテストスイートを構築します。

test_cases:
  - id: TC-001
    input: "注文した商品が届いていません。2週間経ちます"
    expected_category: "shipping_delay"
    expected_priority: "high"
    tags: [normal, shipping]

  - id: TC-002
    input: "あなたの製品が大好きです!あと、支払いに失敗しました"
    expected_category: "payment_issue"
    expected_priority: "high"
    tags: [mixed-intent, edge-case]

  - id: TC-003
    input: "asdf jkl; 12345"
    expected_category: "unclassifiable"
    expected_priority: "low"
    tags: [adversarial, garbage-input]

  - id: TC-004
    input: ""
    expected_category: "unclassifiable"
    expected_priority: "low"
    tags: [adversarial, empty-input]

3. プロンプトのバリエーションを設計する

比較するために 2〜3 個のプロンプトのバリエーションを作成します。

Variant A (簡潔):

このサポートチケットを、billing、shipping_delay、
product_defect、account_access、feature_request、unclassifiable のいずれかのカテゴリに分類してください。
JSON を返します: {"category": "...", "priority": "high|medium|low"}

Variant B (詳細、例付き):

あなたはサポートチケット分類器です。顧客のメッセージを分析し、
カテゴリと優先度レベルを 1 つだけ割り当てます。

カテゴリ: billing, shipping_delay, product_defect, account_access,
feature_request, unclassifiable

ルール:
- メッセージに複数の問題が含まれている場合は、最も緊急性の高いもので分類します
- メッセージが意味不明または空の場合は、"unclassifiable" を使用します
- 優先度は、支払い/配送の問題の場合は "high"、製品の問題の場合は "medium"、
  機能リクエストの場合は "low" です

例:
Input: "サブスクリプションで二重に請求されました"
Output: {"category": "billing", "priority": "high"}

Input: "ダークモードがあるといいですね"
Output: {"category": "feature_request", "priority": "low"}

では、このメッセージを分類してください:

4. 評価を実行する

各プロンプトのバリエーションをすべてのテストケースに対して実行し、スコアリングします。

## 評価結果

| メトリクス     | Variant A | Variant B |
|--------------|-----------|-----------|
| Accuracy     | 72%       | 91%       |
| Consistency  | 85%       | 94%       |
| Format match | 100%      | 100%      |
| Edge cases   | 40%       | 80%       |
| Avg tokens   | 12        | 18        |

### 詳細な結果

| テストケース | Variant A           | Variant B           | Expected            |
|-----------|---------------------|---------------------|---------------------|
| TC-001    | ✅ shipping_delay   | ✅ shipping_delay   | shipping_delay      |
| TC-002    | ❌ general_inquiry  | ✅ payment_issue    | payment_issue       |
| TC-003    | ❌ feature_request  | ✅ unclassifiable   | unclassifiable      |
| TC-004    | ❌ (error)          | ✅ unclassifiable   | unclassifiable      |

勝者: Variant B (精度 +19%、エッジケース処理 +40%)
トレードオフ: リクエストあたり ~50% 多くのトークン

5. 反復して改良する

失敗に基づいて、勝利したバリアントを改善します。

  • どのテストケースが失敗したか、その理由を分析します
  • 失敗パターンに対する特定のルールを追加します
  • 修正を検証するために、失敗したケースのみを再実行します
  • テスト結果とともに最終的なプロンプトを文書化します

例 1: 要約プロンプト

Input: 「会議のトランスクリプトをアクションアイテムに要約するプロンプトが必要です。テストを手伝ってください。」

Output:

## テストスイート: 会議サマリープロンプト

作成されたテストケース: 8
- 3 つの通常の会議 (スタンドアップ、計画、振り返り)
- 2 つのエッジケース (アクションアイテムのない会議、すべてチャットの会議)
- 2 つの長いトランスクリプト (>5000 語)
- 1 つの敵対的 (混合言語のトランスクリプト)

ルーブリック:
- アクションアイテムの抽出: 40% (すべてのアクションアイテムを見つけましたか?)
- オーナーの割り当て: 25% (各アイテムのオーナーを特定しましたか?)
- 簡潔さ: 20% (サマリーは 200 語未満ですか?)
- ハルシネーションなし: 15% (発明されたアクションアイテムはありませんか?)

3 つのバリアントを実行中... 結果の準備ができました。

例 2: コードレビュープロンプト

Input: 「AI コードレビューア用のこれら 2 つのシステムプロンプトを比較してください」

Output:

## 比較: コードレビュープロンプト

テストケース: 6 つのコードスニペット (SQL インジェクション、競合状態、クリーンなコード、
             スタイルのみの問題、空のファイル、500 行のファイル)

| メトリクス              | Prompt A | Prompt B |
|---------------------|----------|----------|
| バグ検出       | 4/6      | 6/6      |
| 偽陽性     | 3        | 1        |
| 実行可能なフィードバック | 60%      | 90%      |
| 大規模ファイルを処理 | ❌       | ✅       |

Prompt B の方が優れています: 偽陽性が少なく、すべてのバグをキャッチし、
エッジケースを処理します。主な改善点: 明示的な重大度レベル
および「確信できる問題のみを報告する」という指示。

ガイドライン

  • 常にテストの前に評価基準を定義してください — 事後的な合理化を防ぎます
  • 少なくとも 8〜10 個のケースをテストします: 50% 通常、30% エッジケース、20% 敵対的
  • 各バリアントを 3 回実行して、一貫性を確認します (LLM は非決定的です)
  • 品質とともにトークンの使用量を追跡します — スケールに応じてコストが重要になります
  • プロンプトの変更履歴を保持します: バージョン、日付、変更、テスト結果
  • 勝利したプロンプトが常に最長であるとは限りません — 簡潔なプロンプトが優れたパフォーマンスを発揮することもあります
  • 失敗モードを文書化します: プロンプトがいつ壊れるかを知ることは、それと同じくらい価値があります

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Prompt Tester

Overview

Build a systematic approach to prompt engineering. Design test cases, define evaluation rubrics, run prompt variants against edge cases, and compare results to find the best-performing prompt for your use case.

Instructions

1. Define the evaluation criteria

Before testing prompts, establish what "good" looks like:

## Evaluation Rubric: Customer Support Classifier

| Criterion     | Weight | Description                              |
|---------------|--------|------------------------------------------|
| Accuracy      | 40%    | Correct category assigned                |
| Consistency   | 25%    | Same input → same output across runs     |
| Latency       | 15%    | Response time under threshold            |
| Format        | 10%    | Output matches expected JSON schema      |
| Edge cases    | 10%    | Handles ambiguous/unusual inputs         |

2. Create test cases

Build a test suite covering normal cases, edge cases, and adversarial inputs:

test_cases:
  - id: TC-001
    input: "My order hasn't arrived and it's been 2 weeks"
    expected_category: "shipping_delay"
    expected_priority: "high"
    tags: [normal, shipping]

  - id: TC-002
    input: "I love your product! Also my payment failed"
    expected_category: "payment_issue"
    expected_priority: "high"
    tags: [mixed-intent, edge-case]

  - id: TC-003
    input: "asdf jkl; 12345"
    expected_category: "unclassifiable"
    expected_priority: "low"
    tags: [adversarial, garbage-input]

  - id: TC-004
    input: ""
    expected_category: "unclassifiable"
    expected_priority: "low"
    tags: [adversarial, empty-input]

3. Design prompt variants

Create 2-3 prompt variants to compare:

Variant A (Concise):

Classify this support ticket into one category: billing, shipping_delay,
product_defect, account_access, feature_request, unclassifiable.
Return JSON: {"category": "...", "priority": "high|medium|low"}

Variant B (Detailed with examples):

You are a support ticket classifier. Analyze the customer message and
assign exactly one category and priority level.

Categories: billing, shipping_delay, product_defect, account_access,
feature_request, unclassifiable

Rules:
- If the message contains multiple issues, classify by the most urgent
- If the message is gibberish or empty, use "unclassifiable"
- Priority is "high" for payment/shipping issues, "medium" for product
  issues, "low" for feature requests

Examples:
Input: "I was charged twice for my subscription"
Output: {"category": "billing", "priority": "high"}

Input: "It would be nice to have dark mode"
Output: {"category": "feature_request", "priority": "low"}

Now classify this message:

4. Run the evaluation

Execute each prompt variant against all test cases and score:

## Evaluation Results

| Metric       | Variant A | Variant B |
|--------------|-----------|-----------|
| Accuracy     | 72%       | 91%       |
| Consistency  | 85%       | 94%       |
| Format match | 100%      | 100%      |
| Edge cases   | 40%       | 80%       |
| Avg tokens   | 12        | 18        |

### Detailed Results

| Test Case | Variant A           | Variant B           | Expected            |
|-----------|---------------------|---------------------|---------------------|
| TC-001    | ✅ shipping_delay   | ✅ shipping_delay   | shipping_delay      |
| TC-002    | ❌ general_inquiry  | ✅ payment_issue    | payment_issue       |
| TC-003    | ❌ feature_request  | ✅ unclassifiable   | unclassifiable      |
| TC-004    | ❌ (error)          | ✅ unclassifiable   | unclassifiable      |

Winner: Variant B (+19% accuracy, +40% edge case handling)
Tradeoff: ~50% more tokens per request

5. Iterate and refine

Based on failures, improve the winning variant:

  • Analyze which test cases failed and why
  • Add specific rules for failure patterns
  • Rerun only the failed cases to verify fixes
  • Document the final prompt with its test results

Examples

Example 1: Summarization Prompt

Input: "I need a prompt that summarizes meeting transcripts into action items. Help me test it."

Output:

## Test Suite: Meeting Summary Prompt

Test cases created: 8
- 3 normal meetings (standup, planning, retrospective)
- 2 edge cases (meeting with no action items, all-chat meeting)
- 2 long transcripts (>5000 words)
- 1 adversarial (transcript in mixed languages)

Rubric:
- Action item extraction: 40% (did it find all action items?)
- Owner assignment: 25% (did it identify who owns each item?)
- Brevity: 20% (summary under 200 words?)
- No hallucination: 15% (no invented action items?)

Running 3 variants... Results ready.

Example 2: Code Review Prompt

Input: "Compare these two system prompts for our AI code reviewer"

Output:

## Comparison: Code Review Prompts

Test cases: 6 code snippets (SQL injection, race condition, clean code,
             style-only issues, empty file, 500-line file)

| Metric              | Prompt A | Prompt B |
|---------------------|----------|----------|
| Bug detection       | 4/6      | 6/6      |
| False positives     | 3        | 1        |
| Actionable feedback | 60%      | 90%      |
| Handles large files | ❌       | ✅       |

Prompt B is better: fewer false positives, catches all bugs,
and handles edge cases. Main improvement: explicit severity levels
and "only report issues you are confident about" instruction.

Guidelines

  • Always define evaluation criteria BEFORE testing — prevents post-hoc rationalization
  • Test at least 8-10 cases: 50% normal, 30% edge cases, 20% adversarial
  • Run each variant 3 times to check consistency (LLMs are non-deterministic)
  • Track token usage alongside quality — cost matters at scale
  • Keep a prompt changelog: version, date, changes, test results
  • The winning prompt isn't always the longest — sometimes concise prompts outperform
  • Document failure modes: knowing when a prompt breaks is as valuable as knowing when it works
  • For production prompts, add regression tests and rerun when updating the model version