typescript

Enforce TypeScript and JavaScript specification constraints for type safety, validation, and testing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Pyl-Tech/stream-coding --skill typescript-pyl-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/Pyl-Tech/stream-coding/tree/main/.agents/skills/typescript
Command: npx skills add https://github.com/Pyl-Tech/stream-coding --skill typescript-pyl-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents fragile or insecure TypeScript/JavaScript implementations by forcing precise documentation constraints that the code generator can follow and reviewers can verify.

Core Features & Use Cases

  • Type Safety Guardrails: Requires explicit types on public APIs, forbids any, and mandates unknown with narrowing; uses interface for extensible shapes and type for unions.
  • React/Svelte Correctness: Enforces stable keys, complete dependency arrays, explicit client/server boundaries, and mandatory loading/error states.
  • Validation and Security: Mandates Zod schemas for all inputs and requires secret handling via process.env with startup fail-fast checks.
  • Testing and Review Checks: Requires Playwright for critical E2E flows with safe selectors, plus a structured review checklist for security, type safety, async correctness, and Node.js pitfalls.
  • Build & Fix Commands: Provides a standard set of typecheck, lint, prettier, audit, and test commands to keep projects consistent.

Quick Start

Activate the typescript skill to review or generate a TS/JS spec for a React or Next.js codebase and ensure it includes type definitions, Zod validation, security anti-patterns, and Playwright-based critical flow testing.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict TypeScript type safety rules in a React codebase?

TypeScript code review for React projects requires explicit types on public APIs, forbids `any`, mandates `unknown` with narrowing, and enforces stable keys with complete hook dependency arrays to prevent unsafe implementations.

How do I validate inputs and handle secrets safely in a Next.js application?

To validate inputs and handle secrets in a Next.js application, mandate Zod schemas for all external inputs and require secret values via `process.env` with startup fail-fast checks. This enforces safer development by turning missing security requirements into explicit specification constraints.

What is the best way to write safer TypeScript specifications that ship?

The best way to write safer TypeScript specifications is to turn missing requirements into explicit constraints covering type safety, React hook dependencies, Zod validation, security anti-patterns, and Playwright E2E coverage. This prevents fragile implementations by forcing precise documentation the code generator can follow.

Does this approach work with Svelte and JavaScript projects, or only TypeScript?

This specification approach works with Svelte and JavaScript projects, not only TypeScript. It applies to projects spanning .ts/.tsx/.js/.jsx files, package.json/tsconfig.json configurations, and common UI stacks including React, Next.js, and Svelte for both new builds and code-spec reviews.

How to set up Playwright E2E testing for critical flows in a TypeScript project?

To set up Playwright E2E testing for critical flows in a TypeScript project, require Playwright with safe selectors for all critical user paths. This is enforced alongside a structured review checklist for security, type safety, async correctness, and Node.js pitfalls to ensure comprehensive coverage.