validator-workflow
Phase-level validation workflow for validator agents. Handles loading project rules, reading phase files, running /code-review, conditional verification (unit tests + typecheck + E2E/DB tests based on phase type), determining verdict, and reporting to the orchestrator. Invoke this skill as your first action — not user-invocable.
Best use case
validator-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Phase-level validation workflow for validator agents. Handles loading project rules, reading phase files, running /code-review, conditional verification (unit tests + typecheck + E2E/DB tests based on phase type), determining verdict, and reporting to the orchestrator. Invoke this skill as your first action — not user-invocable.
Teams using validator-workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/validator-workflow/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How validator-workflow Compares
| Feature / Agent | validator-workflow | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Phase-level validation workflow for validator agents. Handles loading project rules, reading phase files, running /code-review, conditional verification (unit tests + typecheck + E2E/DB tests based on phase type), determining verdict, and reporting to the orchestrator. Invoke this skill as your first action — not user-invocable.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Validator Phase Workflow
You have been assigned a **phase to validate** after a builder reports completion. Your spawn prompt contains the phase file path and plan folder. This skill teaches you how to handle validation end-to-end.
## Why This Workflow Exists
The user experienced validators that ran shallow checks, missed pattern deviations, and didn't catch issues introduced by auto-fixes. Each step below prevents a specific failure:
| Step | Prevents |
|------|----------|
| Load project rules | Reviewing without knowing coding conventions (teammates don't inherit parent rules) |
| Read phase completely | Reviewing against wrong acceptance criteria |
| Run /code-review | Self-review blind spots — builder never reviews its own code |
| Conditional verification | Frontend bugs missed without E2E, DB bugs missed without PgTAP |
| Actionable FAIL reports | Fix builders guessing at what's broken, producing more failures |
## Step 0: Load Project Rules
Teammates don't inherit all parent rules — only `alwaysApply` rules load natively. File-scoped rules (coding conventions, patterns) must be read explicitly.
Read these two files (they contain universal conventions for all code):
```
Read ~/.claude/rules/coding-style.md
Read ~/.claude/rules/patterns.md
```
If either file doesn't exist, skip it — the project may not have those rules configured.
These rules inform what you flag during review — import ordering, error handling, service patterns, data fetching conventions.
## Step 1: Read the Phase
Read the phase file from your spawn prompt. Extract:
- **`skill:` field** from frontmatter — determines which extra tests to run (Step 3)
- **Acceptance criteria** — your success metrics for the verdict
- **Implementation steps** — what was supposed to be built
- **Files created/modified** — scope of your review
## Step 2: Run Code Review
Invoke the code review skill against the phase:
```
Skill({ skill: "code-review", args: "[phase-file-path]" })
```
This forks a sub-agent that:
- Reads the phase document and extracts all implementation steps
- Finds reference implementations from the codebase (ground truth)
- Reviews each file against phase spec AND codebase patterns
- Auto-fixes Critical/High/Medium issues directly in source files
- Writes a review file to `{plan-folder}/reviews/code/phase-{NN}.md`
- Returns a verdict with issue counts and what was fixed
## Step 3: Run Verification
**Skip verification entirely** if the code review verdict is "Ready" with zero auto-fixes — the builder already passed tests + typecheck before reporting, and no source files changed since.
**Run verification** if the code review auto-fixed any issues (files were modified):
### Always Run
```bash
pnpm run typecheck
pnpm test
```
Both must pass. If auto-fixes introduced issues, fix them.
### Conditional Testing by Phase Type
The phase's `skill:` frontmatter field determines which additional tests to run:
| Phase Skill | Extra Test | Command |
|-------------|-----------|---------|
| `react-form-builder` | E2E tests | `pnpm test:e2e` (scoped) |
| `vercel-react-best-practices` | E2E tests | `pnpm test:e2e` (scoped) |
| `web-design-guidelines` | E2E tests | `pnpm test:e2e` (scoped) |
| `playwright-e2e` | E2E tests | `pnpm test:e2e` (scoped) |
| `postgres-expert` | DB tests | `pnpm test:db` |
| `server-action-builder` | Unit tests sufficient | — |
| `service-builder` | Unit tests sufficient | — |
### E2E Test Scoping
When running E2E tests, scope them to the feature being validated:
1. Extract keywords from the phase title/slug (e.g., `notes`, `billing`, `auth`)
2. Glob for `e2e/**/*{keyword}*.spec.ts`
3. If matches found: `pnpm test:e2e -- [matched spec files]`
4. If no matches: `pnpm test:e2e` (full suite)
### Graceful Skip
If a test command doesn't exist (exit code from missing script), skip it and note in the report:
```
E2E tests: skipped (pnpm test:e2e not configured)
```
This allows projects without E2E or DB tests to pass validation without false failures.
## Step 4: Determine Verdict
Based on the code review results and verification (if it ran):
- **PASS**: Code review verdict is "Ready", no unfixed Critical/High issues, and all verification passed (or was skipped because no files changed)
- **FAIL**: Any unfixed Critical/High issues, or (if verification ran) typecheck errors, test failures, E2E failures, or DB test failures
## Step 5: Report to Orchestrator
```
SendMessage({
type: "message",
recipient: "team-lead",
content: "Phase [NN] validation: [PASS|FAIL]\n\nCode review: [verdict]\nReview file: [path]\nVerification: [pass|skipped (no changes)]\nE2E tests: [pass|fail|skipped|N/A]\nDB tests: [pass|fail|skipped|N/A]\n\n[If FAIL: specific issues with file:line references and exact fixes needed]",
summary: "Phase NN: PASS|FAIL"
})
```
## Step 6: Go Idle
Wait for the next validation assignment or a shutdown request.
## FAIL Reports Must Be Actionable
When reporting FAIL, include enough detail for a fresh builder to fix the issues without guessing:
- **File:line references** for each issue
- **Which pattern was violated** (cite the reference file)
- **Exact fix needed** (not "consider improving" — state what must change)
- **Which test failed** (test name, assertion, expected vs actual)
Vague FAIL reports cause fix builders to guess, producing more failures. Specific reports enable one-shot fixes.
IMPORTANT: Before using the Write tool on any existing file, you MUST Read it first or the write will silently fail. Prefer Edit for modifying existing files.
## Resuming After Context Compact
If your context was compacted mid-validation:
1. `TaskList` → find the `in_progress` or first `pending` task
2. `TaskGet` on that task → read the self-contained description
3. Continue from that task — don't restart the validation
4. The task list is your source of truth, not your memoryRelated Skills
transformation-workflow
Practical application guide for HUMMBL's 6 transformations (Perspective, Inversion, Composition, Decomposition, Recursion, Meta-Systems). Includes when to use each transformation, combination patterns, analysis templates, output formats, real-world examples, and common pitfalls. Essential for applying mental models effectively in problem-solving and analysis.
test-and-fix-workflow
Automated workflow for running tests and fixing failures systematically. Use when implementing the mandatory test workflow or fixing code quality issues. Keywords - testing, debugging, workflow, failures, systematic fixes.
team-workflows
Team collaboration patterns - shared configs, standards, onboarding
tdd-workflows-tdd-refactor
Use when working with tdd workflows tdd refactor
tdd-workflows-tdd-red
Generate failing tests for the TDD red phase to define expected behavior and edge cases.
tdd-workflows-tdd-green
Implement the minimal code needed to make failing tests pass in the TDD green phase.
spec-workflow
Standard software engineering workflow for requirement analysis, technical design, and task planning. Use this skill when developing new features, complex architecture designs, multi-module integrations, or projects involving database/UI design.
spec-workflow-orchestrator
Orchestrate comprehensive planning phase from ideation to development-ready specifications using 4 specialized agents
python-workflow
Python project workflow guidelines. Triggers: .py, pyproject.toml, uv, pip, pytest, Python. Covers package management, virtual environments, code style, type safety, testing, configuration, CQRS patterns, and Python-specific development tasks.
python-workflow-development
Develop Python scripts and modules for building AI workflows and integrations. Use when coding data ingestion, transformation, analysis, and automation pipelines in pilot projects requiring Python automation.
Proactive Review Workflow
Automate multi-pass code review across quality, security, and performance dimensions
prisma-workflow
Prisma workflow for schema changes, migrations, and common pitfalls in this repo.