Agent Skill
2/7/2026

backend-zod

TypeScript-first schema validation library. Use for ALL input validation in TypeScript projects — API inputs, form data, environment variables, config files. Essential companion for tRPC (required), React Hook Form, and any data boundary. Choose Zod when you need runtime validation with automatic TypeScript type inference.

P
petbrains
8GitHub Stars
1Views
npx skills add petbrains/mvp-builder

SKILL.md

Namebackend-zod
DescriptionTypeScript-first schema validation library. Use for ALL input validation in TypeScript projects — API inputs, form data, environment variables, config files. Essential companion for tRPC (required), React Hook Form, and any data boundary. Choose Zod when you need runtime validation with automatic TypeScript type inference.
<p align="center"> <img src="assets/logo.png" width="180" alt="MVP Builder" /> </p> <h1 align="center">MVP Builder</h1> <p align="center"> <strong>Build MVPs with AI agent that verifies its own work</strong><br> Claude Code instructions for Document-Driven Development </p> <p align="center"> <a href="#the-approach">Approach</a> • <a href="#how-it-works">How It Works</a> • <a href="#installation">Installation</a> </p>

The Problem

AI coding agents are brilliant but unreliable:

  • šŸŽ­ They hallucinate — write code that "looks right" but doesn't work
  • 🦄 They cut corners — stubs, mocks, "TODO: implement later"
  • 🧠 They forget — lose context between sessions
  • āœ… They lie — say "done" when work is half-finished

You end up debugging AI's mistakes instead of building your product.


The Approach

If the agent performs poorly, the task description is lacking. AI models are strong reasoners but unreliable workers — they hallucinate, cut corners, and forget previous context. The fix is not just better prompts but structured specifications that require verifiable outputs.

Core Principles

Document-Driven Development
Specifications generate code, not vice versa. Every feature starts as structured documentation (PRD → spec → UX → plan) before any implementation begins.

Verification Chain
Each requirement gets a test. Each test gets an implementation. Each implementation gets reviewed. Nothing ships without passing the chain.

FR-XXX → TEST-XXX → IMPL-XXX → CHK → REV

Feedback Loop
Agents check their own work. Review finds issues → feedback.md captures them → fix agent resolves → review verifies. AICODE-* markers track what's resolved and what's still relevant. Context stays clean.

Skills over Agents
The old approach: separate agent for each domain. The new approach: one general agent that loads skills for the task. Add expertise by adding folders, not rewriting agents.


How It Works

Pipeline

flowchart LR
    subgraph DEFINE ["Define"]
        PRD["prd"] --> DSETUP["design-setup"]
        DSETUP --> FEATURE["feature"]
        FEATURE --> CLARIFY["clarify"]
        DSETUP -.->|"to Figma"| DGEN["design-generate"]
        DGEN -.->|"from Figma"| DSETUP
    end
    
    subgraph DESIGN ["Design"]
        CLARIFY --> UX["ux"]
        UX --> UI["ui"]
        UI --> PLAN["plan"]
    end
    
    subgraph BUILD ["Build"]
        PLAN --> TASKS["tasks"]
        TASKS --> VAL["validation"]
        VAL --> SETUP["feature-setup"]
        SETUP --> TDD["feature-tdd"]
        TDD --> REVIEW["review"]
        REVIEW -->|BLOCKED| FIX["feature-fix"]
        FIX --> REVIEW
    end
    
    subgraph SHIP ["Ship"]
        REVIEW -->|PASSED| MEMORY["memory"]
    end

Phase 1: Define

Transform product idea into structured specifications.

Command / AgentOutputPurpose
/docs:prdPRD.md, references/ dirProduct vision, audience, core problem
/docs:design-setupreferences/design-system.md, tokens/, style-guide.mdNormalize design generator output, extract from Figma
design-generateFigma file with editable layersValidate HTML references, fix token inconsistencies, push to Figma
/docs:featurespec.md, FEATURES.mdFeature specs with requirements (FR-XXX, UX-XXX)
/docs:clarifyUpdated spec.mdResolve ambiguities through targeted questions

After /docs:prd: Add supplementary materials to ai-docs/references/ — design systems, tokens, schemas, API contracts, style guides, screenshots. Run /docs:design-setup to normalize raw generator output.

