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.
git 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/rules/kok-o/koko-contextos-agents/typescript)<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/typescript"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/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/rules/kok-o/koko-contextos-agents/typescript"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/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.00000 | $0.01207 |
| Opus 5.5 | $0.00000 | $0.00483 |
| Sonnet 5.5 | $0.00000 | $0.00241 |
| Haiku 4.5 | $0.00000 | $0.00121 |
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 3mo 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 — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: TypeScript
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
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.
- 3mo ago First seen · 181 lines · 0 tokens per session scan A f5e224d4fdea
typescript is a cursor rule published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,207 tokens. 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.
typescript compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| typescriptkok-o/koko-contextos-agents | Cursor rule | 2 | 2mo ago | MIT | A | 0 | Cursor |
| typescript-type-safetypr-pm/prpm | Cursor rule | 125 | 1mo ago | MIT | A | 35 | Cursor |
| hatch3r-typescript-patternshatch3r/hatch3r | Cursor rule | 26 | 2mo ago | MIT | A | 0 | Cursor |
| best-practicesofershap/typescript-best-practices | Cursor rule | 9 | 9mo ago | MIT | A | 174 | Cursor |
| general-typescript-ruleyujiosaka/knowhub | Cursor rule | 41 | 1y ago | MIT | A | 0 | Cursor |
| typescript-styleDXHeroes/mcp-devtools | Cursor rule | 13 | 1y ago | MIT | A | 410 | Cursor |
| javascript-vulnerable-outdated-componentsabderrahimghazali/cursor-rules | Cursor rule | 2 | 1y ago | MIT | A | 3,368 | Cursor |