wave-ctx-validation

Project guidance for validating agent-generated output with several kinds of checks, including schemas, TypeScript interfaces, test suites, Markdown specifications, formats, and non-empty files.

In plain words
What is it for?
Use it when building or reviewing pipelines that validate JSON, code types, tests, documents, files, dependencies, retries, and phase or concurrency rules.
Why use it?
It explains how invalid output is detected, repaired, retried, or allowed through according to the contract.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/re-cinq/wave/wave-ctx-validation
Any agent
npx skills add re-cinq/wave --skill wave-ctx-validation
Clone the repo
git clone --depth 1 https://github.com/re-cinq/wave

Made for: Claude Code, Codex.

Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.01630
Opus 5 $0.00045 $0.00815
Sonnet 5 $0.00018 $0.00326
Haiku 4.5 $0.00009 $0.00163

Measured 2d ago against content hash bc8ba27a861f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wave-ctx-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/wave-ctx-validation/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Validation Context

Multi-layer output validation system — contract enforcement with six validator types (json_schema, typescript_interface, test_suite, markdown_spec, format, non_empty_file), progressive JSON recovery with three aggressiveness tiers, adaptive retry with failure classification and repair prompts, error wrapper detection for AI-generated envelopes, input artifact schema validation, preflight dependency checks with auto-install, and pipeline-level phase/concurrency/staleness validation.

Invariants

  • Unknown contract types silently pass — NewValidator returns nil, Validate returns nil
  • must_pass controls whether contract failure blocks the pipeline — true=hard error, false=soft failure event
  • maxRetries<=0 defaults to 1 attempt (no retry) in basic mode, but 3 in adaptive mode — intentional asymmetry
  • After exhausting all retries, Retryable is set to false on the ValidationError
  • JSON schema validation requires either Schema (inline) or SchemaPath (file) — neither produces non-retryable error
  • Test suite validator rejects unresolved template variables — '{{ ' or '{{' in command produces non-retryable error
  • Test suite defaults Dir to 'project_root' resolved via git rev-parse --show-toplevel
  • TypeScript validator degrades gracefully when tsc absent — must_pass:true = hard error with install instructions, must_pass:false = silently skips
  • JSON recovery defaults to progressive when not explicitly configured and must_pass is false — conservative for must_pass contracts
  • Recovered JSON must be structurally complete (balanced braces/brackets) — incomplete recovery is retryable error
  • Error wrapper detection requires error_type AND raw_output AND at least 3 indicator fields
  • Input artifact validation fails fast — first invalid artifact stops all further checks
  • Non-empty file validator requires file exists AND has size > 0
  • Missing tools return ToolError with list of missing tool names
  • Missing skills return SkillError with list of missing skill names
  • PreflightError wraps both ToolError and SkillError, supporting errors.As() for either
  • Skills with Install command are auto-installed — post-install verification retries with $HOME/.local/bin in PATH
  • Init commands NOT run in preflight — deferred to worktree creation
  • Phase skip validation only applies to impl-prototype or prototype pipelines
  • Generic step sequence validation requires prior run state to exist before resuming from a step
  • on_failure:rework requires rework_step to be set — validated at parse time
  • Workspace locks prevent concurrent access — in-memory lock returns error if workspace in use
  • Optional steps default to on_failure:continue; non-optional default to on_failure:fail
  • Format type inferred from schema filename — github-pr-draft.schema.json maps to github_pr

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 90 tokens per session scan A bc8ba27a861f

Subscribe to this mod's changes

wave-ctx-validation is a skill published in the GitHub repository re-cinq/wave (20 stars, last pushed 4mo ago), licensed MIT. It adds 90 tokens to every session and 1,630 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

coordinate-agents

Route Codex-native multi-agent orchestration in a Git repository through a local-first, recoverable Agent Bus. Use for role-based planning, task execution, review, recovery, adapters, and human-gated release workflows. The plugin supports Codex CLI, Google Antigravity CLI, Claude, and other configured coding agents.…

hogancv/coordinate-agents · 87 tokens

coordinate-task

Run a Coordinate Agents Task from requirement clarification through planning, implementation, review, and the human release gate. Hide Agent Bus transport details behind the durable Task API.

hogancv/coordinate-agents · 35 tokens

coordinate-recover

Diagnose and safely resume Coordinate Agents Tasks after executable failure, non-zero exit, timeout, stale claim, processing message, or Implementer ERROR. Recovery is explicit and never an automatic retry loop.

hogancv/coordinate-agents · 43 tokens

coordinate-setup

Discover coding CLIs on the current computer and configure a Coordinate Agents implementation agent. Use for setup, executable checks, registered agents, user-level configuration, and project-over-user precedence.

hogancv/coordinate-agents · 40 tokens

coordinate-review

Review a Coordinate Agents implementation as the Codex Reviewer. Verify the real commit, diff, tests, validation evidence, and specification without modifying the Implementer's product code.

hogancv/coordinate-agents · 36 tokens

api-contracts

Enforce API contract governance, strict backward compatibility, schema validation, and standardized RFC 7807 error responses.

rafaelghif/antigravity-agents · 26 tokens