effect-model-audit
Skill27 starsChanged 5 days agoApache-2.0View on GitHub
Use when asked to audit the type modelling of beady-eye's Claude Code plugin — whether its domain types are honest, whether they can represent illegal states, or for a periodic model-level type review. Triggers on "audit our type modelling", "are our types honest", "can our types represent illegal states", "model-level type review", "audit our domain types". The judgement sibling to effect-native-audit: a workflow-driven reasoning sweep over the plugin's domain types, not an anchored regression net and not the Effect language service.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- CodeForBreakfast/commyedited, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- CodeForBreakfast/commy★ 210% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- effect-native-auditSkill
- renovateSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
L3 Role coherence: Do all the type's construction sites and read sites mean the same thing by it, or does it serve two roles under one name?
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Effect-model type audit
This skill sweeps the domain types of the plugin under plugin/ for
model-level dishonesty. A type is dishonest when its shape lets a caller build
a value the domain does not mean, or forces a caller to fake one. The question
is whether the type's value space matches the domain's, and whether all its
producers and consumers mean the same thing by it.
Four lenses ask about the value space, each against each family of types:
- L1 Illegal-representable. Can the type represent a value that is invalid in the domain? A combination of fields, an optional that should be required, a bare primitive admitting an out-of-domain string, or a pair of booleans with a meaningless fourth corner. Invalid state must be unrepresentable.
- L2 Under-expressive. Is there a legal domain state the type cannot represent? The missing case shows up as a sentinel, a placeholder, an impossible branch, or a comment apologising for a field that is "always absent here".
- L3 Role coherence. Do all the type's construction sites and read sites mean the same thing by it, or does it serve two roles under one name? An address a caller supplies and an observation the outside world hands back are the usual pair. The tell is a producer that can legally build a value that is illegal for some consumer's role.
- L4 Boundary honesty. At a trust boundary, does the type's role demand a
parsed-once strong representation that it lacks? Examples are a
Schema.Structwith required fields, branded members, or a refinement decoded once. Parse at boundaries, trust inside.
What it catches that the other checks cannot
Three checks cover the plugin's Effect code, and none re-reports another's findings:
| Check | Driven by | Cost | Catches |
Effect language service and the Biome rules in plugin/biome-plugins/ | a rule per line, in the plugin typecheck and lint | free, every nix flake check | what one line shows, such as a floating Effect or instanceof Error |
effect-native-audit | a grep pattern per finder | cheap, frequent | hand-rolled helpers, imperative spines, representation smells a pattern can find |
effect-model-audit | a type family and its census, reasoned about | expensive, periodic | dishonesty with no lexical anchor, such as one type serving two roles |
How it works
effect-model-audit.workflow.js runs four phases.
Discover. One agent runs a
grepthat lists every top-level type declaration inplugin/srcandplugin/hooks, exported or not, and returns the names. Tests and the shared test helpertest-watcher.tsare left out. A Schema constant counts as the type it decodes to. A second agent groups those names into families and gives each family its census: every site that builds or decodes a member, and every site that reads one.The families must partition the enumerated names exactly, and
assertPartitionchecks that. Because the list comes from one agent and the grouping from another, the check compares the grouping with a list its author did not write. If the check fails, the workflow repairs the partition and puts anything left over into anunassignedfamily, so no type escapes the audit.- Reason. One agent per family and lens reads the type definitions and the census sites and reasons about the value space. No findings is a valid result.
Verify. Each finding goes to one adversarial refuter as soon as its finder returns. The refuter cuts any finding without the evidence its lens demands:
- L1 needs a named illegal value.
- L2 needs a named missing legal state and the workaround it forces.
- L3 needs a disagreeing producer and consumer, both sites named.
- L4 needs the specific boundary.
Whether a remodelling is worth its blast radius is never grounds for refuting it. A verifier that errors keeps the finding, marked unverified.
- Synthesise. An agent writes the report, merging findings that describe
the same defect. L1 and L3 overlap by design. The confirmed and
low-confidence lists the workflow returns come from
splitSurvivors, not from the agent. It groups the findings at eachfile:linewithout dropping any, and confirms a site when any finding there is high-confidence.
Each surviving finding carries its evidence, a proposed remodelling, and its blast radius: every producer and consumer the remodelling would touch.
Running it
Install the plugin's dependencies if
plugin/node_modulesis absent, so agents can check an API against the pinned Effect:cd plugin && bun install --frozen-lockfile- Get today's date with
date +%F. Launch the workflow with the date:
Workflow({ scriptPath: '.claude/skills/effect-model-audit/effect-model-audit.workflow.js', args: { date: '<YYYY-MM-DD>' }, })It runs in the background, and you are notified when it finishes. To run one lens alone, pass
args: { date, lenses: ['L3'] }.- The workflow writes its report to
target/effect-model-audit-<date>.md, which git ignores, and returns{ confirmed[], lowConfidence[], survivors[], refutedCount, coverage, partitionOk }.
The workflow reports findings and changes no code.
Notes
domains.mdholds the lens catalogue, the modelling principles the lenses rest on, and where L4 ends and effect-native-audit begins.- The pinned Effect is the authority on its API.
plugin/package.jsonpins Effect 4. An agent names only an API that the installed copy underplugin/node_modules/effectexports. - The
LENSESarray in the workflow is the authoritative lens catalogue, because the workflow cannot read files.domains.mdmirrors it for people, so change the two together.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

