plugins/utils/skills/build-prompt-evals/SKILL.md
Builds eval assertions and minimal test prompt from prompt text, then optimizes assertions via specialist agent.
npx skillsauth add rp1-run/rp1 build-prompt-evalsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate eval assertions (YAML) and test invocation prompt from source prompt. Extracts assertions, then runs assertion specialist to resolve placeholders, consolidate scenarios, and document unresolved assertions.
File Mode (when INPUT is a valid file path):
Inline Mode (when INPUT is prompt text):
Check for --output flag in arguments:
Check if first non-flag argument is a file path:
Use Bash: test -f "{INPUT}" && echo "file" || echo "inline"
If file mode:
Spawn dependency-chain-analyzer to discover sub-agent and skill dependencies:
{% dispatch_agent "rp1-utils:dependency-chain-analyzer" %} FILE_PATH: {INPUT file path} {% enddispatch_agent %}
Capture JSON output as DEPENDENCY_CHAIN variable.
If inline mode:
Set DEPENDENCY_CHAIN to empty string (no file to analyze for dependencies).
If file mode:
If inline mode:
OUTPUT_YAML = {OUTPUT_DIR}/{basename}-evals.yaml
OUTPUT_PROMPT = {OUTPUT_DIR}/{basename}-eval-prompt.txt
Single agent generates both YAML assertions and test prompt:
{% dispatch_agent "rp1-utils:prompt-eval-extractor" %} PROMPT_TEXT: {PROMPT_TEXT content} SOURCE_NAME: {SOURCE_NAME} OUTPUT_FILE: {OUTPUT_YAML} DEPENDENCY_CHAIN: {DEPENDENCY_CHAIN JSON or empty string} OUTPUT_PROMPT: {OUTPUT_PROMPT} {% enddispatch_agent %}
Log extraction completion:
Extraction complete. Running assertion optimization...
Invoke assertion specialist to optimize the generated eval config:
{% dispatch_agent "rp1-utils:prompt-assertion-specialist" %} CONFIG_PATH: {OUTPUT_YAML} {% enddispatch_agent %}
Capture JSON output as ASSERTION_RESULT variable.
Display output locations and optimization summary:
Eval files generated:
Assertions: {OUTPUT_YAML}
Test prompt: {OUTPUT_PROMPT}
Assertion optimization:
Resolved: {ASSERTION_RESULT.resolved_count} ({ASSERTION_RESULT.resolved_builtin} built-in, {ASSERTION_RESULT.resolved_shared} shared)
Unresolved: {ASSERTION_RESULT.unresolved_count}
Consolidated scenarios: {ASSERTION_RESULT.consolidated_scenarios}
{If ASSERTION_RESULT.unresolved_count > 0:}
See: {ASSERTION_RESULT.output_files[1]} for assertions requiring implementation.
Review the assertions file for any remaining TODO placeholders.
Empty input (INPUT not provided):
Usage: /build-prompt-evals <file-or-prompt> [--output <dir>]
<file-or-prompt> Path to command/agent prompt file OR raw prompt text
[--output <dir>] Optional output directory (default: input file dir or cwd)
Outputs:
{basename}-evals.yaml Eval assertions in promptfoo format
{basename}-eval-prompt.txt Test invocation prompt (user input to test the command)
Examples:
/build-prompt-evals plugins/dev/skills/build-fast/SKILL.md
/build-prompt-evals plugins/dev/skills/build-fast/SKILL.md --output evals/suites/rp1-dev/
/build-prompt-evals "Create a branch and commit changes"
Invalid file path (file mode detected but read fails):
Error: Could not read file: {path}
Output directory does not exist:
Error: Output directory does not exist: {path}
File mode with auto output location:
/build-prompt-evals plugins/dev/skills/build-fast/SKILL.md
Creates in same directory:
plugins/dev/skills/build-fast/build-fast-evals.yamlplugins/dev/skills/build-fast/build-fast-eval-prompt.txtFile mode with explicit output directory:
/build-prompt-evals plugins/dev/skills/build-fast/SKILL.md --output evals/suites/rp1-dev/
Creates in specified directory:
evals/suites/rp1-dev/build-fast-evals.yamlevals/suites/rp1-dev/build-fast-eval-prompt.txtInline mode:
/build-prompt-evals "Create a new branch, make changes, then commit"
Creates in current directory:
extracted-evals.yamlextracted-eval-prompt.txtdata-ai
Capture session context as a structured, frontmatter-rich markdown note under .rp1/work/notes/ with auto-maintained index and log.
tools
Plan and execute splitting a large PR or branch into a reviewable stacked PR sequence.
development
Write maximally terse agent prompts from scratch. Use when creating new agent specs, command prompts, or instruction sets. Teaches structure-first composition with compression-by-default patterns. Extended with constitutional governance, epistemic stance selection, and a six-stage prompt pipeline.
development
Interactive speedrun loop for small, low-risk changes. Delegates each request to a general sub-agent. Redirects larger work to /build-fast or /build.