typescript-best-practices
Skill0 starsChanged 53 days agoMITView on GitHub
TypeScript guidance. Use when writing or reviewing .ts or .tsx code.
77 other projects use a version of this, 54 of them edited.
Adopted by
Most recently taken up by
- Yeachan-Heo/oh-my-claude-sisyphustheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- trpc/trpcedited, first seen Nov 8, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Nov 8, 2026
- endqwerty/endstackedited, first seen Nov 8, 2026
- tristanphvn/keeledited, first seen Nov 8, 2026
Used with
Projects with it also use setup-pstack, poteto-help and 10 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.
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 22 projects that use this
ianclearySkillpoteto-help
Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.
Also in 12 projects that use this
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 14 projects that use this
ianclearySkillprinciple-explain-the-number
Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.
Also in 20 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 8 projects that use this
instructureSkillketchup
Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories
Also in 17 projects that use this
Other versions77 projects use a version of this.
Word for word · 0
None found.
Edited · 54
- trpc/trpc★ 41k18% same
- backnotprop/pstack★ 3.8k18% same
- jtaroreh/agystack★ 12813% same
- uzairansaruzi/p3-stack★ 12619% same
- dsebban/skills★ 7118% same
- creedants/pstack-t3★ 1819% same
- painhardcore/pstack★ 1818% same
- Scino/fstack★ 1813% same
- korallis/skills-collection★ 1413% same
- mariusflorescu/pstack-t3★ 1316% same
44 more not listed
Wrote their own version · 23
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- baekenough/oh-my-customcode★ 42same name
- overextended/skills★ 22same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- caidanw/skills★ 11same name
- flpbalada/fb-skills★ 8same name
- robconery/kolea★ 7same name
- ex3ndr/skills★ 5same name
- kelesmert/turnlens★ 4same name
13 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 repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- instructions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- instructions/CLAUDE.mdCLAUDE.md
- author-skillSkill
- architectSkill
- arenaSkill
- astack-helpSkill
- astack-updateSkill
- brag-slimSkill
- bug-fixSkill
- claude-background-jobsSkill
- claude-routerSkill
- codex-background-jobsSkill
- create-verification-skillSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- full-sendSkill
- grillingSkill
- handoffSkill
- harden-prSkill
- hillclimbSkill
- howSkill
- implementSkill
- improve-codebase-architectureSkill
- investigationSkill
- multi-phase-planSkill
- no-commentsSkill
- open-prSkill
- orchestrateSkill
- perf-issueSkill
- principlesSkill
- prototypeSkill
- refactoringSkill
- reflectSkill
- review-prSkill
- run-jobSkill
- ship-prSkill
- show-me-your-workSkill
- t3-previewSkill
- tddSkill
- teachSkill
- technical-writingSkill
- to-specSkill
- unslopSkill
- wayfinderSkill
- whySkill
- wizardSkill
- worktree-cleanupSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Read the relevant patterns for examples.
“Common” is measured: kept by at least 6 in 10 of the 26 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 best practices
Apply type system discipline first. Follow the repository's compiler settings, schema libraries, and established type conventions. Apply these rules to the requested change.
| Rule | Summary |
| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as z.infer. |
| Type assertions | Prefer narrowing to assertions. Justify unavoidable assertions with validation or a demonstrated invariant. as const preserves literals; it does not validate external data. |
| Narrowing hierarchy | Discriminant switch > in operator > typeof/instanceof > user-defined type guard > as. |
| Type guards | Verify every property the predicate claims. Name guards isX or hasX. |
| Exhaustiveness | Inline const _exhaustive: never = x; in default arms so the compiler errors when a new variant is added. |
satisfies over as | Check assignability without replacing the expression's inferred type with the target type. It supplies no runtime validation. |
| Schema-derived types | Reach for Pick/Omit/Parameters/ReturnType/Awaited/typeof before declaring a new interface. |
| Object args | Prefer named options where positional arguments are easy to confuse. Keep simple positional APIs and existing conventions when clear. Measure allocation concerns before changing a hot path. |
Read the relevant patterns for examples. The calling workflow owns verification, evidence reuse, and finding disposition. Optional style advice does not expand scope.
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.

