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 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/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/pau-vega/devkit-ai/typescript-conventions"><img src="https://agentmods.dev/badge/skills/pau-vega/devkit-ai/typescript-conventions.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.00066 | $0.01807 |
| Opus 5.5 | $0.00026 | $0.00723 |
| Sonnet 5.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 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 — 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.
- 3mo 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 3mo ago), licensed MIT. It adds 66 tokens to every session and 1,807 once invoked, about $0.0003 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-31.
typescript-conventions compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| typescript-conventionspau-vega/Devkit-AI | Skill | 2 | 3mo ago | MIT | A | 66 | Claude Code |
| better-authsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 53 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 41 | Claude Code |
| bun-bundlersecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 90 | Claude Code |
| bun-hot-reloadingsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 42 | Claude Code |
| jest-generatorsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 43 | Claude Code |
| pulumi-best-practicespulumi/agent-skills | Skill | 82 | yesterday | Apache-2.0 | A | 92 | Claude Code, Codex |