typescript-conventions

typescript-conventions is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 110 tokens per session (2,197 once invoked), scanned A, original, Apache-2.0.

A set of instructions for keeping TypeScript code consistent with a repository's existing conventions. TypeScript is a programming language that adds checks and structure to JavaScript.

In plain words
What is it for?
Use it when an agent is writing or reviewing TypeScript code in a specific repository.
Why use it?
It helps an agent follow the project's established style instead of introducing inconsistent patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when an agent is writing or reviewing TypeScript code in a specific repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/typescript-conventions
Install

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.

Any agent
npx skills add tmj-90/gaffer --skill typescript-conventions
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for typescript-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/typescript-conventions/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/typescript-conventions)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/typescript-conventions"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/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.

agentmods 80×15 button for typescript-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/typescript-conventions"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/typescript-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,197 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.02197
Opus 5.5 $0.00044 $0.00879
Sonnet 5.5 $0.00022 $0.00439
Haiku 4.5 $0.00011 $0.00220

Measured 20d ago against content hash 08b30aa2b21e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 20d 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.

runner/skills/typescript-conventions/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write idiomatic, strict TypeScript

TypeScript protects you only as far as its types are honest: strict mode on, external data validated rather than cast, and every promise awaited or handled. For the builder and the reviewer of a TS/JS diff; the repo's config and existing code win over it. UI framework patterns live in their own packs (the react-patterns skill, the frontend packs).

Procedure

  1. Discover the repo's conventions first. Call search_lore for TS conventions. Read tsconfig*.json (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, module/moduleResolution, verbatimModuleSyntax, erasableSyntaxOnly), the TypeScript version (6.0 turned strict on by default and deprecated baseUrl, moduleResolution: node; 7.0 removed them and ships the native tsc), package.json (type, scripts, engines, packageManager), the lockfile that names the package manager (package-lock.json npm, pnpm-lock.yaml, yarn.lock, bun.lock), eslint.config.* or biome.json, Prettier config, the test runner config, and workspace tooling (turbo.json, nx.json). Copy a sibling module and its test.
  2. Pin the exact commands from package.json scripts and CI (the run-tests and run-lint skills). Use the defaults below only when the repo defines none.
  3. Write the change with the idioms below, then walk the concurrency section for every promise, shared object, stream, timer, file and outbound call you touched.
  4. Test each acceptance criterion's own behaviour. One test per AC that fails without your change, plus its error path. If the AC involves shared state or persistence, add a test that fires N concurrent requests (Promise.all over the real handler) and asserts the invariant — Node interleaves at every await, so single-threaded code still races.
  5. Verify, then stop. Done when: the type check, lint and format check are clean with no new suppressions, tests (with the repo's coverage gate) are green, and every AC has a test. Record the output with the record-evidence skill; the runner submits the work.

Read the full file on GitHub · 125 lines

Changes

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.

  1. 20d ago Changed · +58 lines · +33 tokens per session 08b30aa2b21e
  2. 22d ago Changed e7de0cb16fa4
  3. 1mo ago Changed · +55 lines · +61 tokens per session 64861add4de4
  4. 1mo ago First seen · 12 lines · 16 tokens per session scan A 1cbac80291b8

Subscribe to this mod's changes

typescript-conventions is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 20d ago), licensed Apache-2.0. It adds 110 tokens to every session and 2,197 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

debugging-typescript-errors

Systematically investigates TypeScript compiler errors, traces the real type mismatch, and applies a minimal verified fix. Use when the user wants to debug TypeScript type errors.

dork-labs/dorkos · 39 tokens

sota-javascript-typescript

State-of-the-art JavaScript and TypeScript engineering (2026) for both writing and auditing code. Covers strict TypeScript configuration and type design, language idioms and pitfalls, async patterns, Node.js backends, JS/TS-specific security (XSS, prototype pollution, supply chain, injection), frontend/React and Node…

martinholovsky/SOTA-skills · 133 tokens

generics-mastery

Master TypeScript generics for reusable, type-safe abstractions. Use when the user works with generic constraints, conditional types, mapped types, the infer keyword, utility types, recursive types, or needs help building type-safe libraries, APIs, or data structures.

VersoXBT/claude-initial-setup · 57 tokens

type-patterns

Advanced TypeScript type patterns for modeling complex domains safely. Use when the user needs discriminated unions, branded types, template literal types, type guards, exhaustive checking, const assertions, or is designing type-safe APIs and domain models.

VersoXBT/claude-initial-setup · 50 tokens

strict-typescript

Enforce strict TypeScript compiler settings and type narrowing patterns. Use when the user creates a new TypeScript project, configures tsconfig.json, encounters null/undefined errors, deals with indexed access issues, or asks about strict mode, type safety, or narrowing techniques.

VersoXBT/claude-initial-setup · 58 tokens

typescript-expert

TypeScript expert for type system, generics, utility types, and strict mode patterns.

ginkida/rustyhand · 21 tokens