typescript-tsdoc

Standardize TSDoc blocks for TypeScript declarations and exports.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/leodiegues/skills --skill typescript-tsdoc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-tsdoc
Source: https://github.com/leodiegues/skills/tree/main/skills/typescript-tsdoc
Command: npx skills add https://github.com/leodiegues/skills --skill typescript-tsdoc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents inconsistent or missing documentation in TypeScript code by enforcing clear, correct TSDoc usage across public APIs and important declarations.

Core Features & Use Cases

  • Declaration-only documentation: Ensures TSDoc is added to exports and declarations rather than inside executable blocks.
  • Consistent depth and visibility: Applies richer tags for public declarations and lighter one-liners for private/internal cases.
  • Style matching: Recommends scanning existing code for current TSDoc/JSDoc patterns and aligning with them.
  • Tag correctness and linking: Supports a structured tag set (including @remarks, @example, @defaultValue, and {@link}) with ordering conventions.

Quick Start

Use the typescript-tsdoc skill when editing a .ts or .tsx file to add or fix TSDoc blocks on exported/public declarations without inserting comments inside function bodies.

Frequently Asked Questions about typescript-tsdoc

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

FAQPage Schema
How do I add TSDoc comments to TypeScript declarations consistently?

To add consistent TSDoc to TypeScript, apply declaration-level documentation blocks to exported functions, interfaces, and React components rather than inserting inline comments inside executable function bodies.

What is the best way to standardize TSDoc tags across a TypeScript codebase?

Standardizing TSDoc tags involves scanning existing codebase conventions to match current patterns, then enforcing structured tag ordering with @remarks, @example, @defaultValue, and {@link} across all public API declarations.

Does TSDoc documentation depth differ for public versus private TypeScript declarations?

Yes, TSDoc documentation depth scales with visibility: richer tag sets apply to public declarations, while lighter one-liners suit private or internal cases to avoid unnecessary verbosity in TypeScript files.

Can I document React components using TSDoc in .tsx files?

You can document React components in .tsx files by adding TSDoc blocks directly to the component declarations, ensuring consistent documentation without placing comments inside the executable JSX return blocks.

Why should TSDoc comments not go inside TypeScript function bodies?

TSDoc comments should not go inside executable blocks because TSDoc is designed for declaration-level API documentation, ensuring public interfaces, type aliases, and classes are properly surfaced for IntelliSense.

How do I fix missing or inconsistent TSDoc in an existing TypeScript project?

To fix inconsistent TSDoc, scan the existing TypeScript project for current documentation patterns, then convert missing or malformed developer comments into correct, declaration-level TSDoc blocks aligned with those conventions.