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 agentmods add skills/hoangatg/ai-agent-toolkit/typescript-expertnpx skills add hoangatg/ai-agent-toolkit --skill typescript-expertgit clone --depth 1 https://github.com/hoangatg/ai-agent-toolkitWrote 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/hoangatg/ai-agent-toolkit/typescript-expert)<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/typescript-expert"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/typescript-expert.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.00039 | $0.00811 |
| Opus 5 | $0.00019 | $0.00405 |
| Sonnet 5 | $0.00008 | $0.00162 |
| Haiku 4.5 | $0.00004 | $0.00081 |
Grade A, and why
typescript-expert 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 yesterday.
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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Expert
Types are documentation that the compiler enforces.
1. Type System Mastery
Utility Type Selection
| Need | Utility Type |
|---|---|
| Make all optional | Partial<T> |
| Make all required | Required<T> |
| Make all readonly | Readonly<T> |
| Pick specific keys | Pick<T, K> |
| Remove specific keys | Omit<T, K> |
| Extract from union | Extract<T, U> |
| Exclude from union | Exclude<T, U> |
| Get return type | ReturnType<T> |
| Get parameter types | Parameters<T> |
| Non-nullable | NonNullable<T> |
| Get awaited type | Awaited<T> |
2. Advanced Generics
Constrained Generics
| Pattern | Use When |
|---|---|
<T extends object> |
Must be object type |
<T extends string> |
String literal types |
<T extends keyof U> |
Key of another type |
<T extends (...args) => any> |
Must be function |
Generic Inference
| Principle | Application |
|---|---|
| Infer from usage | Let TS infer when possible |
| Constrain, don't assert | Use extends, not as |
| Default types | <T = string> for convenience |
| Multiple generics | <TInput, TOutput> when needed |
3. Conditional Types
Pattern
type Result<T> = T extends string ? StringResult : OtherResult
Common Patterns
| Pattern | Purpose |
|---|---|
T extends infer U ? ... : ... |
Extract nested types |
| Distributive conditionals | Apply to each union member |
| Mapped conditional | Transform object types |
| Template literal types | String manipulation at type level |
4. Type-Safe Patterns
Discriminated Unions
| Component | Purpose |
|---|---|
| Tag field | Common literal field for discrimination |
| Exhaustive check | never for unhandled cases |
| Type narrowing | Automatic narrowing in switch/if |
Branded Types
| Use Case | Pattern |
|---|---|
| Prevent ID mixing | type UserId = string & { _brand: 'UserId' } |
| Unit safety | type Pixels = number & { _brand: 'Pixels' } |
| Validation proof | type ValidEmail = string & { _brand: 'ValidEmail' } |
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.
- yesterday First seen · 117 lines · 39 tokens per session scan A 111d194ac54a
typescript-expert is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 39 tokens to every session and 811 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
coding-standards
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
effective-typescript
Review existing TypeScript code and write new TypeScript following the 62 items from "Effective TypeScript" by Dan Vanderkam. Use when writing TypeScript, reviewing TypeScript code, working with type design, avoiding any, managing type declarations, or migrating JavaScript to TypeScript. Trigger on: "TypeScript best…
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
springboot-patterns
Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.
python-patterns
Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.
om-integration-tests
Run and create QA integration tests (Playwright TypeScript), including executing the full suite, converting optional markdown scenarios, and generating new tests from specs or feature descriptions. Defers all environment boot/reuse to the om-prepare-test-env skill and attaches to the shared descriptor it writes. Use…