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 KaelSensei/MagicAIBuilder --skill typescript-craftsmanshipgit clone --depth 1 https://github.com/KaelSensei/MagicAIBuilderWrote 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/kaelsensei/magicaibuilder/typescript-craftsmanship)<a href="https://agentmods.dev/skills/kaelsensei/magicaibuilder/typescript-craftsmanship"><img src="https://agentmods.dev/badge/skills/kaelsensei/magicaibuilder/typescript-craftsmanship/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/kaelsensei/magicaibuilder/typescript-craftsmanship"><img src="https://agentmods.dev/badge/skills/kaelsensei/magicaibuilder/typescript-craftsmanship.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.00218 | $0.02656 |
| Opus 5 | $0.00109 | $0.01328 |
| Sonnet 5 | $0.00044 | $0.00531 |
| Haiku 4.5 | $0.00022 | $0.00266 |
Grade A, and why
typescript-craftsmanship scanned grade A with 1 finding 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 8d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
return fetch(url); How it starts
The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Craftsmanship
This skill enforces professional-grade TypeScript, React 19, and Next.js 15 coding standards. Every piece of code you write or review must pass these rules.
The philosophy: make invalid states unrepresentable, make expensive operations obvious, and make the code read like well-written prose.
When writing complex logic, refactoring, or doing architecture work, load the appropriate reference file for deeper patterns:
references/design-patterns.md— SOLID principles, GoF patterns adapted to TS/React, anti-patterns to avoid. Read this before any refactoring session or when designing new modules/components.references/algorithms.md— Complexity analysis, data structure choices, performance patterns. Read this when optimizing, writing data transforms, or working with collections/arrays.references/react-architecture.md— React 19, Next.js 15 App Router, Zustand, TanStack Query, state management patterns. Read this when creating components, hooks, stores, or page layouts.
Core Rules — Always Active
These rules apply to every line of TypeScript you write. No exceptions.
1. Type Safety is Non-Negotiable
Zero any. Use unknown + type guards. If you think you need any, you
need a generic or a discriminated union.
// ❌ Lazy typing
function process(data: any) {
return data.name;
}
// ✅ Safe typing
function process(data: unknown): string {
if (isUser(data)) return data.name;
throw new TypeError("Expected User object");
}
Zero type assertions (as). They lie to the compiler. Use type guards,
discriminated unions, or Zod parsing instead.
// ❌ Assertion — compiles but crashes if wrong
const user = response.data as User;
// ✅ Runtime validation
const user = UserSchema.parse(response.data); // Zod: throws if invalid
Zero non-null assertions (!). Use optional chaining + nullish coalescing.
// ❌ Crashes at runtime if null
const name = user!.name;
// ✅ Safe access
const name = user?.name ?? "Anonymous";
What ships with it
3 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.
- 8d ago First seen · 330 lines · 218 tokens per session scan A 01ab4007d4b5
typescript-craftsmanship is a skill published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed yesterday), licensed MIT. It adds 218 tokens to every session and 2,656 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
nextjs-app-router
Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient/HydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.
client-setup
Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.
react-query-setup
Set up @trpc/tanstack-react-query with createTRPCContext(), TRPCProvider, useTRPC() hook, queryOptions/mutationOptions factories, query invalidation via queryClient.invalidateQueries with queryFilter, and type inference with inferInput/inferOutput.
react-query-classic-migration
Migrate from @trpc/react-query (classic) to @trpc/tanstack-react-query. Run npx @trpc/upgrade CLI for automated codemod. Manually migrate remaining patterns: hook-based to options-factory, utils.invalidate to queryClient.invalidateQueries with queryFilter, provider changes.
adapter-express
Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.