quality-code

Apply TypeScript quality guidelines for branded types, discriminated unions, and end-to-end type sharing.

99|6|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/vvedantb/eva --skill quality-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: quality-code
Source: https://github.com/vvedantb/eva/tree/main/.agents/skills/quality-code
Command: npx skills add https://github.com/vvedantb/eva --skill quality-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Type-safe TypeScript projects benefit from explicit branding and end-to-end typings to prevent runtime errors and misuse of primitives.

Core Features & Use Cases

  • Branded types to prevent primitive misuse in business logic.
  • Discriminated unions to encode valid state shapes and exhaustiveness.
  • End-to-end type sharing across DB, server, and client with minimal duplication.
  • Observability and testing practices to ensure real validation and traceability.

Quick Start

Apply the quality-code guidelines to a TypeScript project to increase type-safety and reduce bugs.

Frequently Asked Questions about quality-code

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

FAQPage Schema
How do I use branded types in TypeScript to prevent primitive misuse?

Branded types in TypeScript prevent primitive misuse by tagging standard types like string or number with distinct brands, ensuring business logic only accepts specifically validated values and reducing runtime errors.

What is the best way to share end-to-end types across a full-stack TypeScript project?

End-to-end type sharing across a full-stack TypeScript project involves defining shared type schemas that flow seamlessly from the database through the server to the client, minimizing duplication and ensuring data shape consistency.

Why use discriminated unions for state management in TypeScript?

Discriminated unions encode valid state shapes in TypeScript by using a common literal property, enabling the compiler to enforce exhaustiveness checking during code review and preventing invalid state transitions at runtime.

Should I use tests or mocks for validating TypeScript type safety?

Tests over mocks are recommended for validating TypeScript type safety because real tests validate actual runtime behavior and data structures, whereas mocks often bypass the exact boundary conditions that cause runtime errors.

How do I implement OpenTelemetry observability in a TypeScript codebase?

Implementing OpenTelemetry observability in a TypeScript codebase requires integrating tracing libraries to capture distributed traces and metrics, ensuring real validation and execution traceability across common full-stack project environments.