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.
curl -O https://raw.githubusercontent.com/kelesmert/turnlens/main/.agents/skills/typescript-best-practices/SKILL.mdgit clone --depth 1 https://github.com/kelesmert/turnlensWrote 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/kelesmert/turnlens/typescript-best-practices)<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.
<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>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.00088 | $0.03315 |
| Opus 5 | $0.00044 | $0.01657 |
| Sonnet 5 | $0.00018 | $0.00663 |
| Haiku 4.5 | $0.00009 | $0.00331 |
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.
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
- Inspect the project before changing code.
- Preserve existing behavior unless the task explicitly requests a behavior change.
- Follow repository conventions when they are deliberate and type-safe.
- Prefer simple types and direct code over clever abstractions.
- Validate untrusted data at runtime; TypeScript types do not validate runtime values.
- Run the project's existing type-check, lint, test, and build commands after changes.
When to Apply
Apply this skill when:
- Generating or reviewing
.tsor.tsxfiles - 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 scriptstsconfig.jsonand 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:
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.
- 9d ago First seen · 451 lines · 88 tokens per session scan A dce3b012e3f7
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.
Other skills, from other repositories
typescript-strict
Always enable strict mode. Use this tsconfig.json base.
coding-standards
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
coding-best-practices
Reviews Swift/iOS code for adherence to modern Swift idioms, Apple platform best practices, architecture patterns, and code quality standards. Use when user mentions best practices, code review, clean code, refactoring, or wants to improve code quality.
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.