Use this skill to write well-formed JSDoc for Effect public APIs.
Required documentation shape
Use a normal multiline JSDoc comment in TypeScript source:
/**
* Short description as one paragraph.
*
* **When to use**
*
* Optional practical usage guidance.
*
* **Details**
*
* Optional details for complex APIs, options, overloads, or behavior.
*
* **Gotchas**
*
* Optional edge cases, footguns, or surprising behavior.
*
* **Example** (Short title)
*
* Optional prose explaining the example.
*
* ```ts
* const result = example()
* ```
*
* @category constructors
* @since 1.0.0
*/
Writing rules
- Use sober, practical prose.
- Do not use jargon when a plain word works.
- Do not be clever.
- Do not add filler sections.
- The short description is required and must be exactly one paragraph.
- Optional sections must appear in this order:
**When to use**
**Details**
**Gotchas**
- Include an optional section only when it has useful, non-empty content.
**When to use** is important when the API has close alternatives, trade-offs, or @see tags. If @see tags are present, inspect the referenced APIs and add **When to use** when it helps readers choose between them.
- Add
@see only for APIs that are similar to the documented API but intended for different situations or usage patterns. Do not add @see for loosely related helpers, dependencies, implementation details, or general background links.
- Before deciding whether to include
**Gotchas**, inspect the implementation and nearby tests for edge cases, footguns, preconditions, surprising behavior, or important failure modes. Add **Gotchas** only when you find a real gotcha worth documenting.
- Use exactly one blank line between the short description, sections, examples, and tags.
- Do not use Markdown headings such as
# Heading or ad hoc bold headings such as **Notes**; only the standard headings are allowed.
- Examples must use
**Example** (Title), optional prose, and exactly one non-empty ts code fence.
- Example titles must be unique after trimming and lowercasing.
- Do not use
@example.
- Do not put TypeScript code fences outside
**Example** (Title) sections.
- Inline
{@link Symbol} targets must resolve to TypeScript symbols; do not link to URLs with {@link}.
- Do not document module-level comments; module JSDoc is ignored by this rule.
@internal means the item is ignored; do not rewrite it as public docs.
- Default exports are ignored by this rule and do not need JSDoc.
- Do not add unsupported constructs such as enums or empty exports in checked files.
Tag rules
When multiple tags are present, keep them in this order:
@deprecated
@default
@see
@category
@since
Root declarations:
- Require
@category.
- Require
@since with stable semver like 1.2.3.
- May use
@deprecated with a non-empty message.
- May use repeated non-empty
@see tags, but only for similar APIs with different usage patterns.
- Must not use
@default.
Namespaces and declarations inside namespaces:
- Require
@since with stable semver like 1.2.3.
- May use optional
@category.
- May use
@deprecated with a non-empty message.
- May use repeated non-empty
@see tags, but only for similar APIs with different usage patterns.
- Must not use
@default.
Members:
- JSDoc is optional.
- When member JSDoc is present, it must follow the same short description, section, example, spacing, and tag-order rules.
- May use optional
@since with stable semver like 1.2.3.
- May use
@default with a non-empty value.
- May use
@deprecated with a non-empty message.
- May use repeated non-empty
@see tags, but only for similar APIs with different usage patterns.
- Must not use
@category.
Updating existing JSDoc
When fixing or updating existing docs:
- Preserve correct facts and examples.
- Rewrite the layout into the standard template.
- Move usage guidance into
**When to use**; when @see tags are present, inspect the referenced APIs and explain selection guidance if useful.
- Move option, overload, and behavior details into
**Details**.
- Move caveats into
**Gotchas**; if no caveat is already documented, inspect the implementation and nearby tests before deciding whether a **Gotchas** section is warranted.
- Convert
@example tags and loose ts fences into **Example** (Title) sections.
- Preserve valid
@see, @deprecated, @default, @category, and @since tags.
- Remove
@see tags that do not point to similar APIs with meaningfully different usage patterns.
- Remove sections that would be empty.
Validation
After changing JSDoc governed by the rule, run the narrowest relevant validation:
pnpm test packages/tools/oxc/test/standard-jsdoc.test.ts
pnpm check:tsgo
If the changed package has generated docs, also run pnpm docgen from that package directory.
Source: backpine/effect-worker-mono — distributed by TomeVault.
1---2name: standard-jsdoc3description: Write, insert, or update Effect public API JSDoc so it satisfies the standard-jsdoc oxlint rule. Use when adding or fixing JSDoc comments, resolving standard-jsdoc diagnostics, preparing docs for JSON extraction, or reviewing public API documentation. Use when this capability is needed.4---56Use this skill to write well-formed JSDoc for Effect public APIs.78## Required documentation shape910Use a normal multiline JSDoc comment in TypeScript source:1112```ts13/**14 * Short description as one paragraph.15 *16 * **When to use**17 *18 * Optional practical usage guidance.19 *20 * **Details**21 *22 * Optional details for complex APIs, options, overloads, or behavior.23 *24 * **Gotchas**25 *26 * Optional edge cases, footguns, or surprising behavior.27 *28 * **Example** (Short title)29 *30 * Optional prose explaining the example.31 *32 * ```ts33 * const result = example()34 * ```35 *36 * @category constructors37 * @since 1.0.038 */39```4041## Writing rules4243- Use sober, practical prose.44- Do not use jargon when a plain word works.45- Do not be clever.46- Do not add filler sections.47- The short description is required and must be exactly one paragraph.48- Optional sections must appear in this order:49 1. `**When to use**`50 2. `**Details**`51 3. `**Gotchas**`52- Include an optional section only when it has useful, non-empty content.53- `**When to use**` is important when the API has close alternatives, trade-offs, or `@see` tags. If `@see` tags are present, inspect the referenced APIs and add `**When to use**` when it helps readers choose between them.54- Add `@see` only for APIs that are similar to the documented API but intended for different situations or usage patterns. Do not add `@see` for loosely related helpers, dependencies, implementation details, or general background links.55- Before deciding whether to include `**Gotchas**`, inspect the implementation and nearby tests for edge cases, footguns, preconditions, surprising behavior, or important failure modes. Add `**Gotchas**` only when you find a real gotcha worth documenting.56- Use exactly one blank line between the short description, sections, examples, and tags.57- Do not use Markdown headings such as `# Heading` or ad hoc bold headings such as `**Notes**`; only the standard headings are allowed.58- Examples must use `**Example** (Title)`, optional prose, and exactly one non-empty `ts` code fence.59- Example titles must be unique after trimming and lowercasing.60- Do not use `@example`.61- Do not put TypeScript code fences outside `**Example** (Title)` sections.62- Inline `{@link Symbol}` targets must resolve to TypeScript symbols; do not link to URLs with `{@link}`.63- Do not document module-level comments; module JSDoc is ignored by this rule.64- `@internal` means the item is ignored; do not rewrite it as public docs.65- Default exports are ignored by this rule and do not need JSDoc.66- Do not add unsupported constructs such as enums or empty exports in checked files.6768## Tag rules6970When multiple tags are present, keep them in this order:71721. `@deprecated`732. `@default`743. `@see`754. `@category`765. `@since`7778Root declarations:7980- Require `@category`.81- Require `@since` with stable semver like `1.2.3`.82- May use `@deprecated` with a non-empty message.83- May use repeated non-empty `@see` tags, but only for similar APIs with different usage patterns.84- Must not use `@default`.8586Namespaces and declarations inside namespaces:8788- Require `@since` with stable semver like `1.2.3`.89- May use optional `@category`.90- May use `@deprecated` with a non-empty message.91- May use repeated non-empty `@see` tags, but only for similar APIs with different usage patterns.92- Must not use `@default`.9394Members:9596- JSDoc is optional.97- When member JSDoc is present, it must follow the same short description, section, example, spacing, and tag-order rules.98- May use optional `@since` with stable semver like `1.2.3`.99- May use `@default` with a non-empty value.100- May use `@deprecated` with a non-empty message.101- May use repeated non-empty `@see` tags, but only for similar APIs with different usage patterns.102- Must not use `@category`.103104## Updating existing JSDoc105106When fixing or updating existing docs:1071081. Preserve correct facts and examples.1092. Rewrite the layout into the standard template.1103. Move usage guidance into `**When to use**`; when `@see` tags are present, inspect the referenced APIs and explain selection guidance if useful.1114. Move option, overload, and behavior details into `**Details**`.1125. Move caveats into `**Gotchas**`; if no caveat is already documented, inspect the implementation and nearby tests before deciding whether a `**Gotchas**` section is warranted.1136. Convert `@example` tags and loose `ts` fences into `**Example** (Title)` sections.1147. Preserve valid `@see`, `@deprecated`, `@default`, `@category`, and `@since` tags.1158. Remove `@see` tags that do not point to similar APIs with meaningfully different usage patterns.1169. Remove sections that would be empty.117118## Validation119120After changing JSDoc governed by the rule, run the narrowest relevant validation:121122```sh123pnpm test packages/tools/oxc/test/standard-jsdoc.test.ts124pnpm check:tsgo125```126127If the changed package has generated docs, also run `pnpm docgen` from that package directory.128129---130> Source: [backpine/effect-worker-mono](https://github.com/backpine/effect-worker-mono) — distributed by [TomeVault](https://tomevault.io).131<!-- tomevault:4.0:skill_md:2026-06-24 -->