/agent-validator:validator-setupfrom agent-validator
Scans a project to detect tooling and configures checks and reviews for Agent Validator. Handles fresh setup, reconfiguration, and adding checks to existing configs.
Ships in agent-validator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Scan the project to discover tooling and configure checks and reviews for agent-validator.
Before starting, read references/check-catalog.md for check category details, YAML schemas, and example configurations.
Read .validator/config.yml. If the file does not exist, tell the user to run agent-validate init first and STOP — do not proceed with any further steps.
Read the entry_points field from .validator/config.yml.
Before deciding whether this project is already configured, inspect the git state of .validator/:
git status --porcelain -- .validator..validator/ or .validator/config.yml is untracked or newly added, treat this as a fresh install even though the directory exists. agent-validate init creates the scaffold first; /validator-setup still needs to configure checks and entry points.Do not conclude "nothing to do" or "already set up" merely because .validator/ exists. Only treat the project as an existing setup when the committed config already contains meaningful entry points/checks, or the user confirms it is existing.
If entry_points is empty ([]) OR contains only the generated root entry point (path: ".") with no checks: This is a fresh setup. Proceed to Step 3 (detect project structure). Preserve any existing reviews on that generated root entry point unless the user explicitly reconfigures reviews.
If entry_points is populated: Show the user a summary of the current configuration:
List each entry point with its path, checks, and reviews
Then ask the user which action to take:
entry_points..validator/checks/*.yml file to .yml.bak (overwrite any previous .bak files) — these are legacy file-based checks.validator/reviews/*.md file to .md.bak (overwrite any previous .bak files).validator/reviews/*.yml files (these are built-in review configs)entry_points to [] in config.ymlScan for signals to classify the project as monorepo, split project, or single project.
package.json with a workspaces fieldpnpm-workspace.yamllerna.json, nx.json, turbo.jsonCargo.toml with a [workspace] sectionpackages/, apps/, or services/ each containing their own project manifest (package.json, go.mod, Cargo.toml, pyproject.toml)frontend/ + backend/ (or client/ + server/, web/ + api/) directories each containing source code and/or their own project manifestapps/web/, apps/api/, apps/worker/ each with their own source and config) — suggests a wildcard entry point like apps/*src/ or lib/ as sole source directory, or source files at project rootIf monorepo or split project: Read references/project-structure.md for detailed multi-project entry point guidance, then follow it for Steps 4 through 8. The rest of this file covers the single-project flow.
If single project: Tell the user what you detected and continue below.
Infer the source directory:
src/ exists and contains source code, suggest srclib/ exists and contains source code, suggest lib. (project root — safer default since it captures all changes)Skip this step if adding checks to an existing entry point that already has a path.
Scan the project for tooling signals across the 6 check categories listed in references/check-catalog.md.
For the "add checks" path: Filter out checks already configured in entry_points.
If no tools discovered: Offer the custom flow (skip to Step 7). Still include code-quality review.
Show a table of discovered checks:
Category | Tool | Command | Confidence
----------------|-----------------|--------------------------------------|-----------
Build | npm | npm run build | High
Lint | ESLint | npx eslint . | High
Typecheck | TypeScript | npx tsc --noEmit | High
Test | Jest | npx jest | High
Security (deps) | npm audit | npm audit --audit-level=moderate | Medium
Security (code) | Semgrep | semgrep scan --config auto --error . | Medium
Confidence levels:
If a category has no discovered tool, show (not found) with — for command and confidence.
Ask the user:
If the user declines ALL checks, still include code-quality review and offer the custom flow (Step 7).
After confirmation, proceed to Step 8 (create files).
Ask the user: check (shell command) or review (AI code review)?
For checks: Ask for command, name, and optional settings (run_in_ci, run_locally).
For reviews: Built-in (code-quality) or custom prompt? Ask for name and write the review content.
Checks — Add checks inline in the entry point's checks array. Each inline check is a single-key object (check name → config object). Include command. Add optional fields (run_in_ci, run_locally) only when they differ from defaults. See references/check-catalog.md for schema. Do NOT add a top-level checks map — inline checks belong under entry_points.
Custom reviews — Create .validator/reviews/<name>.md with YAML frontmatter (num_reviews: 1) and review prompt.
Built-in reviews — Add built-in reviews inline in the entry point's reviews array (e.g. - code-quality: { builtin: code-quality }). Do not create a separate file for built-in reviews.
Update entry_points in .validator/config.yml:
entry_points:
- path: "<source_dir>"
checks:
- build:
command: npm run build
- lint:
command: npx eslint .
reviews:
- code-quality:
builtin: code-quality
Always include code-quality in reviews for fresh setups. For "add checks" / "add custom": append to the appropriate entry point's lists, or add a new entry point if needed. A check or review defined inline in one entry point can be referenced by name (as a string) in other entry points.
Ask the user. If yes, loop to Step 7. If no, proceed.
Run agent-validate validate. If it fails, apply one corrective attempt and re-validate. If it still fails, STOP and ask the user.
Commit all validator configuration and skills so the setup is preserved in version control:
.validator/, .claude/skills/validator-*/, .claude/settings.local.json, .gitignoregit commit -m "chore: configure agent-validator checks and reviews"If there are no changes to commit (everything already committed), skip this step silently.
Run /validator-skip to advance the execution state baseline to the current working tree, so the next run only diffs against future changes.
Tell the user: configuration is complete. Run /validator-run to execute, or /validator-setup again to add more.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub codagent-ai/agent-validator --plugin agent-validator8 skills in this plugin
/validator-checkActivates only for explicit checks-only validation requests such as "run validator checks", "checks only", "check without reviews", or validation without AI review. Runs checks without AI reviews./validator-commitActivates only for explicit validator-aware commit requests such as "commit with validator", "run validator then commit", "run checks before commit", or "skip validator and commit". Excludes plain commit requests./validator-helpDiagnoses and explains validator behavior from runtime evidence for requests such as "why did validator fail", "explain validator behavior", "diagnose validator logs", or "what went wrong in the validator run"./validator-issueFiles structured GitHub bug reports for agent-validator when users ask to file, report, or open an issue for a suspected defect/validator-runActivates only for explicit full-validator requests such as "run the validator", "run the gauntlet", "run validation", or validation before commit, push, or PR creation. Includes checks and reviews, and excludes checks-only requests./validator-skipAdvances the validator execution state baseline without running checks for requests such as "skip validator", "advance validator baseline", or "mark current tree as validated without running checks".Other plugins' skills for the same job