tsdoc

Write and review TSDoc doc-comments on TypeScript public API surfaces.

1|1|Updated May 24, 2026
One-click install
npx skills add https://github.com/bm629/agent-skills --skill tsdoc-bm629
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdoc
Source: https://github.com/bm629/agent-skills/tree/main/skills/tsdoc
Command: npx skills add https://github.com/bm629/agent-skills --skill tsdoc-bm629

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? TypeScript codebases often carry inconsistent doc-comments: JSDoc-style {type} annotations that duplicate the type signature, missing @param hyphens, @return instead of @returns, and comments on trivial or generated code. This Skill provides a single convention for writing conformant TSDoc comments that TypeDoc, API Extractor, and editor IntelliSense all parse correctly. ## Core Features & Use Cases - Scope decisions: Document the exported public surface (functions, classes, types, React components and props, hooks) while skipping private, generated, and trivial symbols. - Tag taxonomy guidance: Correct use of block tags (@param, @returns, @remarks, @example, @throws, @deprecated), inline tags ({@link}, {@inheritDoc}), and modifier tags (@public, @internal, @beta, @alpha). - TSDoc vs JSDoc discipline: Never repeat types in comments; document intent and behavior, with the required @param name - description hyphen syntax. - Use Case: When reviewing a TypeScript library's exported API, apply this Skill to strip redundant {type} annotations, fix malformed tags, and add summaries plus @remarks only where behavior is non-obvious. ## Quick Start Use the tsdoc skill to write conformant doc-comments for the exported functions and React components in this TypeScript file.

Frequently Asked Questions about tsdoc

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

FAQPage Schema
How do I write TSDoc comments for TypeScript functions?

Write a brief summary paragraph, then add block tags like `@param name - description` (hyphen required) and `@returns description`. Put longer detail in a `@remarks` section and never include `{type}` annotations, since TypeScript types already carry that information.

What is the difference between TSDoc and JSDoc?

TSDoc is Microsoft's standardized comment grammar for TypeScript, parsed by @microsoft/tsdoc, TypeDoc, and API Extractor. Unlike JSDoc, TSDoc tags never carry `{type}` annotations because the TypeScript signature already declares types; comments document intent and behavior only.

Which TypeScript symbols should get doc-comments?

Document the exported public API surface: functions, classes, interfaces, React components and their props, and custom hooks where behavior is non-obvious. Skip private or internal symbols, machine-generated code, and trivial self-evident one-liners.

Does Biome or ESLint validate TSDoc comment syntax?

Biome does not validate doc-comment content against the TSDoc spec; it only formats comment asterisks. For CI validation, eslint-plugin-tsdoc provides the `tsdoc/syntax` rule, but it requires ESLint, so it is an opt-in trade-off for projects using a single fast linter.

Why does the TSDoc parser warn about my @param tag?

The parser requires a hyphen separator: `@param name - description`. Writing `@param name description` without the hyphen is malformed. Other common warnings come from using `@return` instead of `@returns` or inventing non-standard tags.

When should I not use TSDoc comments?

Skip TSDoc on machine-generated code such as OpenAPI clients, on trivial self-evident members, and when setting up a documentation site, which is TypeDoc's job. TSDoc comments are the input TypeDoc consumes, not a site-generation tool.