marginalia

Add concise JSDoc to exported JavaScript and TypeScript APIs.

2|Updated May 21, 2026
One-click install
npx skills add https://github.com/howells/skills --skill marginalia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: marginalia
Source: https://github.com/howells/skills/tree/main/marginalia
Command: npx skills add https://github.com/howells/skills --skill marginalia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Marginalia removes the guesswork in JavaScript/TypeScript codebases by adding concise, IDE-friendly JSDoc exactly where it matters most: public APIs and complex behavior.

Core Features & Use Cases

  • Improve IDE hover and generated docs: Ensures public exports and package surfaces have documentation that matches real behavior and constraints.
  • Document tricky boundaries: Adds JSDoc for generics, overloads, callback contracts, side effects, async behavior, lifecycle/SSR expectations, and runtime constraints.
  • Keep comments brief and useful: Avoids documentation theater by using the smallest comment density that satisfies the request.

Quick Start

Use the marginalia skill to add concise JSDoc to the exported functions in a TypeScript package’s public API surface, without changing behavior.

Frequently Asked Questions about marginalia

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

FAQPage Schema
How do I add JSDoc to exported TypeScript functions for better IDE hover tooltips?

Adding JSDoc to exported TypeScript functions involves reading implementation and usage to generate high-signal comments for public APIs. This ensures IDE hovers and generated documentation accurately reflect real behavior and constraints without changing the underlying code.

What is the best way to document React component hooks and complex generics in JavaScript?

The best way to document React component hooks and complex generics is to infer the documentation target and read relevant implementation. This adds brief JSDoc describing callback contracts, side effects, and async behavior while keeping comment density minimal and useful.

Can I generate API documentation for public package exports without creating stale comments?

Yes, you can generate API documentation for public package exports without stale comments by reading relevant implementation and usage first. This approach avoids guesswork and chooses the smallest effective documentation density to match actual constraints.

Does adding JSDoc to public APIs require modifying the existing code behavior?

No, adding JSDoc to public APIs does not require modifying existing code behavior. The process strictly adds documentation comments to exported symbols across modules and validates them via existing repo tooling, leaving the implementation untouched.

When should I avoid adding JSDoc to my JavaScript and TypeScript codebase?

You should avoid adding JSDoc when it results in documentation theater. If the implementation cannot support concise, high-signal comments that satisfy IDE hover quality and runtime constraints, adding unnecessary comments increases maintenance without value.