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 chandrudp29/skillhub --skill typescript-patternsgit clone --depth 1 https://github.com/chandrudp29/skillhubWrote 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/chandrudp29/skillhub/typescript-patterns)<a href="https://agentmods.dev/skills/chandrudp29/skillhub/typescript-patterns"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/typescript-patterns/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/chandrudp29/skillhub/typescript-patterns"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/typescript-patterns.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.00030 | $0.00763 |
| Opus 5.5 | $0.00012 | $0.00305 |
| Sonnet 5.5 | $0.00006 | $0.00153 |
| Haiku 4.5 | $0.00003 | $0.00076 |
Grade A, and why
typescript-patterns 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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to Use
Apply when writing, reviewing, or refactoring any TypeScript code. Works for Node.js backends, React frontends, and full-stack projects.
Core Rules
- Always use
strict: truein tsconfig — never disable it to fix an error - Prefer
typefor unions and intersections,interfacefor object shapes that extend - Use
unknownoveranyat boundaries; narrow with type guards before use - Never use
ascasts to silence errors — fix the type instead - Avoid
!non-null assertions unless you've verified the value exists
Type Design
// Discriminated unions over boolean flags
type Result<T> =
| { success: true; data: T }
| { success: false; error: string };
// Utility types — use them, don't reinvent
type UserPreview = Pick<User, 'id' | 'name' | 'email'>;
type PartialConfig = Partial<Config>;
type ReadonlyUser = Readonly<User>;
// Branded types for semantic safety
type UserId = string & { readonly __brand: 'UserId' };
type EmailAddress = string & { readonly __brand: 'EmailAddress' };
// Const assertions for literal inference
const ROLES = ['admin', 'editor', 'viewer'] as const;
type Role = typeof ROLES[number]; // 'admin' | 'editor' | 'viewer'
Generics
// Constrain generics — never leave them open if you can help it
function first<T>(arr: readonly T[]): T | undefined {
return arr[0];
}
// Conditional types for inference
type Awaited<T> = T extends Promise<infer U> ? U : T;
// Template literal types for string APIs
type EventName = `on${Capitalize<string>}`;
Runtime Safety
// Type guards at system boundaries
function isUser(value: unknown): value is User {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
typeof (value as User).id === 'string'
);
}
// Zod for schema validation at API boundaries
import { z } from 'zod';
const UserSchema = z.object({ id: z.string(), email: z.string().email() });
type User = z.infer<typeof UserSchema>;
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 · 102 lines · 30 tokens per session scan A 104b2e86698e
typescript-patterns is a skill published in the GitHub repository chandrudp29/skillhub (14 stars, last pushed 5mo ago), licensed MIT. It adds 30 tokens to every session and 763 once invoked, about $0.0001 per session on Opus 5.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-30.
typescript-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| typescript-patternschandrudp29/skillhub | Skill | 14 | 5mo ago | MIT | A | 30 | Claude Code, Codex |
| typescript-expertpersonamanagmentlayer/pcl | Skill | 47 | 1mo ago | Apache-2.0 | A | 40 | Claude Code |
| adding-a-commandcaliber-ai-org/ai-setup | Skill | 1.3k | 2mo ago | MIT | A | 76 | Claude Code, Codex |
| code-review-typescriptsoulcodex/agentic | Skill | 10 | 2d ago | MIT | A | 71 | Claude Code, Codex |
| implement-parse-listzernie/vigiles | Skill | 18 | today | MIT | A | 11 | Claude Code |
| jest-expertpersonamanagmentlayer/pcl | Skill | 47 | 1mo ago | Apache-2.0 | A | 65 | Claude Code |
| typescript-docspledgeandgrow/pledge-skills | Skill | 11 | 4mo ago | MIT | A | 79 | Claude Code, Codex |