turnlens: Skill for Claude Code

.agents/skills/typescript-best-practices/SKILL.md

typescript-best-practices is a skill for Claude Code, Codex from kelesmert/turnlens. It costs 88 tokens per session (3,315 once invoked), scanned A, original, MIT.

A set of practices for writing, reviewing, refactoring, and designing TypeScript code. TypeScript adds checks to JavaScript code, while the guidance also covers compiler settings, module boundaries, errors, and public interfaces.

In plain words
What is it for?
Use it when creating or changing .ts or .tsx files, designing modules or APIs, improving type safety, configuring the compiler, or converting JavaScript to TypeScript.
Why use it?
It helps keep TypeScript safe and maintainable while preserving existing behavior. It also reminds developers to validate incoming data at runtime and run the project's checks after changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is kelesmert/turnlens's own configuration. It tells Claude Code and Codex how to work on turnlens itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything turnlens configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kelesmert/turnlens. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kelesmert/turnlens/main/.agents/skills/typescript-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kelesmert/turnlens

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-best-practices

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelesmert/turnlens/typescript-best-practices"><img src="https://agentmods.dev/badge/skills/kelesmert/turnlens/typescript-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,315 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.00088 $0.03315
Opus 5 $0.00044 $0.01657
Sonnet 5 $0.00018 $0.00663
Haiku 4.5 $0.00009 $0.00331

Measured 9d ago against content hash dce3b012e3f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

typescript-best-practices 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 9d 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.

.agents/skills/typescript-best-practices/SKILL.md · 451 lines

How it starts

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

TypeScript Best Practices

Produce TypeScript that is safe, maintainable, consistent with the repository, and appropriate for the target runtime.

Operating Principles

  1. Inspect the project before changing code.
  2. Preserve existing behavior unless the task explicitly requests a behavior change.
  3. Follow repository conventions when they are deliberate and type-safe.
  4. Prefer simple types and direct code over clever abstractions.
  5. Validate untrusted data at runtime; TypeScript types do not validate runtime values.
  6. Run the project's existing type-check, lint, test, and build commands after changes.

When to Apply

Apply this skill when:

  • Generating or reviewing .ts or .tsx files
  • Designing modules, services, libraries, or public APIs
  • Refactoring JavaScript to TypeScript
  • Improving type safety or compiler configuration
  • Modeling domain states, errors, or external data
  • Answering questions about TypeScript types and patterns

This skill may be used alongside framework-specific guidance. Framework conventions take precedence for framework architecture, while these rules still apply to the TypeScript itself.

Do not treat this skill as the primary debugging workflow for runtime-only failures. Use debugging tools first, then apply this guidance when the cause involves types, unsafe boundaries, or compiler settings.

Required Workflow

1. Inspect the Repository

Before writing code, inspect relevant project files when available:

  • package.json, lockfiles, and package-manager scripts
  • tsconfig.json and extended TypeScript configurations
  • ESLint, formatter, test, and build configuration
  • Nearby modules and tests
  • Runtime and module system: Node.js, Deno, Bun, browser, ESM, or CommonJS

Do not introduce a different module-resolution style, import-extension convention, test framework, formatter, or package manager without a clear reason.

2. Identify Boundaries

Treat these as trust boundaries that require runtime validation or explicit normalization:

Read the full file on GitHub · 451 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. 9d ago First seen · 451 lines · 88 tokens per session scan A dce3b012e3f7

Subscribe to this mod's changes

typescript-best-practices is a skill published in the GitHub repository kelesmert/turnlens (2 stars, last pushed 28d ago), licensed MIT. It adds 88 tokens to every session and 3,315 once invoked, about $0.0004 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.