19
0
Source

Guidelines for writing minimal, high-quality JSDoc comments in TypeScript.

Install

mkdir -p .claude/skills/jsdoc && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1694" && unzip -o skill.zip -d .claude/skills/jsdoc && rm skill.zip

Installs to .claude/skills/jsdoc

About this skill

JSDoc Skill

This skill provides simple, focused guidelines for writing JSDoc comments in TypeScript codebases.

When to Use

  • Documenting type properties and configuration options
  • Adding context that TypeScript types don't convey
  • Providing usage examples for complex APIs
  • Writing inline documentation for generated docs

What It Does

  • Defines simple JSDoc conventions for TypeScript
  • Focuses on property-level documentation with inline comments
  • Uses minimal tags for maximum clarity (@default, @example, @note)
  • Avoids redundant tags that duplicate TypeScript type information
  • Ensures consistent documentation style across the codebase

How to Use

Write inline JSDoc comments directly above properties, focusing on what the option does rather than repeating type information.

Basic Structure

export type Options = {
  /**
   * Brief description of what this property does.
   * @default 'defaultValue'
   */
  propertyName?: string
}

Common Tags

Use Frequently

TagPurposeExample
@defaultDefault value@default 'dist'
@exampleUsage example@example serverIndex: 0
@noteImportant caveat@note May change in v2
@deprecatedMark as deprecated@deprecated Use newOption instead

Use Sparingly

TagPurposeExample
@seeReference docs@see https://example.com/docs
@internalInternal API@internal
@betaExperimental@beta

Avoid (TypeScript Provides)

  • @param - Use TypeScript parameters
  • @returns - Use TypeScript return type
  • @type - Use TypeScript type annotation
  • @typedef - Use type or interface

Documentation Patterns

Simple Property

/** Output directory for generated files. */
outDir?: string

Property with Default

/**
 * Set a suffix for generated files.
 * @default 'generated'
 */
suffix?: string

Enum with Options

/**
 * Choose output format.
 * - 'type' generates type aliases
 * - 'interface' generates interfaces
 * @default 'type'
 */
format?: 'type' | 'interface'

Property with Example

/**
 * Server index to use.
 * @example
 * - `0` returns production URL
 * - `1` returns development URL
 */
serverIndex?: number

Nested Properties

transformers?: {
  /** Customize file names. */
  name?: (name: string) => string
  /** Customize output paths. */
  path?: (path: string) => string
}

Function Documentation

Only add JSDoc when it adds value beyond the signature:

// ✅ No JSDoc needed - signature is clear
function camelCase(str: string): string {
  return str.replace(/-./g, x => x[1].toUpperCase())
}

// ✅ JSDoc adds value - explains behavior
/**
 * Convert path to template string.
 * @example /api/{id} => `/api/${id}`
 */
function toTemplate(path: string): string {
  // implementation
}

Guidelines

✅ DO:

  • Document what the property does, not the type
  • Include @default for default values
  • Add @example for complex or non-obvious usage
  • Use @note for version info or important caveats
  • Keep descriptions concise and focused

❌ DON'T:

  • Use @param or @returns tags
  • Repeat information from TypeScript types
  • Over-document simple, self-explanatory properties
  • Write redundant descriptions

Tag Order

For consistency, use this tag order:

  1. Description (required)
  2. @default (if applicable)
  3. @example (if helpful)
  4. @note (if needed)
  5. @deprecated (if applicable)
  6. @see (if providing references)

Related Skills

SkillUse For
../documentation/SKILL.mdWriting markdown documentation files
../coding-style/SKILL.mdGeneral coding conventions

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

286790

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

212415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

209292

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

218234

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

171200

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.