types-enforce-ts
Skill2 starsChanged todayApache-2.0View on GitHub
TypeScript type-safety guidance. Use when editing or reviewing `.ts`, `.tsx`, `.mts`, or `.cts` files.
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when reviewing or editing TypeScript code:
- Distinctive: line 14
Prefer stricter and more precise types over broader types.
- Very specific: line 16
Avoid introducing any, unsafe double assertions, or blanket suppressions.
- Distinctive: line 18
Prefer narrowing and type guards over non-null assertions and forced casts.
- Distinctive: line 19
Keep inferred types when they are already clear and stable.
- Very specific: line 20
Do not add explicit return annotations such as : void when the return type is obvious from a local implementation.
- Distinctive: line 21
Remove unnecessary casts and non-null assertions where safe.
- Distinctive: line 22
Add minimal annotations for function params or returns when clarity or safety improves.
- Distinctive: line 26
Prefer explicit, narrow types.
- Distinctive: line 27
Remove unnecessary intermediate variables and one-off aliases when clarity is maintained.
- Distinctive: line 29
Prefer typing parameters at the signature level when it improves safety or clarity, and rely on inference when types are already clear.
- Distinctive: line 30
Avoid casting later at value access points when signature-level typing or narrowing is clearer.
- Distinctive: line 31
If project generic helpers exist, prefer concrete generic types over ad-hoc casts and loosely typed objects.
- Very specific: line 32
Prefer top-level annotations and satisfies over type assertions when possible.
- Very specific: line 33
Do not introduce local aliases only to satisfy TypeScript narrowing (const params = this._params, const data = this._data) if direct guards …
- Distinctive: line 34
Keep control flow simple without changing established logic unless explicitly requested.
- Very specific: line 35
Do not use the non-null assertion operator (!) unless it is strictly required and justified by existing project guidance.
- Distinctive: line 36
Do not add unnecessary comments or abstractions.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Type Safety
Applies only to TypeScript files such as .ts, .tsx, .mts, and .cts.
Use this skill when reviewing or editing TypeScript code:
- Preserve runtime behavior and public API shape unless the user asked otherwise.
- Prefer stricter and more precise types over broader types.
- Reuse or extend existing local types instead of creating duplicate one-off types.
- Avoid introducing
any, unsafe double assertions, or blanket suppressions. - Replace
anywith concrete types orunknownplus narrowing. - Prefer narrowing and type guards over non-null assertions and forced casts.
- Keep inferred types when they are already clear and stable.
- Do not add explicit return annotations such as
: voidwhen the return type is obvious from a local implementation; keep them only for exported APIs, overloads, recursive functions, interface conformance, or genuinely clarifying contracts. - Remove unnecessary casts and non-null assertions where safe.
- Add minimal annotations for function params or returns when clarity or safety improves.
- Align generics, unions, and nullability with real data flow.
- For Lit lifecycle methods that receive changed properties (
shouldUpdate,willUpdate,update,firstUpdated,updated), preferchangedProperties: PropertyValues<this>for strict typing. - For Lit lifecycle methods that need to handle
protectedorprivatechanged properties, usechangedProperties: PropertyValues(without<this>) instead of forcingPropertyValues<this>. - Prefer explicit, narrow types.
- Remove unnecessary intermediate variables and one-off aliases when clarity is maintained.
- Inline one-time-use values when clarity is maintained.
- Prefer typing parameters at the signature level when it improves safety or clarity, and rely on inference when types are already clear.
- Avoid casting later at value access points when signature-level typing or narrowing is clearer.
- If project generic helpers exist, prefer concrete generic types over ad-hoc casts and loosely typed objects.
- Prefer top-level annotations and
satisfiesover type assertions when possible. - Do not introduce local aliases only to satisfy TypeScript narrowing (
const params = this._params,const data = this._data) if direct guards and property access typecheck cleanly. - Keep control flow simple without changing established logic unless explicitly requested.
- Do not use the non-null assertion operator (
!) unless it is strictly required and justified by existing project guidance. - Do not add unnecessary comments or abstractions.
Other versions2 projects use a version of this.
Word for word · 2
- timmo001/notes★ 2100% same
- timmo001/context★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-workflowsSkill
- asking-questionsSkill
- broSkill
- browser-accessSkill
- change-review-handoffSkill
- changeset-scopeSkill
- check-skill-updatesSkill
- chillSkill
- ci-loopSkill
- cleanup-unnecessary-variablesSkill
- code-reviewSkill
- decision-modelsSkill
- diagnoseSkill
- effect-principlesSkill
- evidence-firstSkill
- gh-stackSkill
- git-contextSkill
- github-development-rulesetsSkill
- github-repository-setupSkill
- grillingSkill
- handoffSkill
- herdr-workflowsSkill
- home-assistant-frontendSkill
- home-assistant-lit-renderingSkill
- human-step-guideSkill
- import-external-skillSkill
- inbox-reportingSkill
- issue-loopSkill
- lit-renderingSkill
- maintain-docsSkill
- npm-jsr-first-publishSkill
- opencode-effectSkill
- pitchfork-dev-serversSkill
- pkexec-rootSkill
- planSkill
- release-oxlint-rulesSkill
- remote-change-diffSkill
- remove-single-use-functionsSkill
- researchSkill
- retroSkill
- review-stagesSkill
- review-steeringSkill
- safe-process-signalsSkill
- session-coordinationSkill
- shared-workflowsSkill
- show-meSkill
- skill-prefixesSkill
- staged-implementationSkill
- task-focusSkill
- task-runnersSkill
- testingSkill
- to-questionnaireSkill
- wranglerSkill
- writing-dot-skillsSkill
- writing-styleSkill
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.

