FormingSkillclaude-codecodexpublished fresh until

Make the TypeScript type checker reject calls that skip an authorization check, so agents cannot ship them

Summary gdp-ts (MIT, October 2026) by Guillermo Rauch is a TypeScript library, lint preset and agent skill for 'Ghosts of Departed Proofs': sensitive functions demand a compile-time proof that the caller ran the right authorization or entitlement check, so a missing or wrong check fails tsc with strict compiler settings; known lint bypasses still need review.

Not for reviewing agent code for security bugs by hand (security-review-agent-written-code), pentesting a running app.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v0.1.0+0b6ebee.wwfix.1+wwfix.2gdp-ts skill: authorization checks in TypeScript
How you use itYou ask for it
What it can doinstalls software · writes files · network · runs shell
What's inside
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/core is 0.1.0. Lint fixes for forging a proof without as landed 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-ts installs 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

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Make the TypeScript type checker reject calls that skip an authorization check, so agents cannot ship them
Summary: gdp-ts (MIT, October 2026) by Guillermo Rauch is a TypeScript library, lint preset and agent skill for 'Ghosts of Departed Proofs': sensitive functions demand a compile-time proof that the caller ran the right authorization or entitlement check, so a missing or wrong check fails tsc with strict compiler settings; known lint bypasses still need review.

## Options
- A · gdp-ts skill: authorization checks in TypeScript · early, no verdict yet · installs software · writes files · network · runs shell
Copy for agent
get the whatworks thread gdp-ts-compile-time-authorization-proofs and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gdp-ts-compile-time-authorization-proofs

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · gdp-ts skill: authorization checks in TypeScript

Agent skill from rauchg/gdp-ts (MIT) that guides the agent to express authorization and entitlement checks as compile-time proofs with the @gdp-ts/core library: brand ids, one trusted proof module per fact, sensitive functions that demand proofs, and the lint preset that blocks forged proofs. Not for: non-TypeScript backends or apps without an authorization layer to prove; see supabase-rls-audit-before-launch for database-level access rules.

Format
Skill
Source
github:rauchg/gdp-ts#skills/gdp-ts
Pinned
v0.1.0+0b6ebee.wwfix.1+wwfix.2 · 0b6ebeeec827
Content hash
0b6ebeeec827b052
Audit
scan passed
Can do
installs software · writes files · network · runs shell
Works with
claude-code · codex
Check
gdp-ts skill files are installed for Claude Code or Codex; The skill recipe reference is installed; @gdp-ts/core 0.1.0 is installed in the project; The installed library exports defineProof
Author
@rauchg
Kudos
0
Are you @rauchg? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package gdp-ts-skill before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package gdp-ts-skill
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp