typescript-expert

Guide TypeScript/JavaScript code reviews for type safety and security.

1|Updated Jan 5, 2023
One-click install
npx skills add https://github.com/riez/dots --skill typescript-expert-riez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/riez/dots/tree/main/.config/agentic/skills/typescript-expert
Command: npx skills add https://github.com/riez/dots --skill typescript-expert-riez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript/JavaScript development often suffers from inconsistent type usage, security gaps, and readability issues. This skill provides comprehensive guidelines to write type-safe, idiomatic, and secure code across the TS/JS ecosystem.

Core Features & Use Cases

  • Type System Guidance: enforce strict typing, use interfaces over types where appropriate, and prefer explicit parameter and return types.
  • Security Best Practices: include input validation, safe DOM handling, secure defaults, and safe resource access patterns.
  • Code Quality & Review: supplies a formal review checklist and patterns to maintain modular, readable code across frontend and backend projects.
  • Use Case: onboarding a new TS project and guiding ongoing code reviews for consistent quality.

Quick Start

Analyze a TypeScript project and generate actionable improvements for typing, architecture, and security.

Frequently Asked Questions about typescript-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict TypeScript configuration and type safety in my project?

To enforce strict TypeScript configuration, enable strict mode in your TS config, prefer interfaces over types, and use explicit parameter and return types. This ensures type safety and secure coding across frontend and backend services.

What are the best practices for secure JavaScript and TypeScript code reviews?

Secure JavaScript and TypeScript code reviews require a structured checklist focusing on input validation, safe DOM handling, and secure resource access. Applying these best practices identifies security gaps and maintains modular, readable code across the stack.

How do I handle safe null checks and explicit typing in Node.js backend services?

Handling safe null checks in Node.js backend services requires strict typing rules and explicit return types in your TypeScript configuration. Following these coding guidelines prevents runtime errors and ensures secure resource access patterns.

Can I use this TypeScript coding guide for both frontend and backend onboarding?

Yes, you can use this TypeScript coding guide for both frontend and backend onboarding. It provides comprehensive guidelines for type safety, security best practices, and modular imports applicable across Node.js services and web applications.

When should I prefer interfaces over types for type-safe TypeScript development?

You should prefer interfaces over types for type-safe TypeScript development when defining object shapes to ensure strict typing and better code readability. This practice is part of enforcing idiomatic TS patterns during code reviews and refactoring.