Skip to content
OpenSmartRoute
Skillv1.0.0

agentic-validators

Design and install validation hooks for coding agents (e.g., Claude Code) to make AI changes safer and more deterministic. Use when you want post-tool-use or stop hooks, automated tests/linters/format

by vishalsachdev(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from vishalsachdev/claude-code-skills (skills/agentic-validators/SKILL.md). Install upstream with npx skills add vishalsachdev/claude-code-skills --skill agentic-validators. Copyright stays with the author (MIT).

Agentic Validators

Goal

Turn “agent wrote code” into “agent wrote code and the change is validated automatically.”

This skill helps you:

  • choose the right validation strategy (per-file vs repo-wide)
  • implement post-tool-use and stop hooks
  • create narrow validators (fast, deterministic checks)
  • structure work so multiple agents can run in parallel without losing correctness

Mental model

  • Agents are non-deterministic; validators are deterministic.
  • Context is fragile; validation + logs are durable.
  • Prefer small, fast checks close to the change (per-file) + a final global gate (repo-wide).

When to use which hook

Post-tool-use hook (best default)

Use when:

  • you want immediate feedback after edits
  • you can validate the specific file(s) that were touched
  • you want high signal without running the full test suite

Typical checks:

  • formatting (prettier/black)
  • linting (eslint/ruff)
  • typecheck for that file/module (tsc --noEmit with project config)

Stop hook (end-of-run gate)

Use when:

  • you need repo-wide invariants
  • you want one last “exit criteria” check

Typical checks:

  • unit tests
  • build
  • integration tests

Step-by-step: add validators to a repo

  1. Identify file types and fast checks

    • JS/TS: prettier + eslint + typecheck
    • Python: ruff + pytest (optional)
    • Go: gofmt + go test (optional)
  2. Implement per-file validator(s)

    • A validator should be:
      • fast (<5–30s)
      • deterministic
      • clear output
      • safe to run repeatedly
  3. Wire into hooks

    • Implement post-tool-use hook calling validator with the file path.
  4. Add logs

    • Write to a predictable location (e.g., .agent-logs/validators.log)
  5. Add a stop-hook “final gate”

    • Run the broader checks once.

Example validator patterns

Pattern A: “format + lint” for a touched file

  • Format file
  • Lint file
  • If any change was made by formatter, fail and ask agent to re-run with formatter changes committed

Pattern B: “contract test”

  • For touched module, run a focused unit test subset

Pattern C: “readme/docs invariant”

  • If docs changed, run markdown lint + link checker

Parallelism pattern

If you have many similar files (CSV, configs, docs):

  • spawn one subagent per file
  • each subagent runs its own post-tool-use validator
  • aggregator agent only accepts results where validators passed

Common failure modes & fixes

  • Validator too slow → split into fast per-file checks + slower stop hook.
  • Validator flaky → remove network calls, pin versions, add retries only where safe.
  • Agent ignores tool docs → write a short “constitution” section and point to reference files.

References

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/vishalsachdev-claude-code-skills-agentic-validators/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

vishalsachdev-claude-code-skills-agentic-validators.ocm.jsonjson
{
  "ocm": "1",
  "id": "vishalsachdev-claude-code-skills-agentic-validators",
  "kind": "skill",
  "name": "agentic-validators",
  "description": "Design and install validation hooks for coding agents (e.g., Claude Code) to make AI changes safer and more deterministic. Use when you want post-tool-use or stop hooks, automated tests/linters/formatters, parallel subagents with per-file validation, or a repeatable “agent pipeline” with audit logs.",
  "publisher": "vishalsachdev",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "agents",
      "hooks",
      "validation",
      "testing",
      "linting",
      "formatting",
      "ci",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Design and install validation hooks for coding agents (e.g., Claude Code) to make AI changes safer and more deterministic. Use when you want post-tool-use or stop hooks, automated tests/linters/formatters, parallel subagents with per-file validation, or a repeatable “agent pipeline” with audit logs."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/vishalsachdev/claude-code-skills",
      "path": "skills/agentic-validators/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/vishalsachdev/claude-code-skills/blob/HEAD/skills/agentic-validators/SKILL.md",
      "key": "vishalsachdev/claude-code-skills/skills/agentic-validators/SKILL.md"
    },
    "compatibility": "Works in repos on macOS/Linux with bash. Assumes a CLI coding agent that supports hooks (Claude Code-style) and common tooling (git, ripgrep, node/python toolchains).",
    "license": "MIT"
  },
  "instructions": "# Agentic Validators\n\n## Goal\nTurn “agent wrote code” into “agent wrote code **and** the change is validated automatically.”\n\nThis skill helps you:\n- choose the right validation strategy (per-file vs repo-wide)\n- implement **post-tool-use** and **stop** hooks\n- create **narrow validators** (fast, deterministic checks)\n- structure work so multiple agents can run in parallel without losing correctness\n\n## Mental model\n- **Agents are non-deterministic; validators are deterministic.**\n- **Context is fragile; validation + logs are durable.**\n- Prefer **small, fast checks close to the change** (per-",
  "cost": {
    "context_tokens": 708
  }
}

Fetch it by URL: GET /api/v1/registry/vishalsachdev-claude-code-skills-agentic-validators/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.