jsdoc

A set of instructions for writing documentation comments in JavaScript and TypeScript using JSDoc, a standard format for describing code. It adapts the comments to the project's type-checking and documentation setup.

In plain words
What is it for?
It helps add, fix, or review documentation for public functions, types, callbacks, and APIs. It can also guide checks for typed JSDoc in JavaScript projects.
Why use it?
It helps documentation explain behavior that function signatures do not show, such as units, rules, errors, and examples. It also avoids duplicating types that TypeScript already provides.

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/ivklgn/ai-kit/jsdoc
Any agent
npx skills add ivklgn/ai-kit --skill jsdoc
Clone the repo
git clone --depth 1 https://github.com/ivklgn/ai-kit

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00088 $0.01136
Opus 5 $0.00044 $0.00568
Sonnet 5 $0.00018 $0.00227
Haiku 4.5 $0.00009 $0.00114

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

Security

Grade B, and why

jsdoc scanned grade B with 1 finding 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

**Mode C — Doc generator present.** `typedoc`, `jsdoc`, or `documentation` in devDependencies or scripts: match its tag dialect and config (entry points, `@group`/`@category` conventions), and verify the build (`npm run
plugins/ai-kit/skills/jsdoc/SKILL.md · 68 lines

How it starts

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

JSDoc Skill

You are documenting JavaScript/TypeScript code with JSDoc. Good doc comments state the contract the signature cannot: meaning, units, invariants, error behavior, and examples. Bad doc comments restate the code. Produce only the first kind.

Step 1: Detect the Documentation Mode

Read package.json, tsconfig.json/jsconfig.json, and a sample of existing doc comments. Pick the mode — it changes what a correct comment looks like:

Mode A — Typed JSDoc (plain JS). Signals: .js sources with checkJs/// @ts-check, or JSDoc types used for editor intellisense. Types live IN the comments and are load-bearing:

  • Full type annotations: @param {Map<string, number>} counts, @returns {Promise<User|null>}
  • @typedef, @callback, @template for shapes and generics; import types with @typedef {import('./api').User} User or inline @type {import('./api').User}
  • Verify with npx tsc --noEmit (respecting the project's config) — typed JSDoc that doesn't check is worse than none

Mode B — TypeScript sources. Types live in the signature; JSDoc adds semantics only:

  • NO type braces: @param userId - The owner of the session, never @param {string} userId
  • Never repeat what the type already says; if a comment would only restate the signature, omit it
  • TSDoc-flavored tags when the project uses TypeDoc/API Extractor (@remarks, @internal, @alpha/@beta)

Mode C — Doc generator present. typedoc, jsdoc, or documentation in devDependencies or scripts: match its tag dialect and config (entry points, @group/@category conventions), and verify the build (npm run docs or equivalent) emits without warnings.

Match existing comment style: sentence casing, hyphen after param name, blank lines, @example formatting. Consistency beats personal preference.

Step 2: Decide What Deserves Documentation

Document, in priority order:

  1. Exported/public API — everything a consumer can reach: functions, classes, methods, types, constants, component props
  2. Non-obvious contracts — units (ms vs s), ranges, nullability semantics, mutation vs copy, ordering guarantees, idempotency
  3. Error behavior@throws with the condition, rejected promise reasons
  4. Deprecations@deprecated with the replacement and migration hint, never bare
  5. Tricky internals — only where the "why" isn't recoverable from the code

Read the full file on GitHub · 68 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 · 68 lines · 88 tokens per session scan B 2c2fdbd29ac6

Subscribe to this mod's changes

jsdoc is a skill published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed 15d ago), licensed MIT. It adds 88 tokens to every session and 1,136 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). 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

semantix-guide

Troubleshoot and configure Semantix capabilities: Skills (project/custom/global/builtin priority, discovery dirs), Commands (override order, /dir:file naming), Hooks (11 events, automatic project loading, matchers, timeouts), MCP (semantix-agent.toml + .mcp.json + plugin packages, autostart), plugin packages…

Gnosil/semantix · 115 tokens

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

agent-eval

Use when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual recall) or agent trajectories (tool correctness, completion), or picking an eval framework. NOT building the agent loop, tools or RAG…

ericrisco/rsc-harness · 79 tokens

review-full

Run a comprehensive multi-perspective code review on recent changes. Also triggers on 'is this secure?', 'security review', 'check for vulnerabilities', 'could this be exploited?' for security-focused review. Produces: GO/NO-GO verdict + findings table (Severity | Category | File:Line | Issue | Recommendation)…

faizkhairi/claude-code-blueprint · 120 tokens

e2e-check

Run E2E tests or interactive browser verification. Triggers on: 'run e2e', 'e2e test', 'browser test', 'check in browser', 'verify UI', 'interactive test'.

faizkhairi/claude-code-blueprint · 48 tokens

elicit-requirements

Structured pre-feature requirements gathering. Run before writing any new feature or API endpoint to clarify scope, acceptance criteria, and technical constraints. Produces: a Requirements Summary (Problem | Scope | Stories | Acceptance Criteria | Out of Scope | Open Questions), presented to the user for confirmation…

faizkhairi/claude-code-blueprint · 79 tokens