Validate task output against criteria before calling Finish. Use when the task has a validation spec (criteria, optionalChecks). Load this skill, write output to sandbox, run validate script, fix issues if validation fails, then call Finish.
Resources
1Install
npx skillscat add dozybot001/maars/task-output-validator Install via the SkillsCat registry.
Task Output Validator
Validate task output against the task's validation criteria before calling Finish. Ensures output meets all required criteria so the task passes validation.
When to Use
- The task has a
validationspec withcriteriaoroptionalChecks - You have produced output and are about to call Finish
- You want to catch format/structure errors before submission
Workflow
Write output to sandbox
Save your output to a file in the task sandbox, e.g.sandbox/output.jsonorsandbox/result.md.Load this skill
LoadSkill("task-output-validator")Run validation
RunSkillScript(skill="task-output-validator", script="scripts/validate.py", args=["{{sandbox}}/output.json", "--criteria-json", "<JSON string of validation spec>"])Interpret result
- If
passed: true→ callFinishwith the output - If
passed: false→ read the report, fix the issues, re-run validation, thenFinish
- If
Validation Spec Format
Pass the task's validation spec as JSON. Example:
{
"criteria": [
"Output is valid JSON",
"keywords is non-empty array",
"Document has ## Summary section"
],
"optionalChecks": ["Optional: style consistency"]
}Script Usage
python scripts/validate.py <output_file_path> [--criteria-json '{"criteria":[...],"optionalChecks":[...]}']output_file_path: Full path to the output file (use{{sandbox}}/output.jsonin RunSkillScript args)--criteria-json: JSON string of validation spec. If omitted, only format validity is checked.
Output Format
The script prints JSON to stdout:
{
"passed": true,
"report": "# Validation Report\n\n- Criterion 1: PASS\n- Criterion 2: PASS\n\n**Result: PASS**"
}Criteria Support
The script performs structural checks:
- JSON: Valid JSON, required keys present, non-empty arrays/objects where specified
- Markdown: Section headers (e.g.
## Summary), table structure, pipe syntax - References section:
Document has ## References sectionandReferences section is non-empty(for research reports) - Generic: Substring/keyword presence
For semantic criteria (e.g. "content is complete"), verify manually before Finish. The script reports automatable checks; you judge the rest.
Example
Task has validation: {"criteria": ["Output is valid JSON", "keywords is non-empty array"]}
- Write output to
sandbox/search_config.json RunSkillScript("task-output-validator", "scripts/validate.py", ["{{sandbox}}/search_config.json", "--criteria-json", "{\"criteria\":[\"Output is valid JSON\",\"keywords is non-empty array\"]}"])- If passed →
Finish(output)