test-prompt

Tests prompts using subagents with a RED-GREEN-REFACTOR cycle before deployment.

1.5k|154|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/NeoLabHQ/context-engineering-kit --skill test-prompt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-prompt
Source: https://github.com/NeoLabHQ/context-engineering-kit/tree/main/plugins/customaize-agent/skills/test-prompt
Command: npx skills add https://github.com/NeoLabHQ/context-engineering-kit --skill test-prompt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prompts for commands, hooks, skills, and subagent instructions are often deployed untested, so nobody knows whether they actually change agent behavior or which failures they need to fix. This Skill applies test-driven development to prompt engineering so every prompt is validated against real agent behavior before release.

Core Features & Use Cases

  • Baseline (RED) Testing: Run scenarios without the prompt using isolated subagents to document exactly how agents fail, including verbatim rationalizations.
  • Prompt Authoring (GREEN): Write minimal prompts that address only the documented baseline failures, with guidance per prompt type (instruction, discipline-enforcing, guidance, reference, subagent).
  • Optimization (REFACTOR): Close loopholes, improve clarity via meta-testing, and reduce token usage while re-verifying behavior with fresh subagents.
  • Use Case: Before shipping a new /git:commit command, run baseline scenarios to watch an agent commit broken files under time pressure, write the command to counter those failures, then stress-test it until it resists rationalization.

Quick Start

Ask the agent to test your new prompt with the test-prompt skill by running baseline scenarios in subagents before finalizing it.

Frequently Asked Questions about test-prompt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a prompt before deploying it?

Run test scenarios without the prompt using a fresh subagent to document baseline failures, write the prompt to fix those specific failures, then re-run the same scenarios with the prompt to verify the agent now behaves correctly.

How to test prompts with subagents in Claude Code?

Use the Task tool to launch a general-purpose subagent with only the test scenario, excluding the prompt for baseline runs and including it for verification runs. Subagents provide a clean slate with no conversation history, making results reproducible.

What is RED-GREEN-REFACTOR for prompt engineering?

It is TDD applied to prompts: RED runs scenarios without the prompt to observe failures, GREEN writes a minimal prompt fixing those failures, and REFACTOR closes loopholes and reduces tokens while re-verifying behavior still passes.

Why should prompt testing use fresh subagents instead of the current conversation?

Accumulated conversation history biases agent behavior, so you cannot isolate the prompt's effect. Fresh subagents guarantee identical starting conditions, enabling reproducible A/B comparisons and regression testing.

When should I not write prompt content during testing?

Do not add content for hypothetical issues you never observed in baseline testing. Over-engineered prompts waste tokens; only address failures actually documented during the RED phase.