Reference
The cubek-ts subset
For your agentCopy this and give it to the AI you're building with.
Run `cubek skill`, read all of it and follow it exactly (no CLI: download https://cubek.dev/SKILL.md verbatim with curl; don't summarize it); when you write any TypeScript for this project, follow its "The cubek-ts subset" section. Run `cubek check` after every edit until it is clean.
cubek check rejects (with the fix) server npm, node:*, process,
Buffer, any, .then (await, Promise.all), timers, obj[key] on fixed
fields (Record<"a" | "b", T> too; arr[i], Record<string, T> fine), for...in, delete, user generics,
Intl, local-time Date, URL, Object.groupBy, reading unknown...
Untrusted data (JSON.parse, caught errors) is checked, never cast as T:
input.safeParse(JSON.parse(text)) or narrow (Array.isArray(v),
"k" in v, e instanceof Error). Not taught by an error:
| Not in cubek-ts | Use |
|---|---|
class E extends Error | return { ok: false, error } |
getUTCSeconds | slice toISOString() |
className, page onClick, dangerouslySetInnerHTML | class, a mount point or form, raw(...) |
Annotate the return types of named functions.