wave: Skill for Claude Code

.agents/skills/wave-ctx-validation/SKILL.md

wave-ctx-validation is a skill for Claude Code, Codex from re-cinq/wave. It costs 90 tokens per session (1,630 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is re-cinq/wave's own configuration. It tells Claude Code and Codex how to work on wave itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wave configures →

Reuse

Borrowing it

Nothing to install: this file belongs to re-cinq/wave. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/re-cinq/wave/main/.agents/skills/wave-ctx-validation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/re-cinq/wave

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wave-ctx-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/re-cinq/wave/wave-ctx-validation/github.svg)](https://agentmods.dev/skills/re-cinq/wave/wave-ctx-validation)
Your own site
<a href="https://agentmods.dev/skills/re-cinq/wave/wave-ctx-validation"><img src="https://agentmods.dev/badge/skills/re-cinq/wave/wave-ctx-validation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wave-ctx-validation

Your own site · 80×15
<a href="https://agentmods.dev/skills/re-cinq/wave/wave-ctx-validation"><img src="https://agentmods.dev/badge/skills/re-cinq/wave/wave-ctx-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00090 $0.01630
Opus 5.5 $0.00036 $0.00652
Sonnet 5.5 $0.00018 $0.00326
Haiku 4.5 $0.00009 $0.00163

Measured 1mo ago against content hash bc8ba27a861f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (23 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 1,630 once invoked, about $0.0004 per session on Opus 5.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.