nw-algebraic-design-protocol

nw-algebraic-design-protocol is a skill for Claude Code, Codex from nWave-ai/nWave. It costs 33 tokens per session (677 once invoked), scanned A, original, MIT.

A design method that starts with what users or other code can observe, defines when two results should count as equal, and follows contradictions back to the type or observation that caused them.

In plain words
What is it for?
Use it to settle contested design decisions, find the source of a false rule, and design data structures or interfaces around observable behaviour.
Why use it?
It helps resolve designs that produce incorrect results, especially when a rule has exceptions or a data representation must change without changing meaning.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to settle contested design decisions, find the source of a false rule, and design data structures or interfaces around observable behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nwave-ai/nwave/nw-algebraic-design-protocol
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.

Any agent
npx skills add nWave-ai/nWave --skill nw-algebraic-design-protocol
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

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 nw-algebraic-design-protocol

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-algebraic-design-protocol/github.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-algebraic-design-protocol)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-algebraic-design-protocol"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-algebraic-design-protocol/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 nw-algebraic-design-protocol

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-algebraic-design-protocol"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-algebraic-design-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 677 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.00033 $0.00677
Opus 5.5 $0.00013 $0.00271
Sonnet 5.5 $0.00007 $0.00135
Haiku 4.5 $0.00003 $0.00068

Measured 17d ago against content hash f0bc0743ee6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nw-algebraic-design-protocol 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 17d 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.

nWave/skills/nw-algebraic-design-protocol/SKILL.md · 38 lines

How it starts

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

Observations, equality, laws

Decide before writing

  1. List what a user can observe: each observation, its result type, and what it cannot distinguish. Do this before any constructor.
  2. Define equality x ≈ y as agreement under those observations, not structural equality of the representation. For a command that authors only part of an aggregate, compare that part only.
  3. Check that the observations tell the plausible wrong implementation apart from the right one; if not, add the missing observation or stimulus, not more examples.
  4. Keep persistence, tree shape, cache and optimisation out of the public operations and observations. Put canonical reductions in smart constructors.
  5. Build a deliberately obvious reference encoding first.

Write

  1. After each constructor, write at least one law relating it to an observation or to another constructor, and a test for it.
  2. Test each law with generated inputs (or a table for a finite domain) through the public surface, such that a plausible wrong implementation fails it. State generator reach and size bounds.
  3. A law with ignored arguments, many exceptions or flags means two fused concepts; split them before choosing a representation.
  4. When a law fails, the carrier usually cannot express it (order-insensitive composition over an ordered list). Replace the carrier or retract the law. Never add a special case or guard over an unchanged representation to pass the input while the law stays false.
  5. Before adopting a replacement carrier, run the stated laws against the reference encoding over generated inputs that include the refuting case; confirm every consumed observation survives (an unordered carrier must still give the deterministic order a consumer needs).
  6. Keep a counterexample that expresses required behaviour as a regression test, with its refuting input. Record a tempting but false law as refuted, not deleted.
  7. When a counterexample survives a repair, restate the family law and enumerate its interpreters before patching another instance.
  8. When changing a representation, state old and new observation sets and the equivalence claim first. Then test encode-then-decode and decode-then-encode at the declared equality against the independent reference, including the input that refuted the old one. For a mapping over an operation, test identity and composition preservation.
  9. Name the runtime operation and observation for each model operation. If concrete activity (an attempted payment, an issued id) is invisible to the model, extend the observation or narrow the claim; a model proof alone is not a runtime guarantee, so say what the model does not cover.
  10. Passing generated checks is evidence, not proof; say which you have.

Read the full file on GitHub · 38 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. 17d ago Changed · -131 lines · -63 tokens per session f0bc0743ee6b
  2. 27d ago First seen · 169 lines · 96 tokens per session scan A 787e297a9742

Subscribe to this mod's changes

nw-algebraic-design-protocol is a skill published in the GitHub repository nWave-ai/nWave (636 stars, last pushed 11d ago), licensed MIT. It adds 33 tokens to every session and 677 once invoked, about $0.0001 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-11-03.

Related

nw-algebraic-design-protocol compared with skills from other repositories

nw-algebraic-design-protocol next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nw-algebraic-design-protocolnWave-ai/nWaveSkill63611d agoMITA33Claude Code, Codex
behavior-contracta5c-ai/babysitterSkill1.9k29d agoMITA25Claude Code
debug-flowDVNghiem/FlowDeckSkill4415d agoMITA34Claude Code, Codex
hk-rcadeepklarity/harness-kitSkill10820d agoMITA115Claude Code
debuggingInsajin/autopus-adkSkill1112mo agoMITA16Claude Code, Codex
team-fixbostonaholic/teamSkill118d agoMITA31Claude Code, Codex
investigatevictusfate/scaffoldSkill73d agoMITA85Claude Code, Codex