agentleFS
ku5icku5ic/claude-kit/skills/typescript-patterns/SKILL.md

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

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
  1. Very specific:

    Default assumption: a TypeScript project with strict mode enabled.

    line 8
  2. Very specific:

    If strict is off, that itself is a finding.

    line 10
  3. Very specific:

    Verify version-sensitive claims (which flags exist, which syntax is available) against the typescript version pinned in the project's …

    line 11

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TypeScript patterns

Default assumption: a TypeScript project with strict mode enabled.

  • If strict is off, that itself is a finding.
  • Verify version-sensitive claims (which flags exist, which syntax is available) against the typescript version pinned in the project's package.json and lockfile before applying deltas below.

Reference files

FileCovers
reference/strictness.mdStrictness flags, tsconfig review, incremental migration patterns
reference/type-expressions.mdunknown vs any, satisfies, discriminated unions, branded types, generic constraints, common patterns
reference/narrowing.mdtypeof / in / instanceof, predicates, exhaustiveness, assertNever
reference/module-boundaries.mdimport type, project references, circular imports, barrel-file anti-pattern
reference/anti-patterns.mdTwelve review-time anti-patterns with severity calls

References

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: module none/amd/umd/system, moduleResolution node10/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, const type parameters. 4.9: satisfies. 4.7: in/out variance annotations.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.