Full JSDoc format guide for TypeScript, covering @example formats, tag usage, documentation patterns, and tag ordering conventions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/toolkit:jsdocThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The detailed JSDoc format guide with examples for every case. The always-on essentials live in
The detailed JSDoc format guide with examples for every case. The always-on essentials live in
the jsdoc rule. Reach here when you need the full reference.
@example format@example line, code as inline backtick on the next line/**
* @example Required parameter
* `name: Type`
*
* @example Optional parameter
* `name?: Type`
*/
@example/**
* @example
* ```ts
* const result = buildParams(node, {
* paramsType: 'inline',
* })
* ```
*/
@example blocks/**
* @example Object mode
* `{ id, data, params }: { id: string; data: Data; params?: QueryParams }`
*
* @example Inline mode
* `id: string, data: Data, params?: QueryParams`
*/
| Rule | Correct | Incorrect |
|---|---|---|
| Label + inline code | @example Required\n\name: Type`` | @example \name: Type`` (code on tag line) |
| Multi-line code | Fenced ```ts ``` block | Bare code lines without a fence |
| Short examples | Inline backtick | Triple-backtick fence (too heavy) |
| One concern per example | Separate @example blocks | One example covering all cases |
| Tag | Purpose | Notes |
|---|---|---|
@default | Default value | Only when the default is non-obvious (omit for undefined) |
@example | Usage example | Prefer for complex or multi-variant APIs |
@note | Important caveat | Version info, breaking changes |
@deprecated | Mark as deprecated | Include a migration path |
| Tag | Purpose |
|---|---|
@see | Reference external docs |
@internal | Internal API |
@beta | Experimental |
@param: use TypeScript parameter types@returns: use the TypeScript return type@type: use a TypeScript type annotation@typedef: use type or interface@default undefined: optional (?) already implies this/**
* Output directory for generated files.
*/
outDir?: string
Never use single-line /** description */. Always expand to multi-line.
/**
* Maximum number of concurrent callbacks during traversal.
* Higher values overlap I/O-bound work; lower values reduce memory pressure.
*
* @default 30
*/
concurrency?: number
Do not add @default false or @default undefined when the TypeScript type already makes the
default obvious.
/**
* How path parameters are emitted in the function signature.
* - `'object'` groups them as a single destructured parameter
* - `'inline'` spreads them as individual parameters
* - `'inlineSpread'` emits a single rest parameter
*/
pathParamsType: 'object' | 'inline' | 'inlineSpread'
names?: {
/**
* Name for the request body parameter.
* @default 'data'
*/
data?: string
/**
* Name for the query parameters group parameter.
* @default 'params'
*/
params?: string
}
Only add JSDoc when it adds value beyond the signature:
// No JSDoc needed: the signature is self-explanatory
function camelCase(str: string): string { ... }
// JSDoc adds value: it explains behavior and non-obvious edge cases
/**
* Returns `true` when the schema resolves to a plain string output.
*
* - `string`, `uuid`, `email`, `url`, `datetime` are always plain strings.
* - `date` and `time` are plain strings when their `representation` is `'string'`.
*/
function isStringType(node: SchemaNode): boolean { ... }
Do:
@default only when the default is non-obvious@example blocks for different variants@example labels short and descriptiveDo not:
/** description */@default undefined@example line@param or @returns tags@default (if non-obvious)@example (one or more)@note (if needed)@deprecated (if applicable)@see (if providing references)npx claudepluginhub stijnvanhulle/template --plugin toolkitGenerates TypeScript documentation using JSDoc, TypeDoc, ADRs, and framework patterns for NestJS, Express, React, Angular, Vue. Use for API docs, code examples, and multi-audience explanations.
Generates, formats, and validates technical documentation: docstrings (Google, NumPy, JSDoc), OpenAPI/Swagger specs, doc portals, tutorials, and user guides. Validates code examples with language-specific tools.
Generates docstrings, OpenAPI specs, JSDoc annotations, and developer guides. Validates code examples and reports coverage.