Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By ofershapv0.1.0MIT
Steers your agent away from any, unsafe casts and loose unions toward strict-mode TypeScript 5.x patterns. Includes an /audit command that reports anti-patterns with file, line and severity; it says it is for Cursor, Claude Code and Windsurf.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Modern TypeScript 5.x patterns your AI agent should use. Strict mode, discriminated unions,
satisfies operator, const assertions, branded types, NoInfer, using, and type-safe patterns.
AI coding assistants default to
any, skip strict mode, useasinstead ofsatisfies, and model states with optional fields instead of discriminated unions. This plugin enforces the patterns that make TypeScript worth using.
npx skills add ofershap/typescript-best-practices
Or copy skills/ into your .cursor/skills/ or .claude/skills/ directory.
| Type | Name | Description |
|---|---|---|
| Skill | typescript-best-practices | 13 rules for strict mode, satisfies, discriminated unions, branded types, NoInfer, and more |
| Rule | best-practices | Always-on behavioral rule that enforces current TypeScript patterns |
| Command | /audit | Scan your codebase for TypeScript anti-patterns |
| What the agent writes | What you should use |
|---|---|
any for uncertain types | unknown with type narrowing |
as SomeType to silence errors | satisfies SomeType for validation without widening |
{ success?: Data; error?: string } | Discriminated union with type field |
strict: false in tsconfig | strict: true with proper null handling |
import { SomeType } | import type { SomeType } for type-only imports |
TypeVar + Generic[T] patterns | NoInfer<T>, const assertions, branded types |
If this helped your workflow, a star helps others find it.
MIT
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (ofershap/typescript-best-practices) — no native marketplace selected
npx claudepluginhub p/ofershap-typescript-best-practicesPlugins from other owners that cover similar ground