From agent-validator
Runs full validator workflow: executes agent-validate checks via Bash, extracts and reports failures from logs using Task, applies fixes before commit/push/PR. For 'run validator' requests.
npx claudepluginhub codagent-ai/agent-validator --plugin agent-validatorThis skill is limited to using the following tools:
Execute the autonomous verification suite.
Runs agent-validate checks without AI reviews: cleans logs, executes checks via Bash, extracts failures with Task, fixes via skills/instructions, re-verifies until pass. For 'run validator checks' or /validator-check.
Runs multi-agent verification loop post-implementation, dispatching specialized agents for review with autonomous subagent fixes and retries until unanimous approval.
Executes unbiased verification loops via sub-agent: git analysis, build, typecheck, lint, tests with auto-fixes/retries. Invoke /handoff-verify after code changes.
Share bugs, ideas, or general feedback.
Execute the autonomous verification suite.
If the caller requests a specific review to be enabled, append --enable-review <name> to the run command for each requested review.
Run agent-validate run using Bash with timeout: 300000. ALWAYS wait for and read the full command output before proceeding — the command typically takes 1-2 minutes. Verify you can see a Status: line in the output before continuing.
NEVER assume success — you must see an explicit Status: line before continuing. Check it and route accordingly:
Status: Passed → Go to Step 8.Status: Passed with warnings → Go to Step 8.Status: Failed → Continue to Step 3. You MUST continue — do not stop here.Status: Retry limit exceeded → Go to Step 8.console.*.log in the validator log directory (e.g., validator_logs/console.1.log) and look for the Status: line there. If no console log is found there, also check validator_logs/previous/ for logs from the most recent archived run. If no console log exists in either location, the command may have timed out or failed to run — re-run with a longer timeout or investigate the error. Do NOT proceed as if it passed.Required when status is Failed:
validator_logs/check_._lint.1.log, the log directory is validator_logs/)Task with subagent_type="general-purpose", model="haiku", prompt= the Extract Prompt (from the Appendix below) + "\n\nLog directory: <inferred path>". Task calls MUST be synchronous — NEVER use run_in_background: true.
b. Subagent delegation: If your environment supports delegating work to a subagent but not the Task tool, delegate the Extract Prompt instructions with the log directory to a subagent for processing.
c. Inline fallback: If no subagent capability is available, follow the Extract Prompt instructions yourself to read the log files and produce the compact failure summary.Print the compact failure summary returned from Step 3.
Fix issues reasonably supported by the feedback or likely intended by the human. When skipping an issue, briefly state what was skipped and why.
Valid reasons to skip:
You MUST NOT skip for these reasons:
Apply this guidance to each failure and fix accordingly:
For REVIEW violations you addressed:
Task with subagent_type="general-purpose", model="haiku", prompt= the Update Prompt (from the Appendix below) + log directory + decisions list. Task calls MUST be synchronous — NEVER use run_in_background: true.
b. Subagent delegation: Delegate the Update Prompt instructions with the log directory and decisions to a subagent.
c. Inline fallback: Follow the Update Prompt instructions yourself to update the review JSON files.NEVER skip this step — if the run failed, you MUST fix and re-run. Run the same command from Step 1 (including any --enable-review flags) again with Bash and timeout: 300000. The tool detects existing logs and automatically switches to verification mode. Go back to Step 2 to check the status line and repeat.
Provide a summary of the session:
You are an EXTRACT subagent. Your job is to read validator log files and return a compact error summary.
You receive a log directory path as your only input.
console.N.log file (e.g., console.3.log > console.2.log)[FAIL][FAIL] line, extract the referenced file path.log files (check gates): Extract error output. Look for --- Fix Instructions --- sections and --- Fix Skill: <name> --- sections. Include their full content..json files (review gates): Parse the JSON. Find violations where status is "new". For each, extract: file, line, issue, priority, fix.Return a plain-text summary using EXACTLY this format:
For check failures:
CHECKS:
[fail] <gate_label>
<concise error description>
Fix Instructions: <extracted text if present, otherwise omit this line>
Fix Skill: <skill name if present, otherwise omit this line>
For review failures:
REVIEWS:
[<priority>] <gate_label>
<file>:<line> - <issue summary>
Fix: <fix suggestion>
If there are no failures of a type, omit that section entirely.
Log directory: validator_logs/
The directory contains:
console.2.logcheck_src_lint.2.logreview_src_code-quality_claude@1.2.jsonconsole.2.log contains:
[START] check:src:lint
[FAIL] check:src:lint (1.23s) - Exited with code 1
Log: validator_logs/check_src_lint.2.log
[START] review:src:code-quality (claude@1)
[FAIL] review:src:code-quality (claude@1) (5.42s) - Found 2 violations
Review: validator_logs/review_src_code-quality_claude@1.2.json
check_src_lint.2.log contains:
[2026-02-15T10:23:45.123Z] Starting check: lint
Executing command: bun run lint
Working directory: /Users/user/project/src
src/helpers.ts:3:5 - error: Unexpected var, use let or const instead
Command failed: bun run lint
Result: fail - Exited with code 1
--- Fix Instructions ---
Replace all `var` declarations with `const` or `let`.
review_src_code-quality_claude@1.2.json contains:
{
"adapter": "claude",
"status": "fail",
"violations": [
{
"file": "src/main.ts",
"line": 45,
"issue": "Missing error handling for async database call",
"fix": "Wrap in try-catch block",
"priority": "high",
"status": "new"
},
{
"file": "src/utils.ts",
"line": 10,
"issue": "Function exceeds 50 lines",
"fix": "Extract helper methods",
"priority": "medium",
"status": "fixed"
}
]
}
CHECKS:
[fail] check:src:lint
src/helpers.ts:3:5 - error: Unexpected var, use let or const instead
Fix Instructions: Replace all `var` declarations with `const` or `let`.
REVIEWS:
[high] review:src:code-quality (claude@1)
src/main.ts:45 - Missing error handling for async database call
Fix: Wrap in try-catch block
Note: The src/utils.ts:10 violation was omitted because its status is "fixed", not "new".
[FAIL] entriesstatus: "new" — skip "fixed" and "skipped"You are an UPDATE subagent. Your job is to update review JSON files with fix/skip decisions.
You receive:
file, line, issue_prefix, status ("fixed" or "skipped"), and result (brief description)For each decision:
.json file in the log directory by scanning for a violation that matches on file (exact) AND line (exact) AND where issue starts with the provided issue_prefix. If multiple violations match, use the first unprocessed one (status still "new")violations array"status" to the provided status value"result" to the provided result stringstatus and resultLog directory: validator_logs/
Decisions:
src/main.ts, line: 45, issue_prefix: Missing error handling, status: fixed, result: Added try-catch around database callsrc/utils.ts, line: 10, issue_prefix: Function exceeds, status: skipped, result: Stylistic preference, function is readable as-isThe log directory contains review_src_code-quality_claude@1.2.json:
{
"adapter": "claude",
"status": "fail",
"violations": [
{
"file": "src/main.ts",
"line": 45,
"issue": "Missing error handling for async database call",
"fix": "Wrap in try-catch block",
"priority": "high",
"status": "new"
},
{
"file": "src/utils.ts",
"line": 10,
"issue": "Function exceeds 50 lines",
"fix": "Extract helper methods",
"priority": "medium",
"status": "new"
}
]
}
After updating, review_src_code-quality_claude@1.2.json becomes:
{
"adapter": "claude",
"status": "fail",
"violations": [
{
"file": "src/main.ts",
"line": 45,
"issue": "Missing error handling for async database call",
"fix": "Wrap in try-catch block",
"priority": "high",
"status": "fixed",
"result": "Added try-catch around database call"
},
{
"file": "src/utils.ts",
"line": 10,
"issue": "Function exceeds 50 lines",
"fix": "Extract helper methods",
"priority": "medium",
"status": "skipped",
"result": "Stylistic preference, function is readable as-is"
}
]
}
Updated 2 violations:
- src/main.ts:45 — set to fixed
- src/utils.ts:10 — set to skipped
Return a brief confirmation listing each decision applied:
Updated <N> violations:
- <file>:<line> — set to <status>
If any decisions could not be matched, add:
Unmatched decisions:
- <file>:<line> — <issue_prefix> (not found in any JSON file)