By ofershap
Modern TypeScript patterns your AI agent should use. Strict mode, discriminated unions, satisfies operator, const assertions, and type-safe patterns for TypeScript 5.x.
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
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub ofershap/typescript-best-practicesSvelteKit and Svelte 5 done right. Runes ($state, $derived, $effect), load functions, form actions, SSR patterns, and modern Svelte your AI agent should follow.
Query and analyze your Cursor Enterprise team's AI usage, spending, and adoption metrics. Wraps the full Cursor Admin and Analytics APIs as MCP tools with expert data interpretation skills.
FastAPI done right. Async patterns, dependency injection, Pydantic v2 models, middleware, background tasks, and project structure for production APIs.
Drizzle ORM done right. Schema design, relations, migrations, type-safe queries, and performance patterns for the fastest-growing TypeScript ORM.
Modern Python 3.12+ patterns your AI agent should use. Type hints, async/await, Pydantic v2, uv package manager, match statements, and project structure.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Standalone image generation plugin using Nano Banana MCP server. Generates and edits images, icons, diagrams, patterns, and visual assets via Gemini image models. No Gemini CLI dependency required.
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Write feature specs, plan roadmaps, and synthesize user research faster. Keep stakeholders updated and stay ahead of the competitive landscape.