skills/dag-quality/SKILL.md
Validates agent outputs against schemas and quality criteria, scores confidence, detects hallucinations, monitors convergence, decides when to iterate, and synthesizes actionable feedback. Use when checking if a node's output is acceptable, scoring confidence, detecting fabricated content, deciding whether to re-execute, or generating improvement feedback. Activate on "validate output", "check quality", "confidence score", "hallucination check", "should we iterate", "improvement feedback". NOT for executing DAGs (use dag-runtime), planning DAGs (use dag-planner), or matching skills (use dag-skills-matcher).
npx skillsauth add curiositech/windags-skills dag-qualityInstall 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.
Validates outputs, scores confidence, detects hallucinations, monitors convergence, decides on iteration, and synthesizes feedback. The quality gate between DAG nodes. Consolidates dag-output-validator, dag-confidence-scorer, dag-hallucination-detector, dag-convergence-monitor, dag-iteration-detector, and dag-feedback-synthesizer.
✅ Use for:
❌ NOT for:
dag-runtime)dag-planner)skill-grader)flowchart TD
O[Node output] --> SV[Schema validation]
SV -->|Invalid| REJ[Reject + specific errors]
SV -->|Valid| CV[Content validation]
CV --> CS[Confidence scoring]
CS --> HD[Hallucination detection]
HD --> D{Quality above threshold?}
D -->|Yes| ACC[Accept → pass to downstream]
D -->|Below threshold, iteration < max| FB[Generate feedback]
FB --> RE[Re-execute with feedback]
D -->|Below threshold, iteration = max| ESC[Escalate to human]
Structural check: does the output match the node's declared output contract?
Semantic check: is the content reasonable?
Aggregate four evaluator signals (see skill-lifecycle.md for full architecture):
| Evaluator | Weight | Signal | |-----------|--------|--------| | Self-evaluation | 0.15 | Agent's own assessment (sycophancy-biased) | | Peer evaluation | 0.25 | Separate judge agent with skill-grader | | Downstream evaluation | 0.35 | Next node reports usability | | Human evaluation | 0.50 | At human gates, gold standard |
Final score = weighted average of available signals (normalize weights to sum to 1.0).
Specific checks for fabricated content:
If quality_score >= 0.8: ACCEPT
If quality_score < 0.8 AND iterations < max_iterations: ITERATE with feedback
If quality_score < 0.5 AND iterations >= max_iterations: ESCALATE to human
If quality_score < 0.3 on first attempt: ESCALATE immediately (fundamentally wrong)
When iterating, produce structured improvement guidance:
{
"overall_score": 0.65,
"specific_issues": [
{"field": "recommendations", "issue": "Only 2 of 5 required recommendations provided", "fix": "Add 3 more recommendations addressing scalability, testing, and deployment"},
{"field": "citations", "issue": "Source [3] returns 404", "fix": "Replace with a working source or remove the claim"}
],
"strengths_to_preserve": ["Clear structure", "Good code examples"],
"iteration_guidance": "Focus on completeness (missing recommendations) and citation accuracy. Do not rewrite the well-structured sections."
}
Track quality scores across iterations to detect:
Consolidates: dag-output-validator, dag-confidence-scorer, dag-hallucination-detector, dag-convergence-monitor, dag-iteration-detector, dag-feedback-synthesizer
data-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.