06-reference

indydevdan self validating hooks

Sat Apr 18 2026 20:00:00 GMT-0400 (Eastern Daylight Time) ·reference ·source: IndyDevDan YouTube ·by IndyDevDan
indydevdanclaude-codehooks-in-skillshooks-in-sub-agentshooks-in-slash-commandsspecialized-self-validationdeterministic-validationclosed-loop-promptralph-wiggumagents-plus-codepost-tool-use-hookstop-hookfocused-agentsvalidatorsobservabilityagentic-engineering

IndyDevDan — The Claude Code Feature Senior Engineers KEEP MISSING

Why this is in the vault

Dan’s January 19 video flags a Cloud Code release that quietly ships the missing piece of the harness story: hooks now run inside skills, sub-agents, AND custom slash commands — not only globally in settings.json. It’s vault-worthy because:

  1. It closes the loop on “watch what it did, not what it said.” This is the same instrumentation gap Dan calls out in the Mythos video earlier this same cycle. Mythos says “we need observability into what the model actually does”; this video gives us the deterministic enforcement layer to act on that observability per-skill, per-sub-agent, per-prompt. The two videos are halves of the same architecture.
  2. It introduces “specialized self-validation” as a vocabulary the vault didn’t have. Existing RDCO global hooks (in ~/.claude/settings.json) are blunt — every tool call across every skill goes through the same hook. Per-skill hooks are surgical: a CSV-edit skill validates CSV; a Notion-update skill validates schema; an HTML-generation skill validates DOM. The “focused agent + focused validator” pattern is Dan’s load-bearing claim, and it’s directly transferable.
  3. It restates “agents plus code beats agents” with a concrete mechanism. RDCO has been moving toward this with the autonomous loop, but the validation layer per skill has been thin. Dan shows the exact directory layout (.claude/hooks/validators/<purpose>-validator.py), the exact post-tool-use vs stop hook tradeoff, and the exact “resolve this error in ” agent-feedback pattern. Copy-paste implementable.

Core argument

Specialized self-validation via per-skill hooks turns prompts/sub-agents/skills into closed-loop systems that you can trust to validate their own work. Focused agents with focused validators outperform generalist agents with generalist validation, over scale.

The release that matters: Cloud Code now supports pre-tool-use, post-tool-use, and stop hooks inside skill front-matter, sub-agent front-matter, and custom slash command front-matter — not only in global settings.json. Dan flags this as the most-missed feature in the recent release notes.

The directory pattern Dan recommends:

.claude/
  commands/
  agents/
  skills/
  hooks/
    validators/
      csv-single-validator.py
      html-validator.py
      ...

The per-skill hook block in front-matter (paraphrased):

hooks:
  post-tool-use:
    - tool: Edit|Write|Read
      command: uv run ${CLAUDE_PROJECT_DIR}/.claude/hooks/validators/csv-single-validator.py

The agent-feedback contract: when the validator finds an error, it returns a string starting with “resolve this CSV error in :” plus the error list. The agent reads this back into context and immediately fixes it. Demo: removing a quote from a CSV → read hook fires → validator catches it → agent fixes it on the next turn → validator confirms clean → real work proceeds.

Post-tool-use vs stop:

The single sharpest line: “A focused agent with one purpose outperforms an unfocused agent with many purposes.” Dan’s repeated insistence on focused, single-purpose agents (CSV-edit-agent, HTML-validator, build-agent) is the corollary of the focused-validator pattern. Generalist agents with generalist validation are the failure mode.

Connection to Ralph Wiggum / agents-plus-code: This is the deterministic-validation half of the agent-loop pattern. The agent does the soft thing (interpretation, generation, repair); the validator does the hard thing (syntactic correctness, schema compliance, file-system invariants). Both halves running per-skill is the architecture.

The meta point Dan keeps making: “Engineers know what their agents are doing. Vibe coding is not knowing and not looking.” Per-skill validators are how you know — the validator log is the ground truth.

Mapping against Ray Data Co

Open follow-ups