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-comparatortools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.