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.
npx skills add ndisisnd/cook --skill typescriptgit clone --depth 1 https://github.com/ndisisnd/cookWrote 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.
[](https://agentmods.dev/skills/ndisisnd/cook/typescript)<a href="https://agentmods.dev/skills/ndisisnd/cook/typescript"><img src="https://agentmods.dev/badge/skills/ndisisnd/cook/typescript/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.
<a href="https://agentmods.dev/skills/ndisisnd/cook/typescript"><img src="https://agentmods.dev/badge/skills/ndisisnd/cook/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.01592 |
| Opus 5.5 | $0.00018 | $0.00637 |
| Sonnet 5.5 | $0.00009 | $0.00318 |
| Haiku 4.5 | $0.00005 | $0.00159 |
Grade A, and why
typescript scanned grade A with 1 finding 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 1mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- Shell string interpolation with untrusted input (`execSync(\`cmd ${userInput}\`)`) How it starts
The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Standards
Default load: this file only. Pull refs/tooling.md, refs/testing.md, or refs/security.md only when the task explicitly needs that depth.
Priority: P0 — Type Correctness
Type Annotations
- Explicit params and return types on all public declarations. Infer locals.
- Avoid
any. Preferunknown, generics, or a narrowly-scoped escape hatch with a comment when interop forces it. - Never use the
Functiontype. Use a typed signature:() => void.
Interfaces vs Types
interfacefor object shapes that describe APIs — supports declaration merging.typefor unions, intersections, mapped types, and conditional types.
Strict Mode
strict: truein tsconfig. On existing repos, migrate incrementally:strictNullChecks→noImplicitAny→strictFunctionTypes. Never flipstrict: truein one step.- Avoid non-null assertion (
!). Use narrowing (typeof,instanceof, if-checks) instead. ?.and??for null safety — use narrowing, not!.
Enums
- Literal unions or
as constobjects. No runtimeenum.
Generics
- Use generics for reusable, type-safe code. Constrain with
extendswhere appropriate.
Type Guards
- Use
typeof,instanceof, and predicate functions (x is T) to narrow types.
Utility Types
- Prefer built-ins:
Partial,Required,Pick,Omit,Record,Readonly,NonNullable. - Prefer
satisfiesfor object literals that must conform to a contract without widening the inferred type.
Immutability
readonlyon arrays and object properties. Useas constandsatisfiesfor const assertions.
Discriminated Unions
- Use a stable discriminant such as
kindortypeto narrow safely. Switch on the discriminant.
type Result<T> = { kind: 'ok'; data: T } | { kind: 'err'; error: Error };
Branded Types
- Use brands only when structurally identical values such as IDs or units are easy to mix up across boundaries.
type UserId = string & { readonly __brand: 'UserId' };
function createUserId(id: string): UserId { return id as UserId; }
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 176 lines · 46 tokens per session scan A 41e60de7d7b0
typescript is a skill published in the GitHub repository ndisisnd/cook (2 stars, last pushed 2mo ago), licensed MIT. It adds 46 tokens to every session and 1,592 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
nestjs-expert
Creates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating…
typescript-pro
Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety…
electron-dev
Electron desktop apps with React, TypeScript, and Vite. Use for IPC, window/tray, PTY terminals, WebRTC, and packaging.
kysely
Guidelines for developing with Kysely, a type-safe TypeScript SQL query builder with autocompletion support.
deno-typescript
Guidelines for developing with Deno and TypeScript using modern runtime features, security model, and native tooling.
drizzle-orm
Guidelines for developing with Drizzle ORM, a lightweight type-safe TypeScript ORM with SQL-like syntax.