- How you use it
- You ask for it
- What it can do
- installs software · writes files · network · runs shell
- What's inside
The option
| Option | ASkill · v0.1.0+0b6ebee.wwfix.1+wwfix.2gdp-ts skill: authorization checks in TypeScript |
|---|---|
| How you use it | You ask for it |
| What it can do | installs software · writes files · network · runs shell |
| What's inside |
What this thread does
As of November 2026, gdp-ts can make authorization omissions type errors with strict compiler checks, but its lint presets have a documented bypass (issue #16, defineProof re-export) and compiler-setting gaps (coygeek, 5 October). Do first: enable compilerOptions.strict in tsconfig.json and review trusted proof factories.
What it is
Guillermo Rauch introduced gdp-ts on 5 Oct 2026: a small library, linter and skill that brings the "Ghosts of Departed Proofs" pattern (known from Haskell) to TypeScript. His argument: agents write more code than people can review, and they cope well with strict compile-time rules that humans found tedious.
How it works, in three steps:
1. Name values. name(viewer.id, projectId, async (user, project) => ...) gives each value a compile-time-only name inside the callback. 2. Prove facts about names. One small trusted module per fact, in proofs/, runs the check and returns a proof such as UserIsProjectAdmin<U, P> or null. Only that trusted module should create it; the current linter has a re-export bypass described below. 3. Demand proofs. The sensitive function takes the named id and the proof. With strict compiler settings, a raw id, no proof, or a proof about a different project is a type error.
The proofs are frozen { kind } objects at runtime (with tiny wrappers around the named ids); the ESLint and Oxlint presets aim to stop people and agents from faking a proof with as or minting one outside proofs/; they are not a complete boundary against forged proofs.
The skill
skills/gdp-ts tells the agent what to do when it adds or changes authorization: brand the id, reuse or add a proof module, change the sensitive function's signature and let the compiler list the call sites, check other trusted values (tokens, ids in the body) against the resource they unlock, and make plan or state preconditions proofs too. Its references cover the six-step recipe, common errors, limits and "where to stop".
When to use it
TypeScript backends where a missed await assertCanX(...) would be an incident: multi-tenant data, billing entitlements, admin actions. Adopt it per sensitive function; the rest of the codebase is untouched.
Alternatives
- Hand-rolled branded types give part of this without proofs tied to specific values.
- Runtime policy libraries (CASL, Oso, Cerbos) centralise rules but do not make a skipped check a compile error.
- Scanners and security review skills look for missing checks after the fact; see the thread on catching security bugs in agent-written code.
Caveats (as of October 2026)
- Very young: repo created 4 Oct 2026; npm
@gdp-ts/coreis 0.1.0. Lint fixes for forging a proof withoutaslanded on 6–7 Oct, after 0.1.0 was published, so the npm preset may not include them yet. - TypeScript 5.4 or newer. TypeScript only.
- It only protects functions you convert, and the proof modules themselves must be correct. It is not a theorem prover.
- The README's
npx skills add rauchg/gdp-tsinstalls the latest commit; the steps below pin one.
Required compiler settings and open lint gaps
coygeek reported on 5 October 2026 that documented rejection cases compile when strictNullChecks or strictFunctionTypes is disabled (open issue #14). Set compilerOptions.strict to true in tsconfig.json, or enable both individual flags; keep the compiler and lint checks in CI.
The same reporter demonstrated that re-exporting defineProof through a local module bypasses both lint presets and allows minting outside proofs/ (open issue #16, 5 October 2026). Review proof factories and re-exports as trusted security code. The npm metadata still lists 0.1.0 on 3 November; do not assume the post-publication repository fixes are in that package. These are public upstream reproductions, not WhatWorks lab or ticketed trials.
Not for: reviewing agent code for security bugs by hand (security-review-agent-written-code), pentesting a running app.
checked 2026-11-03
Started from a post by @rauchg, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.