Typescript Best Practices
Practical TypeScript standards covering type safety, error handling, and module structure, with analysis and type-generation scripts.
- CCM score
- 53 of 100
- skills.sh installs
- 638
- GitHub stars
- 195
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers type safety, immutability, Result-based error handling, code organization, and common anti-pattern avoidance
- Includes
analyze.tsfor quality checks with--strict,--json, and--fix-hintsmodes, plusgenerate-types.tsfor JSON-to-type output - Enforces
unknownoverany, readonly collections, explicit return types on exports, and string literal unions over enums - Designed for AI agents generating, reviewing, or refactoring TypeScript code in any codebase that uses Deno for its scripts
Install
$ npx -y skills add jwynia/agent-skills --skill typescript-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
TypeScript Best Practices
Guide AI agents in writing high-quality TypeScript code. This skill provides coding standards, architecture patterns, and tools for analysis and scaffolding.
When to Use This Skill
Use this skill when:
- Generating new TypeScript code
- Reviewing TypeScript files for quality issues
- Creating new modules, services, or components
- Refactoring JavaScript to TypeScript
- Answering questions about TypeScript patterns or types
- Designing APIs or interfaces
Do NOT use this skill when:
- Working with pure JavaScript (no TypeScript)
- Debugging runtime errors (use debugging tools)
- Framework-specific patterns (React, Vue, etc. - use framework skills)
Core Principles
1. Type Safety First
Maximize compile-time error detection:
// Prefer unknown over any for unknown types
function processInput(data: unknown): string {
if (typeof data === "string") return data;
if (typeof data === "number") return String(data);
throw new Error("Unsupported type");
}
// Explicit return types for public APIs
export function calculateTotal(items: ReadonlyArray<Item>): number {
return items.reduce((sum, item) => sum + item.price, 0);
}
Details
- Repository
- github.com/jwynia/agent-skills
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Jun 3, 2026
More from jwynia/agent-skills
All 118- Interactive Fiction623
- Task Decomposition609
- Prose Style587
- Musical Dna586
- Brainstorming570
- Pptx Generator548
- Good Thinking547
- Lyric Diagnostic546
- Key Moments530
- Research Workflow530
- Scene Sequencing530
- Naming529
- Gentle Teaching521
- Outline Coach517
- Task Breakdown514
- Game Facilitator513
- Architecture Decision508
- Code Review507
- Security Scan504
- Cliche Transcendence503
- Character Naming501
- Flash Fiction500
- Genre Conventions498
- Economic Systems497
Similar to Typescript Best Practices
More Frontend & UI Codetypescriptmindrally/skills1K installsOpinionated TypeScript style guide that enforces type safety, functional patterns, and naming conventions.
typescript-refactorpproenca/dot-skills814 installsType-safety and modernization guide for TypeScript and TSX refactoring, current to TypeScript 6.0 and React 19.
nestjs-best-practiceskadajett/agent-nestjs-skills32.5K installsNestJS guidance of 40 prioritized rules covering architecture, dependency injection, security, and performance for production apps.
typescript-writemetabase/metabase2.1K installsTyped TypeScript and JavaScript rules that bar any and casts, enforced by Metabase coding standards.
typescript-advanced-typeswshobson/agents102.1K installsComprehensive guide to TypeScript's advanced type system for building reusable, compile-time-safe type logic.
ts-googlepproenca/dot-skills389 installsGoogle-derived TypeScript style guide with 45 prioritized rules for writing, reviewing, and refactoring code.