typescript-strict
Skill1 starsChanged 6 months agoMITView on GitHub
Use when writing, refactoring, reviewing, or debugging strict TypeScript in this repo, including tsconfig paths, package exports, typecheck failures, unknown vs any, readonly data, module boundaries, and Effect language-service diagnostics.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/typescript-skillstheir own version, first seen Nov 8, 2026
- conjurer-rich/skillstheir own version, first seen Oct 25, 2026
- Greg-Klein/ai-rules-skillstheir own version, first seen Oct 15, 2026
- SkillMedev/engineering-workflowtheir own version, first seen Oct 5, 2026
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
- Sagargupta16/claude-code-recipestheir own version, first seen Sep 6, 2026
Used with
Projects with it also use react-patterns, api-design and 1 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.
xenitV1Skillreact-patterns
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 5 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- Sagargupta16/claude-code-recipes★ 8same name
- 0xMassi/claude-skills★ 7same name
- kevinaimonster/skill-hub★ 4same name
- halflength-ampleness75/claude-code-recipes★ 2same name
- aprameyak/coding-skills★ 1same name
- conjurer-rich/skills★ 1same name
- microsoft/typescript-skills★ 1same name
- NaviAndrei/AgentFlow-Studio★ 1same name
- Greg-Klein/ai-rules-skills★ 0same name
- Nadav011/apex-skills★ 0same name
3 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-self-checkSkill
- biome-grit-rulesSkill
- biome-toolingSkill
- bun-testSkill
- bun-workspaceSkill
- cleanup-auditSkill
- code-reviewSkill
- dispatch-satelliteSkill
- docs-managementSkill
- docs-readingSkill
- effect-concurrency-lifecycleSkill
- effect-errors-schemaSkill
- effect-observability-timeSkill
- effect-services-layersSkill
- effect-testing-runtimeSkill
- effect-v4Skill
- jsx-md-authoringSkill
- monorepo-maintenanceSkill
- refactoring-disciplineSkill
- roadmap-managementSkill
- runtime-engineSkill
- server-runtimeSkill
- testing-patternsSkill
- theseus-designSkill
- tool-authoringSkill
- ui-layout-disciplineSkill
- theseus-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
39 rules. 0 are common, 25 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
25
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 8
Use this skill for TypeScript mechanics that are not specific to Effect.
- Very specific: line 21
Prefer unknown over any at external boundaries.
- Distinctive: line 23
Use explicit return types on exported functions when they define public API.
- Very specific: line 24
Use ReadonlyArray<T> and readonly object fields for inputs and data contracts.
- Very specific: line 25
Prefer literal unions or as const objects over numeric enums.
- Distinctive: line 26
Use template literal types or branded types for structured strings that cross boundaries.
- Distinctive: line 27
Avoid non-null assertions.
- Distinctive: line 28
Avoid type assertions that erase useful errors or requirements.
- Distinctive: line 42
Use branded/schema-backed IDs for values that cross package, persistence, tool, or RPC boundaries.
- Very specific: line 43
Prefer constructors/builders for exported protocol variants so defaults and _tag literals are centralized.
- Distinctive: line 44
Avoid booleans by default for domain state.
- Distinctive: line 45
Prefer discriminated unions for simple states and an explicit state-machine module/service for complex state transitions.
- Distinctive: line 46
Prefer explicit required inputs over optional-parameter soup.
- Distinctive: line 47
Use explicit domain sentinels or variants when absence has semantics.
- Distinctive: line 48
Use exhaustive matching for closed internal protocols.
- Distinctive: line 49
Avoid stringly typed protocols when the set is closed.
- Very specific: line 50
Use satisfies when checking object shape without widening or erasing useful literal information.
- Distinctive: line 55
Keep package public exports intentional.
- Very specific: line 57
Use workspace path mappings from package tsconfig.json.
- Distinctive: line 58
Keep browser-safe packages free of Bun-only imports.
- Very specific: line 59
Keep generated dist/ output derived from source.
- Very specific: line 63
Read the relevant package tsconfig.json.
- Very specific: line 66
Run bun run typecheck for cross-package signatures, exports, schemas, or shared types.
- Distinctive: line 70
Use typed result/error models for recoverable failures.
- Distinctive: line 73
Do not silently default malformed or incomplete input unless the default is a named domain rule.
- Distinctive: line 75
When converting foreign errors, add stable context without leaking secrets or large payloads.
- Very specific: line 79
Do not use as any or as never to escape a type error without explaining the invariant.
- Very specific: line 80
Do not widen closed sets to string unless external extensions can add values at runtime.
- Very specific: line 81
Do not use T[] for input collections that should not be mutated.
- Distinctive: line 82
Do not add default exports to packages that use named export style.
- Distinctive: line 83
Do not hide package-boundary type errors by changing root compiler options.
- Distinctive: line 84
Do not model mutually exclusive states as one object with many optional fields.
- Distinctive: line 85
Do not model lifecycle or protocol state as a matrix of booleans.
- Distinctive: line 86
Do not use broad index signatures when explicit keys or a typed map would preserve more information.
- Very specific: line 87
Do not build object literals with conditional spread fragments like ...(x !== undefined ?
- Distinctive: line 88
Do not scatter nullish defaults through function bodies.
- Distinctive: line 89
Do not let defaults creep inward through multiple call layers.
- Distinctive: line 90
Do not add default branches that hide unsupported internal message types, protocol variants, or state transitions.
- Very specific: line 91
Do not use Partial<T> for domain update APIs.
“Common” is measured: kept by at least 6 in 10 of the 13 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 Strict
Use this skill for TypeScript mechanics that are not specific to Effect.
Repo Facts
- Root
tsconfig.jsonis strict and no-emit. - Module mode:
Preserve; module resolution:bundler. - TS extension imports are allowed.
exactOptionalPropertyTypes,noUncheckedIndexedAccess, andnoPropertyAccessFromIndexSignatureare enabled.@effect/language-serviceis configured in roottsconfig.json.- Root typecheck runs package configs explicitly.
Type Rules
- Prefer
unknownoveranyat external boundaries. - Narrow
unknownbefore use. - Use explicit return types on exported functions when they define public API.
- Use
ReadonlyArray<T>and readonly object fields for inputs and data contracts. - Prefer literal unions or
as constobjects over numeric enums. - Use template literal types or branded types for structured strings that cross boundaries.
- Avoid non-null assertions; prove presence through narrowing.
- Avoid type assertions that erase useful errors or requirements.
Type-First Modeling
For new public APIs, protocols, or domain states, design the type shape before filling in implementation details.
- Define the data model: IDs, state variants, schemas, and external wire shape.
- Define function signatures: input, output, recoverable errors, and Effect requirements.
- Implement to satisfy the types; let compiler errors expose missing cases.
- Validate at boundaries where unknown data enters or leaves the system.
Rules:
- Make illegal states unrepresentable with discriminated unions instead of correlated optional fields or boolean flags.
- Use branded/schema-backed IDs for values that cross package, persistence, tool, or RPC boundaries.
- Prefer constructors/builders for exported protocol variants so defaults and
_tagliterals are centralized. - Avoid booleans by default for domain state. Use booleans only for truly binary values that are unlikely to grow into a state space.
- Prefer discriminated unions for simple states and an explicit state-machine module/service for complex state transitions.
- Prefer explicit required inputs over optional-parameter soup. If a value has a meaningful default, normalize it once at the boundary into a required field.
- Use explicit domain sentinels or variants when absence has semantics; do not rely on omission to mean a real state.
- Use exhaustive matching for closed internal protocols. Unknown internal variants are defects, not fallback cases.
- Avoid stringly typed protocols when the set is closed. Use literal unions or schemas.
- Use
satisfieswhen checking object shape without widening or erasing useful literal information. - Let TypeScript infer local obvious values, but write explicit return types for exported functions that define public API.
Module And Package Rules
- Keep package public exports intentional.
- Match
package.jsonexports with actual source entrypoints. - Use workspace path mappings from package
tsconfig.json; do not invent import paths. - Keep browser-safe packages free of Bun-only imports.
- Keep generated
dist/output derived from source.
Typecheck Workflow
- Read the relevant package
tsconfig.json. - Reproduce with the narrow package typecheck if available.
- Fix the type model, not just the local symptom.
- Run
bun run typecheckfor cross-package signatures, exports, schemas, or shared types.
Error-Handling Types
- Use typed result/error models for recoverable failures.
- In Effect code, preserve the
Echannel instead of collapsing errors tounknown. - In non-Effect code, prefer discriminated unions for recoverable results when exceptions are not the right boundary.
- Do not silently default malformed or incomplete input unless the default is a named domain rule. Prefer explicit validation and a typed failure.
- Recover from expected external uncertainty; fail loud on impossible internal states and violated invariants.
- When converting foreign errors, add stable context without leaking secrets or large payloads.
Anti-Patterns
- Do not use
as anyoras neverto escape a type error without explaining the invariant. - Do not widen closed sets to
stringunless external extensions can add values at runtime. - Do not use
T[]for input collections that should not be mutated. - Do not add default exports to packages that use named export style.
- Do not hide package-boundary type errors by changing root compiler options.
- Do not model mutually exclusive states as one object with many optional fields.
- Do not model lifecycle or protocol state as a matrix of booleans.
- Do not use broad index signatures when explicit keys or a typed map would preserve more information.
- Do not build object literals with conditional spread fragments like
...(x !== undefined ? { x } : {}). Normalize options first and pass an explicit required object. - Do not scatter nullish defaults through function bodies. Defaults should live in constructors, boundary normalizers, config layers, or clearly named constants.
- Do not let defaults creep inward through multiple call layers. Once normalized, pass the explicit normalized value.
- Do not add default branches that hide unsupported internal message types, protocol variants, or state transitions.
- Do not use
Partial<T>for domain update APIs. Prefer named commands such asrecordUsage,markCompleted, orsetIteration.Partial<T>is acceptable for tests, low-level persistence plumbing, or external patch surfaces after normalization.
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.

