typescript-best-practices
Skill20k starsChanged 5 days agoMITView on GitHub
TypeScript best practices. Use when reading or editing any .ts or .tsx file.
99 other projects use a version of this, 57 of them edited; 1 new project in the last 4 weeks, against 1 the 4 before.
Adopted by
Steady: 1 new project took it in the last 4 weeks, 1× the 4 weeks before.thin data
Most recently taken up by
- BabylonSocial/babylonword for word, first seen Nov 30, 2026
- ngxccc/engineered-skillstheir own version, first seen Nov 29, 2026
- MondayNotAGoodDay/skillsword for word, first seen Nov 29, 2026
- MarkTripoli/skillsedited, first seen Nov 29, 2026
- karanmrn/karanagentskillsword for word, first seen Nov 29, 2026
- The-Utopia-Studio/skillsedited, first seen Nov 29, 2026
Who's talking about elizaOS/eliza
- Square of Dai“Build a Solana Trading AI Agent with Eliza OS - No Paid APIs Needed! 🤖”YouTube · Jan 19, 2025 · 5.8k views
- Create & Play Games“Eliza OS AI Agent Framework v0.1.9 - Initial Setup”YouTube · Feb 1, 2025 · 2.7k views
- MultiversX“AI Agents on MultiversX with Eliza Framework - How to setup Eliza (Tutorial)”YouTube · Feb 12, 2025 · 2.5k views
- Top Trending GitHub Repositories“Eliza OS: The Top Trending AI Framework Revolutionizing Customer Support & Social Media Automation!”YouTube · Feb 4, 2025 · 2.4k views
- Jean“J'ai codé un agent IA - TUTO Eliza OS / AI16Z (typescript)”YouTube · Jan 17, 2025 · 1.5k views
The biggest 5 of 91 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 91
Talked about on GitHub, YouTube, Bluesky, Hacker News and the web (91 times).
On GitHub · 50
- Jan 17, 2025Add support for linux arm64 — anush008/tokenizers14 reactions · 1 comment
- Mar 20, 2026feat: simplified onboarding, UI redesign, knowledge image support — milady-ai/milady1 reaction · 4 comments
- Nov 29, 2026chore(deps): bump minimatch and @elizaos/core in /hindsight-integrations/eliza — xrplove/Tree-of-Life-Hindsight0 reactions
- Nov 25, 2026SWF(polish): render registry repository as a short owner/repo link — SYMBaiEX/doolittle0 reactions · 1 comment
- Nov 24, 2026Bump @ai-sdk/provider-utils and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
45 more on GitHub
- Nov 24, 2026Bump ai and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump langsmith and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump langchain and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump uuid, @elizaos/core and @solana/web3.js in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump tar and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump jsondiffpatch and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump zod and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 24, 2026Bump minimatch and @elizaos/core in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 23, 2026fix: skill drift detected 2026-11-23 — ItachiDevv/elizaos-skill0 reactions
- Nov 23, 2026Bump @elizaos/core from 0.1.9 to 2.0.5 in /packages/eliza-plugin-x402 — nissan/reddi-agent-protocol0 reactions · 1 comment
- Nov 16, 2026fix: skill drift detected 2026-11-16 — ItachiDevv/elizaos-skill0 reactions
- Nov 16, 2026Bump @elizaos/core from 2.0.3-beta.7 to 2.0.5 in the npm-minor-patch group — livetennisapi/elizaos-plugin-livetennis0 reactions
- Nov 12, 2026agent-skills.github.elizaos.eliza: 15 → 2.0.5 — sudosubin/agents.nix0 reactions
- Nov 11, 2026agent-skills.github.elizaos.eliza: 14-unstable-2026-10-05 → 15 — sudosubin/agents.nix0 reactions
- Nov 10, 2026elizaOS eliza HTTP Server api-base-owner.ts information disclosure — NixOS/nixpkgs0 reactions · 1 comment
- Nov 9, 2026fix: skill drift detected 2026-11-09 — ItachiDevv/elizaos-skill0 reactions
- Nov 2, 2026fix: skill drift detected 2026-11-02 — ItachiDevv/elizaos-skill0 reactions
- Oct 29, 2026Android: Unii as the default digital assistant, with screen context — arteeh/ki0 reactions
- Oct 26, 2026fix: skill drift detected 2026-10-26 — ItachiDevv/elizaos-skill0 reactions
- Oct 19, 2026fix: skill drift detected 2026-10-19 — ItachiDevv/elizaos-skill0 reactions
- Oct 13, 2026Network OAuth SMS blocked: Twilio account authentication fails with 401 / 20003 — eliza-research/thenetwork0 reactions
- Oct 12, 2026fix: skill drift detected 2026-10-12 — ItachiDevv/elizaos-skill0 reactions
- Oct 10, 2026Track Shared phone sign-in release and Network acceptance — eliza-research/thenetwork0 reactions · 27 comments
- Oct 10, 2026TODO: Complete final MVP qualification against approved policies — AlphaPhone/alpha0 reactions · 9 comments
- Oct 10, 2026TODO: Deliver and qualify the approved AOSP MVP image — AlphaPhone/alpha0 reactions · 6 comments
- Oct 10, 2026Retire phone pairing for the on-device agent — AlphaPhone/alpha0 reactions · 1 comment
- Oct 5, 2026agent-skills.github.elizaos.eliza: 14 → 14-unstable-2026-10-05 — sudosubin/agents.nix0 reactions
- Oct 5, 2026fix: skill drift detected 2026-10-05 — ItachiDevv/elizaos-skill0 reactions
- Sep 30, 2026Request maintainer evaluation: fadhelcarlos PR elizaOS/eliza#32908 incorporated into #32909 — SlopDotCash/slopdotcash0 reactions · 4 comments
- Sep 28, 2026fix: skill drift detected 2026-09-28 — ItachiDevv/elizaos-skill0 reactions
- Sep 28, 2026Broken links report — Li-Evan/awesome-jev0 reactions
- Sep 21, 2026fix: skill drift detected 2026-09-21 — ItachiDevv/elizaos-skill0 reactions
- Sep 20, 2026取引OSS 8件から現行FX基盤へ取り入れられる設計・検証手法を調査する — yusuke3627/fx-trading-platform0 reactions
- Sep 14, 2026fix: skill drift detected 2026-09-14 — ItachiDevv/elizaos-skill0 reactions
- Aug 31, 2026fix: skill drift detected 2026-08-31 — ItachiDevv/elizaos-skill0 reactions
- Aug 29, 2026[repo] elizaOS/eliza — lucas-albers-lz4/sre-ai-llm-work0 reactions · 2 comments
- Aug 24, 2026fix: skill drift detected 2026-08-24 — ItachiDevv/elizaos-skill0 reactions
- Aug 24, 2026Request maintainer evaluation: superseded Neutize PR elizaOS/eliza#25803 — SlopDotCash/slopdotcash0 reactions · 1 comment
- Aug 23, 2026Request maintainer evaluation: GG100-eng review on elizaOS/eliza#24433 — SlopDotCash/slopdotcash0 reactions
- Aug 22, 2026fix(deploy): add protected staging migration gate before develop rollout — Steward-Fi/steward0 reactions
- Aug 21, 2026Request maintainer evaluation: Neutize reviews on elizaOS/eliza#23362 and #23364 — SlopDotCash/slopdotcash0 reactions · 2 comments
- Aug 20, 2026Eliza review preflight invalidates pinned proof after repository transfer — SlopDotCash/slopdotcash0 reactions
- Aug 17, 2026fix: skill drift detected 2026-08-17 — ItachiDevv/elizaos-skill0 reactions
- Aug 16, 2026Fix invalid review receipt blocking leaderboard refresh — SlopDotCash/slopdotcash0 reactions
- Aug 16, 2026Request maintainer evaluation: Neutize review on elizaOS/eliza#19464 — SlopDotCash/slopdotcash0 reactions
On YouTube · 24
- Jan 19, 2025Build a Solana Trading AI Agent with Eliza OS - No Paid APIs Needed! 🤖 — Square of Dai5.8k views · 20 comments
- Feb 1, 2025Eliza OS AI Agent Framework v0.1.9 - Initial Setup — Create & Play Games2.7k views · 17 comments
- Feb 12, 2025AI Agents on MultiversX with Eliza Framework - How to setup Eliza (Tutorial) — MultiversX2.5k views · 3 comments
- Feb 4, 2025Eliza OS: The Top Trending AI Framework Revolutionizing Customer Support & Social Media Automation! — Top Trending GitHub Repositories2.4k views · 2 comments
- Jan 17, 2025J'ai codé un agent IA - TUTO Eliza OS / AI16Z (typescript) — Jean1.5k views · 9 comments
19 more on YouTube
- Aug 1, 2026Eliza: Build Autonomous AI Agents for Twitter, Discord & Telegram (Modular, Memoryful) — Solopreneurs hub1.3k views
- May 25, 2025AI Agents Are About To Change Everything! ElizaOS Founder Drops Big Alpha 🚀 — JChains 1.3k views · 5 comments
- Feb 12, 2025AI Agents on MultiversX with Eliza Framework - Plugin and Client Systems (Tutorial) — MultiversX1.3k views · 3 comments
- Feb 25, 2025How to Create Crypto AI Agents With ElizaOS & Gelato — Founder Alpha956 views · 1 comment
- Jan 29, 2025build a TALKING AI agent with elizaOS by ai16z using Elevenlabs, Openrouter and Discord — Parzival of Algorithmic Progress843 views · 3 comments
- Feb 7, 2026S.10 Ep.9: ElizaOS, FOSSRPG, and the Future of Open-Source AI Agents with Shaw — Green Pill686 views · 3 comments
- Feb 26, 2025Eliza v2 Hacking — Shaw Makes Magic685 views · 2 comments
- Feb 26, 2025Eliza v2 Hacking — Shaw Makes Magic666 views
- Jan 14, 2025Getting started with Eliza and the Starknet Plugin — Jonatan Chaverri652 views · 6 comments
- Dec 30, 2024GitHub - elizaOS/eliza: Autonomous agents for everyone — GitHub Daily Trend AI Podcast547 views · 1 comment
- Oct 9, 2026ElizaOS 101: Rebuilding the Open Agent Operating System — Information in Motion 417 views
- Feb 27, 2025Eliza v2 Hacking — Shaw Makes Magic397 views
- Mar 3, 2025Eliza v2 Hacking — Shaw Makes Magic383 views
- Sep 25, 2026Architecting Autonomy Building an ElizaOS Node from First Prin — Alex Hitt366 views
- Jul 27, 2026eliza - GitHub Trending Today — GitHub Trending Digest245 views
- Mar 2, 2025Eliza v2 Hacking — Shaw Makes Magic223 views
- Feb 3, 2025Walkthrough of Eliza and how Istarai played Eternum — StarkWare168 views
- Feb 12, 2025SW x RW AI Agent Hackathon Show & Tell 2 — StarkWare94 views
- Apr 10, 2026Building & Deploying an AI Agent on Nosana GPU Network with ElizaOS — Jupiter Legion (Sam)55 views · 18 comments
On Bluesky · 12
- Jan 4, 2025Autonomous agents are here to eat your job, your cat, and your existential dread. 𝚎𝚕𝚒𝚣𝚊𝙾𝚂: where AI meets chaos theory in a blender… — @geeknik.bsky.social4 likes and reposts
- Dec 30, 2024Interesting how these social platforms are slowly becoming a communication channel for AI agents. - AI agents may bring more traffic there… — @testingcatalog.com3 likes and reposts
- Feb 22, 2025it can be done, and likely has — @tsunderella.moe2 likes and reposts · 1 reply
- Feb 9, 2025📦 elizaOS / eliza ⭐ 14,147 (+49) 🗒 TypeScript Autonomous agents for everyone — @github-trending-js.bsky.social2 likes and reposts
- Jan 23, 2025🔥 Hot Repo! 🔥 (100+ new stars) 📦 elizaOS / eliza ⭐ 12,705 (+193) 🗒 TypeScript Autonomous agents for everyone — @github-trending-js.bsky.social2 likes and reposts
7 more on Bluesky
- Jan 3, 2025🎉 Celebrating! 🎉 (500+ new stars) 📦 elizaOS / eliza ⭐ 8,788 (+565) 🗒 TypeScript Autonomous agents for everyone — @github-trending.bsky.social2 likes and reposts · 1 reply
- Dec 29, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 elizaOS / eliza ⭐ 6,394 (+123) 🗒 TypeScript Autonomous agents for everyone — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Jul 8, 2025📦 elizaOS / eliza ⭐ 16,290 (+90) 🗒 TypeScript Autonomous agents for everyone — @github-trending-js.bsky.social1 likes and repost
- Jun 16, 2025github.com/elizaOS/eliza — @ens0.me1 likes and repost · 1 reply
- Jan 27, 2025Sad tweeter meddle election github.com/elizaOS/eliza — @jungchanhsieh.bsky.social1 likes and repost
- Jan 2, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 elizaOS / eliza ⭐ 8,445 (+431) 🗒 TypeScript Autonomous agents for everyone — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Dec 29, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 elizaOS / eliza ⭐ 6,394 (+123) 🗒 TypeScript Autonomous agents for everyone — @github-trending.bsky.social1 likes and repost · 1 reply
On Hacker News · 3
- Jul 12, 2025Show HN: ElizaOS 1.0 - Powerful and useful multi-agent framework in Typescript2 points
- Jan 5, 2025Eliza OS – open-source AI agent framework for crypto and more2 points · 1 comment
- Jan 4, 2025ElizaOS – Powering Agents on X2 points
On the web · 2
- Aug 26, 2025ElizaOS v2: from a meme AI fund to a full-fledged agent system — metalamp.io
- Jul 9, 2024elizaOS/eliza: stars & growth - TopRepo — toprepo.cuongit.net
Used with
Projects with it also use setup-pstack, make-bot-ui 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 24 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 15 projects that use this
shiwenbin1617Skillketchup-video
Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.
Also in 10 projects that use this
shiwenbin1617Skillstatechart
Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use for /statechart, or to show a bug as a path through states.
Also in 11 projects that use this
mukcoSkillprinciples
General software engineering principles — DRY, SOLID, YAGNI, KISS, naming, code smells, and refactoring. Language-agnostic. Use alongside language-specific skills.
Also in 4 projects that use this
rohunvoraSkillreframe
This skill should be used when the user is stuck, obvious solutions aren't working, constraints feel impossible, or they keep circling back to bad options. Use when designs keep getting rejected or the user is solving symptoms instead of root causes.
Also in 3 projects that use this
Other versions99 projects use a version of this.
Word for word · 19
- trpc/trpc★ 41k100% same
- backnotprop/pstack★ 5.4k100% same
- BabylonSocial/babylon★ 120100% same
- TencentBlueKing/bk-lite★ 77100% same
- stealth-factory/opscope★ 40100% same
- adjohn/pstack★ 12100% same
- karanmrn/karanagentskills★ 11100% same
- karanmrn/kstack★ 11100% same
- fedeya/wisp-ai★ 8100% same
- Jrecos/omp-pstack★ 8100% same
9 more not listed
Edited · 57
- jtaroreh/agystack★ 14286% same
- uzairansaruzi/p3-stack★ 12698% same
- dsebban/skills★ 8294% same
- overextended/skills★ 2223% same
- painhardcore/pstack★ 2299% same
- creedants/pstack-t3★ 1999% same
- korallis/skills-collection★ 1492% same
- mariusflorescu/pstack-t3★ 1387% same
- Scino/fstack★ 1397% same
- kkgogogo17/pi-pstack★ 989% same
47 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★ 47same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- robconery/kolea★ 14same name
- caidanw/skills★ 11same name
- flpbalada/fb-skills★ 9same name
- ex3ndr/skills★ 5same name
- kelesmert/turnlens★ 4same name
- requie/endostack★ 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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- alchemySkill
- architectSkill
- arenaSkill
- benchmark-checklistSkill
- designSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- proveSkill
- shellSkill
- syncSkill
- whySkill
The file
Files
TypeScript best practices
Apply the type-system-discipline principle skill first.
| Rule | Summary |
| Discriminated unions | Model variants with a kind literal discriminant so impossible states can't be represented. No optional-field bags. |
| Branded types | Brand primitives with & { readonly __brand: "X" } so they can't be mixed up. Validate once at the boundary. A brand comes from a verifying type guard (input is AgentId), never from as. |
| Constructive modeling | Build the shape so the illegal value can't be constructed. [T, ...T[]] for non-empty, [T, T][] for even length, start plus duration for a range. Not a runtime guard, not a wish for refinement types. |
| Simplest total type | Keep T[] while every operation on it stays total. Strengthen to NonEmpty<T> only where the loose type forces !, a cast, or a "should never happen" throw. |
unknown over any | External data is unknown. |
| 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. |
No as casts | Every as is a runtime crash waiting. Cast only after validation. |
| Narrowing hierarchy | Discriminant switch > in operator > typeof/instanceof > user-defined type guard > as. |
| Type guards | Must verify the claim. A lying guard is worse than as because the bug hides behind a name that says it's safe. Name them 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 | Validates the value without widening literal types. |
| Boundary validation | Parse where data crosses in, into a named domain type. Record<string, unknown> (however spelled) stops at that parse. Trust types inside. See the boundary-discipline principle skill. |
| Schema-derived types | Reach for Pick/Omit/Parameters/ReturnType/Awaited/typeof before declaring a new interface. |
| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak/disposable checks, and verify UI in a running build. Mock only what you can't run locally. |
| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No console.log in shipped code. |
Examples: references/patterns.md.
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.

