.agents/skills/write-api-docs/SKILL.md
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.
npx skillsauth add remix-run/remix write-api-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
src entry files that back those exports.src/lib.pnpm run lint.The source of truth is the package's package.json.
package.json exports.src/.src/*.ts entry files define the public surface by re-exporting symbols from src/lib.src/lib is public only if it is re-exported by one of those public src/*.ts entry files.Rules:
src/lib is public.src/lib.For public API, add JSDoc to:
For public interfaces:
For public object-shaped type aliases:
interface when you are introducing a new public object shapeFor overloads:
Keep comments short, factual, and user-facing.
@param / @returns docs as needed.@returns for non-void functions and include a real description.@param, include descriptions and do not add a hyphen before the description.@param default values in parenthesis at the end of the comment, do not use @default tags@example code block when it helps to show a use-case or pattern. Skip @example for simple getters, trivial constructors, or APIs whose usage is self-evident.{@link API} to link to related Remix APIs when it adds value. Don't link every related API — use discretion to avoid noise.Good:
/**
* Creates an {@link AuthProvider} for direct credentials-based authentication.
*
* @param options Parsing and verification hooks for submitted credentials.
* @returns A provider that can be passed to `createAuthLoginRequestHandler()`.
*/
export function createCredentialsAuthProvider(...) {}
Avoid:
/**
* @param {CredentialsAuthProviderOptions} options - options
* @returns {CredentialsAuthProvider}
*/
The relevant rules live in eslint.config.js.
For packages/**/*.{ts,tsx} (excluding tests), ESLint enforces JSDoc on callable declarations such as:
Important enforced details:
jsdoc/require-paramjsdoc/require-param-namejsdoc/require-param-descriptionjsdoc/require-returnsjsdoc/require-returns-descriptionjsdoc/no-typesjsdoc/check-param-namesjsdoc/check-typesjsdoc/check-alignmentPractical implication:
package.json exports instead of guessing from src/lib?src/*.ts entry file?@param and @returns where required?pnpm run lint pass?tools
Build the UI of a Remix app. Use when creating pages, layouts, client entries, interactions, stateful UI, navigation, hydration, styling, animations, reusable mixins, or UI tests.
development
Describe the ideal layout of a Remix application, including canonical directories, route ownership, naming conventions, and file locations on disk. When asked to bootstrap that layout in a new directory, run the bundled TypeScript script.
documentation
Write or rewrite package README files in the style used by the Remix repository. Use when drafting a new package README, revising an existing README, or reviewing README structure, examples, installation instructions, and section ordering for Remix packages.
documentation
Update an existing GitHub pull request title and description so they accurately describe the pull request as it exists now. Use when the user asks to update, rewrite, refresh, fix, or tighten a PR title/body, or when the PR scope has changed and the metadata needs to be brought back in sync.