typescript-dev
TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
Best use case
typescript-dev is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "typescript-dev" skill to help with this workflow task. Context: TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/typescript-dev/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How typescript-dev Compares
| Feature / Agent | typescript-dev | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# TypeScript Development Expert
This skill supports TypeScript project development.
## 🎯 Core Rules
### Package Management
- **Required**: Use `pnpm` as package manager
- Do not use `npm` or `yarn`
### Type Safety
- **tsconfig.json**: `strict: true` required
- **Null Handling**: Leverage optional chaining `?.` and nullish coalescing `??`
- **Imports**: Use ES modules, avoid `require()`
- **NO ANY**: Do not use `any` type in production code
### Best Practices
- **Type Inference**: Let TypeScript infer when obvious
- **Generics**: Use for reusable components
- **Union Types**: Prefer union types over enums for string literals
- **Utility Types**: Leverage built-in types (Partial, Pick, Omit)
### Documentation
- **Required**: Use TSDoc format for documentation comments
- **Public APIs only**: Document exported functions, classes, and interfaces
- **Self-documenting code**: Prefer clear naming over excessive comments
- **Document when necessary**: Add TSDoc only when the code intent isn't obvious from the signature
## 🛠️ Code Quality Tools
### Development Workflow
```bash
# Format code
pnpm run format
# Run linter
pnpm run lint
# Type check
pnpm tsc --noEmit
# Run tests with coverage
pnpm test -- --coverage
```
## 🎯 Quality Checklist
Check these during code review:
- [ ] Public APIs have TSDoc comments (when intent isn't clear from signature)
- [ ] No `any` type usage
- [ ] Proper error handling
- [ ] Test coverage above 80%
- [ ] Type inference properly leveraged
- [ ] Utility Types utilized
- [ ] Optional chaining (`?.`) and Nullish coalescing (`??`) used
- [ ] ES modules used (avoid `require()`)
## 🚀 Common Patterns
### Error Handling
```typescript
// Good: Clear error types
class ValidationError extends Error {
constructor(message: string, public field: string) {
super(message);
this.name = 'ValidationError';
}
}
// Good: Result type pattern
type Result<T, E = Error> =
| { success: true; data: T }
| { success: false; error: E };
```
### Async/Await
```typescript
// Good: With error handling
async function fetchUserData(id: string): Promise<Result<UserData>> {
try {
const response = await fetch(`/api/users/${id}`);
const data = await response.json();
return { success: true, data };
} catch (error) {
return { success: false, error: error as Error };
}
}
```
### Type Guards
```typescript
// Good: Custom type guard
function isUserProfile(value: unknown): value is UserProfile {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
'username' in value
);
}
```
## 💡 Performance Tips
1. **Avoid unnecessary re-renders** (React)
- Use `React.memo` for expensive components
- Use `useMemo` / `useCallback` appropriately
2. **Lazy Loading**
- Dynamic imports for code splitting
- `React.lazy()` for components
3. **Type-only imports**
```typescript
import type { UserProfile } from './types';
```
## 🔍 Common Anti-patterns to Avoid
❌ **Don't**:
```typescript
// Using any type
function process(data: any) { }
// Implicit any
function getValue(obj, key) { }
// Excessive type assertions
const user = data as User;
```
✅ **Do**:
```typescript
// Proper type definitions
function process(data: UserData) { }
// Explicit types
function getValue<T>(obj: T, key: keyof T) { }
// Use type guards
if (isUser(data)) {
// data is User here
}
```Related Skills
openapi-to-typescript
Converts OpenAPI 3.0 JSON/YAML to TypeScript interfaces and type guards. This skill should be used when the user asks to generate types from OpenAPI, convert schema to TS, create API interfaces, or generate TypeScript types from an API specification.
typescript-pro
Master TypeScript with advanced types, generics, and strict type safety. Handles complex type systems, decorators, and enterprise-grade patterns. Use PROACTIVELY for TypeScript architecture, type inference optimization, or advanced typing patterns.
typescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling. Use PROACTIVELY for any TypeScript/JavaScript issues including complex type gymnastics, build performance, debugging, and architectural decisions. If a specialized expert is a better fit, I will recommend switching and stop.
typescript-advanced-types
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.
javascript-typescript-typescript-scaffold
You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N
dbos-typescript
DBOS TypeScript SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing TypeScript code with DBOS, creating workflows and steps, using queues, using DBOSClient from external applications, or building applications that need to be resilient to failures.
typescript-write
Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.
typescript-review
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
tdd-vitest-typescript
Test-Driven Development (TDD) using Vitest and TypeScript. Use when the user requests help with TDD, writing tests before code, test-first development, Vitest test setup, TypeScript testing patterns, unit testing, integration testing, or following the Red-Green-Refactor cycle with Vitest.
typescript-node-expert
Expert TypeScript/Node.js developer for building high-quality, performant, and maintainable CLI tools and libraries. Enforces best practices, strict typing, and modern patterns.
typescript-strict
Strict TypeScript rules. Use when writing ANY TypeScript.
typescript-strict-guard
Use when writing or reviewing TypeScript code. Enforces strict mode standards, explicit typing, and best practices. Prevents 'any' types, @ts-ignore comments, and non-null assertions. This is a COMPREHENSIVE skill - consult the detailed guides before writing any TypeScript code.