---
name: agent-output-quality-scorer
description: OpenClaw skill for governed agent workflows.
---
Agent Output Quality Scorer
Scores agent task outputs for completeness, instruction-following, hallucination indicators, and response hygiene. Read-only text analysis — no LLM calls, no network, no subprocess.
What It Does
→ Accepts an agent output text file or JSON task bundle
→ Scores across 6 quality dimensions: Completeness, Instruction Follow, Hallucination Signals, Format Compliance, Hedge Density, and Action Safety
→ Returns a composite score (0–100) and per-dimension breakdown
→ Flags known hallucination patterns: fabricated IDs, placeholder text, impossible dates, circular logic
→ Emits `PASS` / `WARN` / `FAIL` verdict for automated pipeline gates
When To Use
→ After any agentic task to gate output quality before human delivery
→ In CI/CD pipelines to block low-quality AI outputs from downstream
→ When auditing batch agent runs for regression in output quality
→ As a feedback loop input for prompt improvement
Self-Test
```
python3 scripts/score_output_quality.py --self-test --json
```
Expected output: `{"ok": true, "verdict": "SELF_TEST_PASS", "score": 100, "dimensions": {...}}`
Typical Usage
```
python3 scripts/score_output_quality.py --input agent-output.txt --task-brief "Write a 3-point summary" --json
```
Output Fields
→ `ok` — boolean (true if score ≥ 60)
→ `verdict` — `PASS` | `WARN` | `FAIL` | `SELF_TEST_PASS` | `ERROR`
→ `score` — composite 0–100
→ `dimensions` — per-dimension scores and findings
→ `hallucination_signals` — list of detected hallucination patterns
→ `files_scanned` — 1 (input file)
→ `mutated_files` — always `[]`
Quality Dimensions
| Dimension | Weight | What It Checks |
|---|---|---|
| Completeness | 25% | Output length vs task complexity estimate |
| Instruction Follow | 25% | Key task terms present in output |
| Hallucination Signals | 20% | Placeholder text, impossible numbers, fabricated IDs |
| Format Compliance | 15% | Requested format markers (JSON/markdown/list) present |
| Hedge Density | 10% | Excessive uncertainty language ratio |
| Action Safety | 5% | No unsafe action phrases (delete all, rm -rf, DROP TABLE) |
Security
stdlib-only (argparse, json, pathlib, re, typing). Read-only text analysis. No LLM, no network, no subprocess, no config mutation. Safe for cron and pipeline automation.
Pricing
$4.99 one-time — works with OpenClaw v2026+
Release evidence
Reviewed in the 2026-06-15 GetAgentIQ warehouse propagation cycle.