skills/dag-output-validator/SKILL.md
Validates agent outputs against expected schemas and quality criteria. Ensures outputs meet structural requirements and content standards. Activate on 'validate output', 'output validation', 'schema validation', 'check output', 'output quality'. NOT for confidence scoring (use dag-confidence-scorer) or hallucination detection (use dag-hallucination-detector).
npx skillsauth add curiositech/windags-skills dag-output-validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a DAG Output Validator, ensuring agent outputs meet structural and quality requirements before downstream processing.
Input Output → Schema Check
├── Schema Present?
│ ├── YES → Validate Structure
│ │ ├── Valid Structure? → Content Quality Check
│ │ │ ├── Meets Quality Threshold? → PASS
│ │ │ └── Below Threshold? → Check Strict Mode
│ │ │ ├── Strict Mode ON → FAIL (collect all errors)
│ │ │ └── Strict Mode OFF → WARN (continue processing)
│ │ └── Invalid Structure? → Check Error Count
│ │ ├── Critical Errors > 0 → IMMEDIATE FAIL
│ │ └── Only Non-Critical → Collect errors, continue validation
│ └── NO → Check Fallback Rules
│ ├── Fallback Schema Available? → Apply fallback, validate
│ └── No Fallback → Apply basic type/content checks only
Error Severity → Collection Mode
├── Critical (missing required fields, type mismatch)
│ └── FAIL FAST: Stop validation, return immediately
├── Error (constraint violation, format issue)
│ └── COLLECT: Continue validation, accumulate errors
└── Warning (quality suggestion, optimization hint)
├── Strict Mode? → Promote to Error
└── Normal Mode → Collect as warning
Calculated Score → Action Decision
├── Score ≥ 0.8 → ACCEPT (high quality)
├── 0.6 ≤ Score < 0.8 → CHECK downstream requirements
│ ├── Critical path? → REJECT (require higher quality)
│ └── Non-critical? → ACCEPT with warnings
├── 0.4 ≤ Score < 0.6 → CONDITIONAL
│ ├── Has required fields? → ACCEPT (minimum viable)
│ └── Missing required? → REJECT
└── Score < 0.4 → REJECT (insufficient quality)
Symptoms: Validation passes but downstream nodes fail unexpectedly
Detection: if (validation.valid === true && downstreamErrors.length > 0)
Root Cause: Schema doesn't match actual downstream requirements
Fix: Update schema based on downstream node specifications, add integration tests
Symptoms: Low-quality outputs pass validation frequently
Detection: if (validation.score < 0.6 && validation.valid === true)
Root Cause: Thresholds too low or missing quality constraints
Fix: Raise quality thresholds, add missing content rules, enable strict mode
Symptoms: Validation takes longer than actual output generation
Detection: if (validationTime > outputGenerationTime * 0.5)
Root Cause: Complex nested schema validation or too many custom validators
Fix: Optimize schema structure, cache compiled validators, parallelize custom checks
Symptoms: Valid outputs rejected due to edge cases in schema
Detection: if (humanReview.valid === true && validation.valid === false)
Root Cause: Schema too rigid or missing valid format variations
Fix: Add format alternatives, implement fuzzy matching for strings, review edge cases
Symptoms: Structurally valid but contextually wrong outputs pass
Detection: if (validation.valid === true && businessLogicErrors.length > 0)
Root Cause: Schema validates structure but ignores business rules
Fix: Add custom validators for business logic, implement cross-field validation
Input: Code analysis from static analyzer
{
"file": "user.ts",
"analysis": {
"complexity": 85,
"quality": 0.7
},
"suggestions": ["Extract method", "Reduce nesting"]
}
Decision Process:
Novice would miss: Not checking if complexity score correlates with quality score Expert catches: Flags inconsistency (high complexity + good quality = suspicious)
Input: Generated documentation missing security section
{
"title": "API Documentation",
"content": "This API provides user management...",
"sections": [
{"heading": "Overview", "body": "..."},
{"heading": "Usage", "body": "..."}
]
}
Decision Process:
Expert decision: Don't continue validation, security section is non-negotiable for API docs
Input: Performance analysis with edge case values
{
"performance": {
"latency": 0.0001,
"throughput": 999999,
"errorRate": 0.05
}
}
Decision Process:
Expert catches: Unrealistic latency suggests measurement/calculation error
Input: Complex nested analysis with optional fields
{
"analysis": {
"security": {
"vulnerabilities": [],
"score": 0.95
},
"performance": null,
"maintainability": {
"metrics": {"cyclomaticComplexity": 15}
}
}
}
Decision Process:
Expert decision: Accept partial data but ensure downstream knows about limitations
Validation complete when ALL conditions met:
[ ] Schema Compliance: All required fields present with correct types [ ] Constraint Satisfaction: All numeric ranges, string lengths, enum values within bounds [ ] Business Rule Validation: Custom validators pass for domain-specific requirements [ ] Quality Threshold: Calculated quality score meets or exceeds configured minimum (default 0.6) [ ] Error Severity Check: No critical errors present, error count below threshold (max 5 non-critical) [ ] Content Completeness: Required sections/fields contain substantial content (not just empty strings) [ ] Format Consistency: Dates, URIs, emails match expected patterns when specified [ ] Cross-field Validation: Related fields are consistent (e.g., start_date < end_date) [ ] Downstream Compatibility: Output structure matches expectations of consuming nodes [ ] Performance Bounds: Validation completed within time limit (default 5 seconds)
Do NOT use this skill for:
dag-confidence-scorer insteaddag-hallucination-detector insteadDelegate to other skills when:
dag-content-enhancerdag-result-aggregatordag-feedback-synthesizerdag-output-comparatordata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.