typescript
Skill15 starsChanged 15 days agoMITView on GitHub
Language-wide TypeScript guidance for full-stack frameworks, backend services, libraries, scripts, and frontend code. Use when modeling domain states, narrowing values, designing useful generics, validating runtime boundaries, reviewing assertions or suppressions, matching compiler contracts, or improving TypeScript-specific code quality, TypeScript AST tooling, or selecting the collected TypeScript practices. Component/native wrapper props and browser-specific storage, URL, postMessage, and form behavior are outside its language-wide scope.
66 other projects use a version of this.
Adopted by
Most recently taken up by
- bbartling/open-fddtheir own version, first seen Nov 9, 2026
- TheLunchTrae/claude-code-configstheir own version, first seen Nov 8, 2026
- testdino-hq/google-styleguides-skillstheir own version, first seen Nov 8, 2026
- lobehub/lobehubtheir own version, first seen Nov 5, 2026
- its-ash/skillstheir own version, first seen Nov 1, 2026
- sentimony/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use rust, drizzle and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrust
Use this guide when working on Rust changes in the FAST monorepo.
Also in 9 projects that use this
leonaaardobSkilldrizzle
Complete Drizzle ORM documentation in markdown format. Use when working with Drizzle ORM - covers schema definition, queries, migrations, database connections (PostgreSQL, MySQL, SQLite), integrations (Neon, Supabase, PlanetScale, Cloudflare D1, Turso), column types, relations, transactions, and framework usage (Next.js, SvelteKit, Astro).
Also in 3 projects that use this
mfang0126Skilldevelopment
Full-stack development workflow skill. Guides the complete cycle from understanding requirements to shipping code via PR with Preview validation.
Also in 3 projects that use this
rogue-dev-studioSkillpython
Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.
Also in 8 projects that use this
sarukasSkillmarkdown
Convert any document format TO Markdown. Supports 14 formats (PDF, DOCX, XLSX, PPTX, HTML, CSV, EPUB, MSG, and more) via unified CLI. Use when Claude needs to read or extract text from non-Markdown files.
Also in 4 projects that use this
testdino-hqSkilljava
Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.
Also in 3 projects that use this
Other versions66 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 66
- lobehub/lobe-chat★ 84ksame name
- lobehub/lobehub★ 84ksame name
- recharts/recharts★ 28ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- scalar/scalar★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
- microsoft/fast★ 9.7ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
56 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-repoSkill
- architectSkill
- codebase-designSkill
- code-reviewSkill
- commitSkill
- create-prSkill
- create-verification-skillSkill
- debugSkill
- frontendSkill
- implementSkill
- mswSkill
- playwrightSkill
- react-hook-form-auditSkill
- react-hook-formSkill
- reactSkill
- refactorSkill
- researchSkill
- resolving-merge-conflictsSkill
- specSkill
- tailwindSkill
- tanstack-querySkill
- testSkill
- zodSkill
- auditSkill
- neovimSkill
- shell-envSkill
- teachSkill
- tilSkill
- atomic-note-to-mocSkill
- close-daySkill
- create-noteSkill
- goalsSkill
- import-goodreadsSkill
- import-meetingsSkill
- ingestSkill
- memory-recallSkill
- process-inboxSkill
- projectSkill
- save-sessionSkill
- todays-focusSkill
- vault-auditSkill
- vaultSkill
- weekly-reviewSkill
- careerSkill
- check-communicationSkill
- deslopifySkill
- standupSkill
- blogSkill
- broSkill
- docsSkill
- talkSkill
- tweet-todaySkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 52 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use TypeScript to preserve evidence: model the states the program can really reach, retain relationships through inference and generics, …
- Very specific: line 30
Read nearby code for public type, interface, and enum conventions before recommending a different form.
- Distinctive: line 33
Treat installed declarations and runtime support as the compatibility boundary.
- Distinctive: line 44
Complete when: every changed type describes a real program state and every untrusted value has a named trust boundary.
- Distinctive: line 49
Prefer the simplest total model: strengthen a type when doing so removes a demonstrated partial operation, assertion, or impossible …
- Very specific: line 56
Keep untrusted values unknown until control-flow narrowing, a complete guard, the project's existing schema convention, or a documented …
- Distinctive: line 63
Treat assertions and suppressions as local claims about evidence, not conversions.
- Distinctive: line 70
Run the repository's focused formatter, typecheck, tests, and build checks that exercise the changed contract.
- Distinctive: line 77
Use the Current skill guidance sections as the existing default.
- Distinctive: line 92
Read every reference whose trigger matches the task, not the entire collection.
“Common” is measured: kept by at least 6 in 10 of the 52 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Engineering
Use TypeScript to preserve evidence: model the states the program can really reach, retain relationships through inference and generics, and establish runtime facts before trusted use. Match the requested work; a small typed edit does not require a language-wide audit.
Workflow
1. Read the environment
Scope discovery to the changed contract. Inspect the relevant manifest, lockfile,
TypeScript version, runtime versions, tsconfig chain, framework-generated configuration,
declarations, generated clients, schema libraries, and established typecheck/test/format
scripts. Inspect runtime support for runtime features, schema APIs for decoding work, and
generated contracts when they own the changed shape; skip unrelated or absent artifacts.
Read nearby code for public type, interface, and enum conventions before recommending
a different form.
Treat installed declarations and runtime support as the compatibility boundary. Do not enable flags, add dependencies, or start migrations automatically.
Complete when: version-sensitive advice and available checks match the actual project.
2. Frame the type contract
Name the public inputs and outputs, valid states, invariants, untrusted entry points, failure paths, and interoperability constraints. Distinguish static knowledge from facts that require runtime evidence.
Complete when: every changed type describes a real program state and every untrusted value has a named trust boundary.
3. Preserve useful evidence
Prefer the simplest total model: strengthen a type when doing so removes a demonstrated partial operation, assertion, or impossible state—not by reflex. Preserve literal and relational information through inference, discriminants, and useful generics. Derive from schemas, generated contracts, and existing APIs before duplicating shapes.
4. Establish runtime facts
Keep untrusted values unknown until control-flow narrowing, a complete guard, the
project's existing schema convention, or a documented validating SDK establishes the
needed fact. Parse once at the boundary; trusted internal values normally continue as
the validated type without repeated decoding.
5. Make local evidence claims
Treat assertions and suppressions as local claims about evidence, not conversions. First diagnose missing discriminants, widened inference, incomplete declarations, or an untested boundary. Use an assertion only when the invariant is real and TypeScript cannot express it directly; keep the explanation scoped to non-obvious cases.
6. Verify the contract
Run the repository's focused formatter, typecheck, tests, and build checks that exercise the changed contract. Do not broaden types or weaken validation merely to make checks green. State what was verified and what remains runtime-dependent.
Collected practices are not automatic policy
The references document 47 collected practices; documenting a practice does not activate it.
Use the Current skill guidance sections as the existing default. Collected sections
preserve policy alternatives, examples, exceptions, and conflicts for selection.
The Decision column in references/practice-catalog.md is the single authority for
persistent adoption status. Before applying a collected practice as policy, read its catalog
entry and full section; pending or excluded entries do not introduce new review findings.
A task-specific request can select a practice for that task without changing persistent
status. Durable changes update the catalog decision and, only when needed, the affected
conditions or conflicting guidance—not a second copy of the adoption status.
Automation notes in collected sections describe optional enforcement designs, not installed checker capabilities. Verify the target project's actual tooling before configuring options; collecting or selecting a practice does not authorize a tooling installation.
References
Read every reference whose trigger matches the task, not the entire collection. Each collected practice has one canonical section; the catalog is an index, not a substitute.
| Priority | Load when | Reference |
| 1 — Critical | Domain states, discriminated unions, exhaustiveness, constructive models, brands, schema/generated type derivation, inference, or generics | references/type-modeling.md |
| 1 — Critical | External payloads, parsers, guards, schemas, validation failures, wire formats, persisted JSON, SDK results, files, IPC, environment data, database rows, or broad boundary contracts | references/runtime-boundaries.md |
| 1 — High | Assertions, chained casts, safety comments, narrowing, typeof, satisfies, reflection, suppressions, declaration gaps, interop, or compiler flags | references/assertions-and-interop.md |
| 2 — Conditional | Collection pipelines, reducers, iterator helpers, object construction, argument design, symbol naming, spacing, or syntactic code-quality findings | references/code-quality.md |
| 2 — Conditional | TypeScript module mocks, dependency-injection test seams, real dependency tests, disposal/leak checks, running-UI evidence, structured logging, or console diagnostics | references/testing-and-diagnostics.md |
| 2 — Conditional | Implementing lint rules, TypeScript AST tooling, codemods, alias/type analysis, scope resolution, or program-analysis caches | references/static-analysis.md |
| 1 — Policy check | Before applying a collected practice as policy; selecting practices, changing adoption status, comparing policy alternatives, or auditing coverage of all 47 practices | references/practice-catalog.md |
Ownership Boundary
typescriptowns language-wide modeling, narrowing, generics, runtime type evidence, assertions, compiler contracts, and TypeScript-specific code quality.- Browser component props, native wrapper contracts, DOM events, browser storage, URL
state,
postMessage, and form feedback remain frontend concerns. - Framework behavior, testing architecture, formatting policy, and performance findings remain with their established owners unless the TypeScript contract itself is the issue. The testing/diagnostics reference preserves collected practices in full for selection; it does not override those owners or authorize app runs, telemetry changes, or new tools.
Completion Gate
Before finishing:
- guidance matches the installed TypeScript, runtime, libraries, and repository conventions;
- public models exclude known-invalid states without needless strengthening;
- untrusted structured input gains runtime evidence before trusted use;
- generics preserve a caller-visible relationship rather than hiding
unknown; - assertions and suppressions are local, justified, and do not launder evidence;
- checks use established scripts, and unverified runtime behavior is explicit;
- collected policy decisions follow the catalog or explicit task selection, and conflicting policy alternatives are reported rather than silently combined.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

