writing-typescript

Enforce TypeScript coding conventions with Zod validation and object parameters.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/anthony-fdez/claude-skills --skill writing-typescript-anthony-fdez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-typescript
Source: https://github.com/anthony-fdez/claude-skills/tree/main/.claude/skills/writing-typescript
Command: npx skills add https://github.com/anthony-fdez/claude-skills --skill writing-typescript-anthony-fdez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a rigorous set of TypeScript coding conventions that go beyond standard practices, ensuring code clarity, maintainability, and robustness.

Core Features & Use Cases

  • Strict Parameter Handling: Mandates object destructuring for all function parameters, eliminating positional arguments.
  • Code Clarity: Prohibits JSDoc comments that merely restate code, favoring self-documenting code.
  • Type Safety: Discourages any, type assertions, and non-null assertions, promoting explicit types and Zod for I/O validation.
  • Use Case: When writing new TypeScript modules, ensure all functions adhere to the specified naming, typing, and parameter conventions, preventing common pitfalls and improving code quality across the team.

Quick Start

Apply the writing-typescript skill to refactor the provided TypeScript code to adhere to its strict conventions.

Frequently Asked Questions about writing-typescript

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

FAQPage Schema
How do I enforce strict TypeScript coding standards in my project?

TypeScript coding standards are enforced by mandating object destructuring for function parameters, prohibiting redundant JSDoc comments, and preferring type inference over explicit declarations to ensure code clarity and robustness.

What is the best way to handle function parameters in TypeScript for maintainability?

Handling TypeScript function parameters via mandatory named object destructuring eliminates positional arguments and ensures code clarity, making the codebase easier to maintain and refactor.

Should I use TypeScript enums or const objects for defining types?

Adopting const objects over TypeScript enums provides safer type management and aligns with strict coding conventions that favor standard JavaScript patterns and discriminated unions.

How do I validate data at I/O boundaries in TypeScript?

Validating data at TypeScript I/O boundaries is achieved by using Zod. This approach prevents risky type assertions and ensures type safety from external inputs by validating runtime data structures.

When should I use discriminated unions in TypeScript?

Use discriminated unions in TypeScript to manage state and errors safely. They are preferred over type assertions, ensuring the compiler narrows types accurately without non-null assertions.

Why does my TypeScript code fail type safety checks with type assertions?

TypeScript code fails type safety checks when type assertions bypass compiler validation. Discouraging type assertions and non-null assertions in favor of explicit types and Zod I/O validation restores strict type safety.