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 kok-o/koko-contextos-agents --skill typescriptgit clone --depth 1 https://github.com/kok-o/koko-contextos-agentsWrote 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/kok-o/koko-contextos-agents/typescript)<a href="https://agentmods.dev/skills/kok-o/koko-contextos-agents/typescript"><img src="https://agentmods.dev/badge/skills/kok-o/koko-contextos-agents/typescript.svg" alt="Measured on agentmods" 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.00010 | $0.00739 |
| Opus 5 | $0.00005 | $0.00369 |
| Sonnet 5 | $0.00002 | $0.00148 |
| Haiku 4.5 | $0.00001 | $0.00074 |
Grade A, and why
TypeScript scanned grade A with 0 findings 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 6d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript
Overview
A brief summary of what the skill does and its core philosophy.
When to Use
Context for when this skill is applicable.
Negative Constraints (What NOT to Do)
- NEVER use
any: Useunknownwith type guards, discriminated unions, or Zod schemas. - NEVER use type assertions (
as Typeoras unknown as Type) to bypass safety: Fix the underlying type signature or use runtime narrowing (instanceof,typeof,in). - NEVER use non-null assertions (
foo!.bar): Handlenullandundefinedwith optional chaining (?.) or explicit error guards. - NEVER export mutable global arrays or object constants: Always mark constant objects and arrays with
as constandreadonly. - NEVER omit explicit return types on exported functions: Exported public APIs must declare explicit return types to protect consumers.
Rules & Patterns
Strict Mode
Always use strict TypeScript configuration:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
}
}
Types
- Prefer
interfacefor object shapes,typefor unions/intersections - No
any— useunknownif type is truly unknown, then narrow - Explicit return types for exported functions
- Const assertions —
as constfor literal types
// Good
interface User {
id: string;
name: string;
role: 'admin' | 'user';
}
// Unions
type Result<T> = { ok: true; data: T } | { ok: false; error: string };
Utility Types
Partial<T>— all properties optionalRequired<T>— all properties requiredPick<T, K>— select specific propertiesOmit<T, K>— remove specific propertiesRecord<K, V>— key-value map
Type Guards
function isUser(value: unknown): value is User {
return typeof value === 'object' && value !== null && 'id' in value;
}
Generic Patterns
// Repository pattern
interface Repository<T extends { id: string }> {
findById(id: string): Promise<T | null>;
create(data: Omit<T, 'id'>): Promise<T>;
update(id: string, data: Partial<T>): Promise<T>;
delete(id: string): Promise<void>;
}
What ships with it
5 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.
- 6d ago First seen · 113 lines · 10 tokens per session scan A e9455cf5fefa
TypeScript is a skill published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed 2d ago), licensed MIT. It adds 10 tokens to every session and 739 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
typescript-language
Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.
typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling.
typescript-best-practices
Write idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic.
date-threshold-arithmetic
Date comparisons at thresholds fail due to fractional days.
inline-lambda-functions
How to eliminate verbose multi-line helper boilerplate by using concise inline lambda expressions and arrow functions, cutting callback token generation by 55%.
inline-type-signatures
How to enforce native language type hints (TypeScript syntax, Python PEP 484) while stripping duplicate JSDoc/Sphinx @param docstrings, eliminating 40% of signature token bloat.