typescript-patterns
Skill2 starsChanged 7 days agoMITView on GitHub
TypeScript patterns for strictness flags, type-safety anti-patterns, and a review checklist covering any vs unknown, satisfies, branded types, discriminated unions, generic constraints, and module boundaries. Use whenever the project contains `.ts`/`.tsx` files, a `tsconfig*.json`, or `typescript` in `package.json`, OR the user asks about TypeScript, its type system, or its compiler config, even if "TypeScript" is not mentioned by name.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- mikulgohil/claude-skillstheir own version, first seen Oct 13, 2026
- sabahattink/antigravity-fullstack-hqtheir own version, first seen Sep 20, 2026
- techmefr/mentistheir own version, first seen Sep 11, 2026
- bjornjee/skillstheir own version, first seen Sep 8, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- cohen-liel/hivemind★ 108same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- peopleforrester/claude-dotfiles★ 3same name
- bjornjee/skills★ 2same name
- MMACABRE/SKILLS★ 1same name
- mikulgohil/claude-skills★ 0same name
- techmefr/mentis★ 0same name
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 repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- auditSkill
- backup-patternsSkill
- bash-patternsSkill
- depsSkill
- django-patternsSkill
- docker-patternsSkill
- drf-patternsSkill
- engineering-fundamentalsSkill
- fastapi-patternsSkill
- git-patternsSkill
- go-patternsSkill
- graphql-patternsSkill
- investigateSkill
- javascript-patternsSkill
- logging-patternsSkill
- referenceSkill
- metaSkill
- monitoring-patternsSkill
- next-app-router-patternsSkill
- nuxt-patternsSkill
- opentofu-patternsSkill
- prSkill
- python-patternsSkill
- react-patternsSkill
- report-formatSkill
- security-patternsSkill
- slop-patternsSkill
- storybook-patternsSkill
- tailwind-patternsSkill
- test-patternsSkill
- unslopSkill
- vps-provisioningSkill
- vue-patternsSkill
- wcag-auditSkill
- writeSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Default assumption: a TypeScript project with strict mode enabled.
- Very specific: line 10
If strict is off, that itself is a finding.
- Very specific: line 11
Verify version-sensitive claims (which flags exist, which syntax is available) against the typescript version pinned in the project's …
“Common” is measured: kept by at least 6 in 10 of the 4 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 patterns
Default assumption: a TypeScript project with strict mode enabled.
- If
strictis off, that itself is a finding. - Verify version-sensitive claims (which flags exist, which syntax is available) against the
typescriptversion pinned in the project'spackage.jsonand lockfile before applying deltas below.
Reference files
| File | Covers |
| reference/strictness.md | Strictness flags, tsconfig review, incremental migration patterns |
| reference/type-expressions.md | unknown vs any, satisfies, discriminated unions, branded types, generic constraints, common patterns |
| reference/narrowing.md | typeof / in / instanceof, predicates, exhaustiveness, assertNever |
| reference/module-boundaries.md | import type, project references, circular imports, barrel-file anti-pattern |
| reference/anti-patterns.md | Twelve review-time anti-patterns with severity calls |
References
- TypeScript handbook: https://www.typescriptlang.org/docs/handbook/
- tsconfig reference: https://www.typescriptlang.org/tsconfig
- Release notes index: https://www.typescriptlang.org/docs/handbook/release-notes/overview.html
satisfiesoperator (4.9): https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/- Variance annotations (4.7): https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/
verbatimModuleSyntaxandconsttype parameters (5.0): https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/- typescript-eslint rules (
no-empty-object-type,prefer-ts-expect-error,no-explicit-any): https://typescript-eslint.io/rules/ - Vercel: package import optimization (barrel files): https://vercel.com/blog/how-we-optimized-package-imports-in-next-js
Version notes
Checked: 2026-09-26 against https://devblogs.microsoft.com/typescript/ and Context7 /microsoft/typescript
- 7.0 (2026-07, latest 7.0.2): native Go compiler. Removed the options 6.0 deprecated:
modulenone/amd/umd/system,moduleResolutionnode10/classic,baseUrl,outFile,downlevelIteration,target: ES5,alwaysStrict: false,esModuleInterop: false,allowSyntheticDefaultImports: false. A tsconfig using any of these does not compile on 7. - 6.0: last JavaScript-based compiler; deprecated the options above.
- 5.0 (2023-03):
verbatimModuleSyntax,consttype parameters. 4.9:satisfies. 4.7:in/outvariance annotations.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

