validate-skill-tests
Use after creating or modifying a plugin skill to verify promptfoo test coverage. Checks dataset existence, fixture reference validity, new behavior coverage, and assertion quality.
- License 许可
- MIT
- 最近更新
- 2026-09-05
- Stars
- ★ 0
- Forks
- 6
01 前言 Front Matter
- name
- validate-skill-tests
- description
- Use after creating or modifying a plugin skill to verify promptfoo test coverage. Checks dataset existence, fixture reference validity, new behavior coverage, and assertion quality.
03 SKILL.md 正文
Validate Skill Tests
After creating a new plugin skill or modifying a skill's workflow or flags, run through this checklist to verify promptfoo test coverage is adequate.
When to Use
Invoke this skill when you have:
- Created a new skill under
plugins/sdlc-utilities/skills/ - Modified a skill's workflow steps or flags (argument-hint changed)
- Changed a skill's behavioral output (different format, new branches)
Step 1 — Identify Modified Skills
Check which skills were modified in the current changeset:
git diff --name-only HEAD | grep 'plugins/sdlc-utilities/skills/.*/SKILL.md'
Extract skill names from the paths.
Step 2 — Dataset Existence
For each modified skill, check whether a test dataset exists:
tests/promptfoo/datasets/<skill-name>.yaml
If the dataset does not exist, create one using tests/promptfoo/datasets/review-sdlc.yaml
as the canonical reference for structure and assertion patterns.
Each test case must include:
description— identifies skill and specific behavior (e.g.,"commit-sdlc: --auto flag skips confirmation")vars.skill_path— path to the SKILL.md being testedvars.project_context— path to a fixture file intests/promptfoo/fixtures/assert— array of assertions
Step 3 — Fixture Reference Validity
For each test case in the dataset, verify:
- Every
file://fixtures/<name>.mdreference points to an existing file undertests/promptfoo/fixtures/ - Every
file://fixtures-fs/<name>/reference points to an existing directory undertests/promptfoo/fixtures-fs/
Report any broken references.
Step 4 — New Behavior Coverage
If the skill gained a new flag (compare argument-hint in the SKILL.md before/after) or
a new workflow step:
- Check whether any existing test case exercises the new behavior
- If not, suggest adding a test case with:
- A descriptive name referencing the new flag/step
- A fixture that exercises the new code path
- Both structural and behavioral assertions
Step 5 — Assertion Quality
Review each test case's assertions for completeness:
| Required | Type | Purpose |
|---|---|---|
| At least 1 | icontains or regex |
Structural — verifies specific output strings |
| At least 1 | llm-rubric |
Behavioral — verifies semantic correctness |
Flag test cases that have only structural OR only behavioral assertions.
Well-written llm-rubric assertions are specific enough to distinguish pass from fail
(e.g., "The commit message follows conventional commits format and references the changed files"
not "The output looks correct").
Step 6 — Report Findings
Present findings in this format:
| Skill | Check | Status | Detail |
|---|---|---|---|
<name> |
Dataset exists | ✓/✗ | path or "missing" |
<name> |
Fixture refs valid | ✓/✗ | broken refs listed |
<name> |
New behavior covered | ✓/✗/N/A | uncovered flags/steps |
<name> |
Assertion quality | ✓/✗ | test cases with gaps |
DO NOT
- Run
promptfoo evalautomatically — evaluation runs must always be initiated by the user - Create test cases that test implementation details rather than observable behavior
- Write assertions that match on volatile output (timestamps, random IDs, file paths with user dirs)
04 同仓库更多 Skills
example-skill
Test fixture — passing case for script-resolution-version rule.
example-skill
Test fixture — failing case for script-resolution-version rule.
example-skill
Test fixture — passing case for the orchestrator-await-barrier rule (#487). Marks a fan-out dispatch as await-barrier-required and states the guard.
example-skill
Test fixture — failing case for the orchestrator-await-barrier rule (#487). Marks a fan-out dispatch as await-barrier-required but never states the guard.
pr-sdlc
Creates or updates GitHub pull requests with auto-generated 8-section descriptions.
example-skill
Fixture skill for validate-cost-tiers drift tests.