jsdocs

A guide for writing JSDoc comments for public Effect APIs so they meet the project's documentation and linting rules. JSDoc is structured text in source code that explains how an API should be used.

In plain words
What is it for?
Adding or correcting API comments, documenting complex options and edge cases, preparing documentation for extraction, and checking related references and gotchas.
Why use it?
It helps documentation pass automated checks while preserving accurate usage guidance, examples, categories, and warnings.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pingdotgg/t3code/jsdocs
Any agent
npx skills add pingdotgg/t3code --skill jsdocs
Clone the repo
git clone --depth 1 https://github.com/pingdotgg/t3code

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.02591
Opus 5 $0.00026 $0.01295
Sonnet 5 $0.00010 $0.00518
Haiku 4.5 $0.00005 $0.00259

Measured 2d ago against content hash 7ca4267f8063, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

jsdocs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • jsdocs — 88% identical, 61 lines differ
.repos/effect-smol/.agents/skills/jsdocs/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this skill to write well-formed JSDoc for Effect public APIs.

Workflow

When updating public API JSDoc:

  1. Inspect the declaration, implementation, nearby tests, and nearby JSDoc before editing.
  2. Decide whether the task is a single API fix or a module refinement pass.
  3. Rewrite comments into the required documentation shape while preserving correct facts and examples.
  4. For module refinements, complex APIs, or APIs with related alternatives, run the @see and **Gotchas** audits.
  5. Run the narrowest relevant validation.

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
 */

Prose Rules

  • Use sober, practical prose.
  • Write all public JSDoc prose in English.
  • 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.
  • Make the short description stand on its own. Do not rely on **When to use** to make the API understandable.
  • For functions and methods, prefer present-tense, action-first prose such as Creates, Returns, Checks, Provides, Represents, Converts, Decodes, or Formats.
  • For technical value exports, use consistent noun forms such as Schema for, Layer that, Service that, Context reference that, or Constructors and matchers for.
  • Avoid leading A or An for canonical technical nouns when the surrounding module uses a standard noun family, for example prefer Schema for ... over A schema for ....
  • Do not describe implementation mechanics when a public concept is clearer. For example, prefer Constructors and matchers for ... over wording that only says an API uses Data.taggedEnum.
  • Avoid generic purity or non-mutation remarks unless they document a real surprise, caveat, or meaningful contrast with a mutating-looking API.
  • Optional sections must appear in this order:
    1. **When to use**
    2. **Details**
    3. **Gotchas**
  • Include an optional section only when it has useful, non-empty content.
  • Prefer prose over bullet lists for single-item **Details**, **When to use**, or **Gotchas** sections. Use bullets only when there are two or more parallel facts, options, cases, or caveats.
  • **When to use** describes the positive use case for the documented API. Do not use it as a routing section for sibling APIs. If neighboring APIs need to be mentioned, put that boundary in @see tag text instead.
  • **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 clarifies the documented API's own use case.
  • **When to use** must start with one of these practical guidance forms: Use to, Use when, Use as, or Use with. Avoid bullet lists and vague openers such as Use this... or Useful for....
  • Prefer reader-centered **When to use** wording, especially Use when you ..., when the sentence describes a user's goal. Avoid third-person noun-phrase subjects such as the input is ..., a service needs ..., or values should ... when they would become awkward in generated prompts.
  • A good **When to use** sentence should still read naturally if reused as a user intent prompt, for example after I need ... or I have ....
  • Keep short and **When to use** distinct: the short description says what the API is or does; **When to use** says when to choose it.
  • Add internal @see tags only for semantically useful related public APIs.
  • Write @see tag text as normal prose after the link; no special separator is required. Prefer forms like @see {@link otherApi} for ... when a short explanation helps.
  • 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.
  • Example titles should be short use-case phrases, not generic labels.
  • Prefer gerund or action-noun titles that read naturally after for, for example Parsing JSON, Creating a scoped runtime, or Comparing structs.
  • Avoid imperative titles such as Parse JSON, vague labels such as Syntax or Basic usage, and title-cased fragments such as String Ordering.
  • Preserve canonical technical capitalization inside the phrase, such as Option, Effect, Schema, DateTime, HashMap, Base64, and JSON.
  • For multiple examples on the same API, make each title describe the distinct use case shown by that example.
  • Prefer examples with stable, deterministic output. Avoid assertions or console.log comments that depend on stack traces, object inspection, Error formatting, concurrency order, timing, randomness, or environment-specific formatting. Examples may assume Node.js console formatting. Direct Set / Map output is acceptable when insertion order is deterministic and the expected output uses Node's format; otherwise demonstrate a stable property instead.
  • 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}.
  • Avoid overlinking in prose. Use {@link Symbol} only when navigation to that symbol helps the reader choose or understand the API. For the API being documented, the module's central type, nearby obvious names, or repeated mentions, prefer plain code formatting such as Cause, Effect, or Context.
  • 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.
  • For low-level public values, prefer accurate categories such as symbols, type IDs, or prototypes over compensating with verbose descriptions.

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 204 lines · 52 tokens per session scan A 7ca4267f8063

Subscribe to this mod's changes

jsdocs is a skill published in the GitHub repository pingdotgg/t3code (21,041 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 2,591 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens