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 ushibo/brigade --skill typescript-magiciangit clone --depth 1 https://github.com/ushibo/brigadeWrote 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/ushibo/brigade/typescript-magician)<a href="https://agentmods.dev/skills/ushibo/brigade/typescript-magician"><img src="https://agentmods.dev/badge/skills/ushibo/brigade/typescript-magician.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.00108 | $0.01050 |
| Opus 5 | $0.00054 | $0.00525 |
| Sonnet 5 | $0.00022 | $0.00210 |
| Haiku 4.5 | $0.00011 | $0.00105 |
Grade A, and why
typescript-magician 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 7d 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.
This is a copy
100% identical to typescript-magician — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to use
Use this skill for:
- TypeScript errors and type challenges
- Eliminating
anytypes from codebases - Complex generics and type inference issues
- When strict typing is needed
Instructions
When invoked:
- Run
tsc --noEmitto capture the full error output before making changes - Identify the root cause of type issues (unsound inference, missing constraints, implicit
any, etc.) - Craft precise, type-safe solutions using advanced TypeScript features
- Eliminate all
anytypes with proper typing — validate each replacement still satisfies call sites - Confirm the fix compiles cleanly with a second
tsc --noEmitpass
Capabilities include:
- Advanced generics and conditional types
- Template literal types and mapped types
- Utility types and type manipulation
- Brand types and nominal typing
- Complex inference patterns
- Variance and distribution rules
- Module augmentation and declaration merging
For every TypeScript challenge:
- Explain the type theory behind the problem
- Provide multiple solution approaches when applicable
- Show before/after type representations
- Include comprehensive type tests
- Ensure full IntelliSense support
Quick Examples
Eliminating any with generics
Before
function getProperty(obj: any, key: string): any {
return obj[key];
}
After
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
return obj[key];
}
// getProperty({ name: "Alice" }, "name") → inferred as string ✓
Narrowing an unknown API response
Before
async function fetchUser(): Promise<any> {
const res = await fetch("/api/user");
return res.json();
}
After
interface User { id: number; name: string }
function isUser(value: unknown): value is User {
return (
typeof value === "object" &&
value !== null &&
"id" in value &&
"name" in value
);
}
async function fetchUser(): Promise<User> {
const res = await fetch("/api/user");
const data: unknown = await res.json();
if (!isUser(data)) throw new Error("Invalid user shape");
return data;
}
What ships with it
15 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.
- rules/array-index-access.md 4.8 KB
- rules/as-const-typeof.md 4.6 KB
- rules/builder-pattern.md 8.0 KB
- rules/conditional-types.md 6.9 KB
- rules/deep-inference.md 6.7 KB
- rules/error-diagnosis.md 7.7 KB
- rules/function-overloads.md 7.4 KB
- rules/generics-basics.md 6.9 KB
- rules/infer-keyword.md 7.1 KB
- rules/mapped-types.md 7.3 KB
- rules/opaque-types.md 6.9 KB
- rules/template-literal-types.md 7.3 KB
- rules/type-narrowing.md 8.5 KB
- rules/utility-types.md 6.5 KB
- tile.json 651 B
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.
- 7d ago First seen · 118 lines · 108 tokens per session scan A 5ae7057a8f87
typescript-magician is a skill published in the GitHub repository ushibo/brigade (1 stars, last pushed 2mo ago), licensed MIT. It adds 108 tokens to every session and 1,050 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to typescript-magician, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
typescript-best-practices
TypeScript/Node.js best practices. Use when writing or reviewing TypeScript code. Covers type safety, async patterns, and error handling.
dev-team-node
Coordinates Node.js/TypeScript development (Next.js, NestJS, Vite, Express) with a team of specialized agents and inline quality gates. Use for multi-step Node.js tasks that need decomposition and multi-agent coordination.
nest-best-practices
NestJS framework best practices and production patterns. Use whenever working with NestJS — creating modules, controllers, services, DTOs, guards, interceptors, pipes, middleware, or building REST/GraphQL/microservice APIs. Also use when setting up authentication, authorization, validation, queues, health checks…
typescript-expert
TypeScript language expertise covering the type system, generics, utility types, advanced type patterns, and project configuration. Use this skill whenever writing, reviewing, or refactoring TypeScript code, designing type-safe APIs, working with complex generics, debugging type errors, configuring tsconfig.json…
nodejs-stack
This skill should be used when working with Node.js, TypeScript, or JavaScript projects, including frameworks like Next.js, NestJS, Express, Fastify, and Vite.
node-backend
Node.js backend development patterns for Express, NestJS, Fastify, and Hono. Use when implementing APIs, authentication, middleware, services, and server-side logic with Node.js and TypeScript. Provides project structure, code patterns, and best practices.