validate

Validates skill outputs against frozen expectations in a bounded PASS/FAILED retry loop.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/hanh-nd/agent-kit --skill validate-hanh-nd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: validate
Source: https://github.com/hanh-nd/agent-kit/tree/main/plugins/agent-kit/.gemini/skills/validate
Command: npx skills add https://github.com/hanh-nd/agent-kit --skill validate-hanh-nd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Artifacts produced by AI skills or external tools often ship with missing requirements, internal contradictions, or broken code, and self-review by the producing agent tends to rationalize flaws away. This Skill acts as an independent quality gate that runs any producer skill, validates its output against the original expectation, and loops until the artifact passes or the retry budget is exhausted. ## Core Features & Use Cases - Producer-Agnostic Validation Loop: Wraps any skill invocation (plan, code, brainstorm, delegate) by appending with /validate, running the producer end-to-end and validating its artifact with an isolated validator subagent. - Frozen Expectation Contract: Hashes the expectation source before the loop starts so acceptance criteria cannot drift mid-run; any change halts the run. - Bounded Retry with Verbatim Feedback: Feeds the validator's FAILED report back to the producer unchanged, up to a configurable budget (default 3 attempts), then reports PASS, FAILED, or PARTIAL. - Use Case: Run /code @plans/plan.md with /validate --budget=2 to have the code skill implement a plan, then automatically verify the implementation against the plan and retry once if blockers are found. ## Quick Start Append "with /validate" to any skill command, such as asking the agent to run /plan ticket YR-1234 with /validate, and it will produce the artifact and verify it against the ticket before reporting a final verdict.

Frequently Asked Questions about validate

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

FAQPage Schema
How do I validate the output of another AI skill automatically?▼

Append "with /validate" to any skill command, such as "/code @plans/plan.md with /validate". The validate skill runs the producer end-to-end, then spawns an isolated validator subagent that returns PASS or FAILED with blockers, looping until pass or budget exhaustion.

How do I validate an existing artifact against a specification?▼

Use standalone Mode B: run "/validate @artifact --against @expectation-or-text". This skips the producer run and emits a single verdict, which is useful when the artifact came from a previous session or an external tool that cannot be re-invoked.

Can the producer skill run in an isolated subagent during validation?▼

Yes, via the opt-in --isolate flag, but only for allowlisted non-interactive producers like code and delegate. Interactive producers must run in main context because subagents cannot handle user turn-taking; requesting isolation for them halts the run.

What happens when the validation retry budget runs out?▼

When attempts are exhausted (default budget of 3, overridable with --budget=N), the run ends with Status PARTIAL. The final report includes the artifact's last state plus the final validator's FAILED report verbatim so you can decide next steps.

Why does validation use a separate subagent instead of self-review?▼

The validator runs as a subagent with fresh context and no exposure to the producer's reasoning trace, because producers tend to rationalize away their own flaws. Verdicts are returned verbatim and PASS only exists when the validator literally returns PASS.

What are the limitations of the validate skill?▼

It requires a resolvable expectation (design brief, ticket, or --against source) and halts if none exists. It also halts if the expectation file changes mid-loop, if the producer halts before producing an artifact, or if the validator subagent fails twice.