| name | write-api-docs |
| description | Write or audit public API docs for Remix packages. Use when adding or tightening JSDoc on exported functions, classes, interfaces, type aliases, or option objects. |
Write API Docs
Overview
Use this skill when documenting public APIs in Remix packages.
The goal is to document the API users can actually import, not every helper in src/lib. Work from the package exports outward, add concise JSDoc to the public declarations, and make sure the result passes the repo's ESLint JSDoc rules.
This skill owns detailed JSDoc style and lint expectations. If documenting an API reveals that the TypeScript contract itself should change, use the typescript-expert skill for the type design work.
Workflow
- Identify the package's public exports.
- Find the
src entry files that back those exports.
- Trace those entry files to the declarations they re-export from
src/lib.
- Add or tighten JSDoc on the public declarations only.
- Run package typecheck if appropriate and always run
pnpm run lint.
How To Identify Public API
The source of truth is the package's package.json.
- Start with
package.json exports.
- Each public export should map to a file directly under
src/.
- Those
src/*.ts entry files define the public surface by re-exporting symbols from src/lib.
- A declaration in
src/lib is public only if it is re-exported by one of those public src/*.ts entry files.
Rules:
- Do not assume everything in
src/lib is public.