Figma roundtrip (optional): design-generate pushes HTML references into Figma for designer review. After refinement in Figma, run /docs:design-setup [figma-url] to extract changes back. Repeat until design is locked.

Phase 2: Design

Convert specifications into technical architecture.

CommandOutputPurpose
/docs:uxux.mdUser flows, states, error handling, accessibility
/docs:uiui.mdComponent trees, DS mapping, layout structure
/docs:planplan.md, data-model.md, contracts/, setup.mdArchitecture, entities, API specs, environment

Phase 3: Build

Execute implementation through TDD cycles with self-verification.

Command / AgentOutputPurpose
/docs:taskstasks.mdINIT tasks + TDD cycles (TEST-XXX → IMPL-XXX)
/docs:validationvalidation/*.mdChecklists with traceable checkpoints (CHK)
feature-setupInfrastructure codeExecute INIT tasks, scaffold project
feature-tddFeature code + testsRED-GREEN cycles, atomic commits
/docs:reviewfeedback.mdVerify implementation, generate findings (REV-XXX)
feature-fixFixed codeApply fixes one error at a time

Review Loop: If review status is BLOCKED → feature-fix → /docs:review → repeat until PASSED.

Phase 4: Ship

Finalize and document completed implementation.

CommandOutputPurpose
/docs:memory [feature-path]ai-docs/README.mdAdd feature to code map, rebuild dependency graph
/docs:memoryai-docs/README.mdRescan entire project, capture all changes

Two modes: with feature path — adds the feature entry and rebuilds the graph. Without arguments — full project rescan for changes made outside feature scope (refactoring, new shared modules, deleted files). Feature list is preserved, only the dependency graph is rebuilt from scratch.

Agents

Specialized agents execute tasks across pipeline phases:

Define phase:

AgentRoleWhen to use
design-generatePush HTML to FigmaAfter /docs:design-setup, sends validated references to Figma for designer review

Build phase:

AgentRoleWhen to use
feature-setupScaffold infrastructureAfter /docs:validation, executes INIT-XXX tasks
feature-tddTDD implementationAfter setup, runs RED-GREEN cycles
feature-fixApply review fixesWhen review status = BLOCKED, fixes one error at a time

Skills System

Skills are reusable capabilities that agents can load on demand.

Each skill contains:

  • Instructions for specific domain (analysis, documentation, git workflow)
  • Decision rules with explicit conditions
  • Tool permissions and constraints

Add new expertise: create a skill folder in .claude/skills/.


Document Structure

Generated by MVP Builder:

ai-docs/
ā”œā”€ā”€ PRD.md                      # Product vision
ā”œā”€ā”€ FEATURES.md                 # Feature index  
ā”œā”€ā”€ README.md                   # Code map (navigation for agents)
ā”œā”€ā”€ references/                 # Design systems, tokens, schemas, style guides, screens, API contracts
└── features/
    └── [feature-name]/
        ā”œā”€ā”€ spec.md             # Requirements (FR-XXX, UX-XXX)
        ā”œā”€ā”€ ux.md               # User flows and states
        ā”œā”€ā”€ ui.md               # Component trees, DS mapping, layout
        ā”œā”€ā”€ plan.md             # Architecture decisions
        ā”œā”€ā”€ research.md         # Technical research and rationale
        ā”œā”€ā”€ data-model.md       # Entities and validation
        ā”œā”€ā”€ setup.md            # Environment config
        ā”œā”€ā”€ contracts/          # API specifications
        ā”œā”€ā”€ tasks.md            # TDD execution tasks
        ā”œā”€ā”€ validation/         # Verification checklists
        └── feedback.md         # Review findings

Installation

Navigate to your project directory, then run:

macOS, Linux, WSL:

curl -fsSL https://raw.githubusercontent.com/petbrains/mvp-builder/main/scripts/install.sh | bash

Windows PowerShell:

irm https://raw.githubusercontent.com/petbrains/mvp-builder/main/scripts/install.ps1 | iex

This installs:

  • .claude/ — commands, agents, skills, hooks
  • CLAUDE.md — agent identity and rules
  • .mcp.json — MCP server configuration

Start with /docs:prd to define your product.

Skills Info
Original Name:backend-zodAuthor:petbrains