verify-output

Pattern for verifying your output matches required schema before completing. Use before writing final output to ensure validity.

242 stars

Best use case

verify-output is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Pattern for verifying your output matches required schema before completing. Use before writing final output to ensure validity.

Pattern for verifying your output matches required schema before completing. Use before writing final output to ensure validity.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "verify-output" skill to help with this workflow task. Context: Pattern for verifying your output matches required schema before completing. Use before writing final output to ensure validity.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/verify-output/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/clouder0/verify-output/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/verify-output/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How verify-output Compares

Feature / Agentverify-outputStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Pattern for verifying your output matches required schema before completing. Use before writing final output to ensure validity.

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.

SKILL.md Source

# Verify Output Skill

Pattern for ensuring outputs match required schemas using automated validation.

## When to Use

- Before writing final output file
- After completing a task
- When producing structured JSON output

## Quick Reference

**Validate before writing:**
```bash
./scripts/validate.sh <schema_name> <file_path>
```

## Available Schemas

| Schema | Used By | Output Path |
|--------|---------|-------------|
| `demand` | PM | `memory/reports/demand.json` |
| `design` | Architect | `memory/reports/designs/*.json` |
| `task-output` | Implementer | `memory/tasks/*/output.json` |
| `verification` | Verifier | `memory/tasks/*/verification.json` |
| `reflection` | Reflector | `memory/reflections/*.json` |
| `evolution-proposal` | Evolver | `memory/evolution/*.json` |
| `contract` | Executor | `memory/contracts/*.json` |

## Validation Process

### Step 1: Determine Your Schema

Based on your agent role:
```
PM agent          → demand.schema.json
Architect agent   → design.schema.json
Implementer agent → task-output.schema.json
Verifier agent    → verification.schema.json
Reflector agent   → reflection.schema.json
Evolver agent     → evolution-proposal.schema.json
```

### Step 2: Write Output to Temp Location

```bash
Write(memory/tasks/{id}/output.json.tmp, content)
```

### Step 3: Validate

```bash
./scripts/validate.sh task-output memory/tasks/{id}/output.json.tmp
```

### Step 4: If Valid, Move to Final Location

```bash
mv memory/tasks/{id}/output.json.tmp memory/tasks/{id}/output.json
```

### Step 5: If Invalid, Fix and Retry

Common validation errors and fixes:

| Error | Fix |
|-------|-----|
| `'X' is a required property` | Add the missing field |
| `'Y' is not one of ['a', 'b']` | Use valid enum value |
| `'Z' is not of type 'array'` | Wrap value in array: `[value]` |
| `Additional properties not allowed` | Remove extra fields |

## Output Format: Compact JSON

All agent outputs MUST be compact JSON (single line, no extra whitespace):

```json
{"task_id":"001","status":"pre_complete","knowledge_updates":[],"reflection":{"what_worked":[],"what_failed":[],"patterns_noticed":[]}}
```

## Mandatory Fields (All Agents)

Every output MUST include:

```json
{"knowledge_updates":[{"category":"codebase","content":"string","confidence":"certain"}],"reflection":{"what_worked":["string"],"what_failed":["string"],"patterns_noticed":["string"]}}
```

Or empty arrays if no updates:
```json
{"knowledge_updates":[],"reflection":{"what_worked":[],"what_failed":[],"patterns_noticed":[]}}
```

Valid values:
- `category`: `"codebase"` | `"convention"` | `"decision"` | `"gotcha"`
- `confidence`: `"certain"` | `"likely"` | `"uncertain"`

## Pre-Write Validation Pattern

Recommended pattern for agents:

```
1. Construct output object in memory
2. Write to {output_path}.tmp
3. Run: ./scripts/validate.sh {schema} {output_path}.tmp
4. IF validation passes:
     → mv {output_path}.tmp {output_path}
     → Log: "Output validated and written"
5. ELSE:
     → Read validation errors
     → Fix output object
     → Retry from step 2
     → Max 3 retries, then report validation failure
```

## Common Mistakes

- Forgetting `knowledge_updates` (even if empty array)
- Forgetting `reflection` fields
- Using invalid enum values (check schema for allowed values)
- Missing required nested fields
- Wrong type (string instead of array, etc.)
- Using YAML instead of JSON
- Pretty-printing JSON (use compact format)

## Principles

1. **Validate before write** - Never output invalid data
2. **Schema is law** - Missing fields = rejection by executor
3. **Empty is valid** - `"knowledge_updates":[]` is okay
4. **Fail fast** - Catch errors before they propagate
5. **Compact JSON** - Single line, no formatting

Related Skills

generating-output-styles

242
from aiskillstore/marketplace

Creates custom output styles for Claude Code that modify system prompts and behavior. Use when the user asks to create output styles, customize Claude's response format, generate output-style files, or mentions output style configuration.

when-verifying-quality-use-verification-quality

242
from aiskillstore/marketplace

Comprehensive quality verification and validation through static analysis, dynamic testing, integration validation, and certification gates

verify

242
from aiskillstore/marketplace

Verifies builds, recovers from errors, and applies review fixes. Use when user mentions ビルド, build, 検証, verify, エラー復旧, error recovery, 指摘を適用, apply fixes, テスト実行, tests fail, lint errors occur, CI breaks, テスト失敗, lintエラー, 型エラー, ビルドエラー, CIが落ちた. Do NOT load for: 実装作業, レビュー, セットアップ, 新機能開発.

quality-verify

242
from aiskillstore/marketplace

Verify the final deliverable meets all quality criteria before delivery. Use as the final validation step to ensure the output meets the user's quality standards across all 6 dimensions.

generate-output

242
from aiskillstore/marketplace

Create the deliverable (code, documentation, tests, content) following the user's standards and best practices. Use after validation passes to actually build the work product.

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

discover-skills

242
from aiskillstore/marketplace

当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。

web-performance-seo

242
from aiskillstore/marketplace

Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.

project-to-obsidian

242
from aiskillstore/marketplace

将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置

obsidian-helper

242
from aiskillstore/marketplace

Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)