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/pau-vega/devkit-ai/typescript-conventionsnpx skills add pau-vega/Devkit-AI --skill typescript-conventionsgit clone --depth 1 https://github.com/pau-vega/Devkit-AIWrote 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/pau-vega/devkit-ai/typescript-conventions)<a href="https://agentmods.dev/skills/pau-vega/devkit-ai/typescript-conventions"><img src="https://agentmods.dev/badge/skills/pau-vega/devkit-ai/typescript-conventions.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.00066 | $0.01807 |
| Opus 5 | $0.00033 | $0.00903 |
| Sonnet 5 | $0.00013 | $0.00361 |
| Haiku 4.5 | $0.00007 | $0.00181 |
Grade A, and why
typescript-conventions 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 5d 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 — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Conventions
Types & Interfaces
Prefer interface extends over &
The & (intersection) operator has poor performance in the TypeScript compiler. Use interface extends for inheritance — it's faster and produces clearer error messages.
// Avoid
type C = A & B;
// Prefer
interface C extends A, B {}
Only use & where interface extends is not possible (e.g., combining mapped types).
Use discriminated unions for variant data
Model data that can be in different shapes with a shared discriminant field. This prevents the "bag of optionals" problem where impossible states are representable.
// Avoid — allows { status: "idle", data: someValue }
type FetchingState<TData> = {
status: "idle" | "loading" | "success" | "error";
data?: TData;
error?: Error;
};
// Prefer — each status carries exactly the right fields
type FetchingState<TData> =
| { status: "idle" }
| { status: "loading" }
| { status: "success"; data: TData }
| { status: "error"; error: Error };
Handle discriminated unions with switch statements:
const handleEvent = (event: Event) => {
switch (event.type) {
case "user.created":
console.log(event.data.email);
break;
case "user.deleted":
console.log(event.data.id);
break;
}
};
Avoid readonly unless strictly needed
Do not add readonly to properties by default. Only use it when immutability is a critical invariant that must be enforced at compile time (e.g., a shared config object that must never be mutated).
// Default — no readonly
type User = {
id: string;
name: string;
};
Prefer optional properties over T | undefined
Use prop?: T for optional properties — it's more concise and idiomatic.
// Avoid
type AuthOptions = {
userId: string | undefined;
};
// Prefer
type AuthOptions = {
userId?: string;
};
noUncheckedIndexedAccess awareness
When this tsconfig option is enabled, indexing into arrays and records returns T | undefined instead of T. Handle the undefined case — don't assume the value exists.
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.
- 5d ago First seen · 258 lines · 66 tokens per session scan A 2dead86d9f20
typescript-conventions is a skill published in the GitHub repository pau-vega/Devkit-AI (2 stars, last pushed 20d ago), licensed MIT. It adds 66 tokens to every session and 1,807 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
frontend-ai-guide
Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.
better-auth
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.
typescript-rules
React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.
bun-bundler
This skill should be used when the user asks about "bun build", "Bun.build", "bundling with Bun", "code splitting", "tree shaking", "minification", "sourcemaps", "bundle optimization", "esbuild alternative", "building for production", "bundling TypeScript", "bundling for browser", "bundling for Node", or…
bun-file-io
Use for Bun file I/O: Bun.file, Bun.write, streams, directories, glob patterns, metadata.
bun-hot-reloading
Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Covers watch mode, hot mode, and HTTP server reload.