jsdoc
Skill12 starsChanged 2 months agoMITView on GitHub
Write, fix, or review JSDoc documentation for JavaScript and TypeScript code. Detects whether the project uses typed JSDoc (plain JS with checkJs), TypeScript (docs without type duplication), or a doc generator (TypeDoc, JSDoc CLI), and documents accordingly. Use when adding JSDoc comments, documenting a public API, fixing doc/signature drift, or setting up doc generation.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- yamcodes/arkenvtheir own version, first seen Oct 8, 2026
- stijnvanhulle/agentstheir own version, first seen Sep 21, 2026
- ivklgn/bag-of-skillsword for word, first seen Sep 4, 2026
- CorentinGC/claude-skillstheir own version, first seen Mar 7, 2026
Other versions4 projects use a version of this.
Word for word · 1
- ivklgn/bag-of-skills★ 12100% same
Edited · 0
None found.
Wrote their own version · 3
- yamcodes/arkenv★ 151same name
- stijnvanhulle/agents★ 2same name
- CorentinGC/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- new-skillSkill
- review-and-releaseSkill
- 12-factor-appsSkill
- ask-meSkill
- audit-websiteSkill
- can-i-useSkill
- code-reviewerSkill
- compatibility-auditSkill
- explain-branch-changesSkill
- humanizer-ruSkill
- humanizerSkill
- load-branch-changesSkill
- nextjs-developerSkill
- recapSkill
- reset-permissionsSkill
- review-golangSkill
- seo-auditSkill
- simplify-code-commentsSkill
- test-health-checkSkill
- update-golang-depsSkill
- update-node-depsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read package.json, tsconfig.json/jsconfig.json, and a sample of existing doc comments.
- Very specific: line 18
Verify with npx tsc --noEmit (respecting the project's config) — typed JSDoc that doesn't check is worse than none
- Very specific: line 21
NO type braces: @param userId - The owner of the session, never @param {string} userId
- Distinctive: line 22
Never repeat what the type already says.
- Distinctive: line 31
Document, in priority order:
- Very specific: line 39
Do NOT document: trivial getters, self-explanatory parameters (@param name - The name is noise), private helpers with obvious behavior, or …
- Distinctive: line 49
Default values: prefer showing in the signature.
- Distinctive: line 60
When asked to review existing JSDoc rather than write it, walk the target files and flag with file:line:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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,@templatefor shapes and generics; import types with@typedef {import('./api').User} Useror 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:
- Exported/public API — everything a consumer can reach: functions, classes, methods, types, constants, component props
- Non-obvious contracts — units (ms vs s), ranges, nullability semantics, mutation vs copy, ordering guarantees, idempotency
- Error behavior —
@throwswith the condition, rejected promise reasons - Deprecations —
@deprecatedwith the replacement and migration hint, never bare - Tricky internals — only where the "why" isn't recoverable from the code
Do NOT document: trivial getters, self-explanatory parameters (@param name - The name is noise), private helpers with obvious behavior, or generated code.
Step 3: Write the Comments
Structure per symbol:
- First line: one-sentence summary in third person ("Parses…", "Returns…") — what it does for the caller, not how
- Blank line, then remarks only if genuinely needed: invariants, performance notes, links via
{@link Symbol} - Tags in stable order:
@template,@param,@returns,@throws,@deprecated,@example,@see @examplefor any API whose usage isn't obvious from the signature — runnable, minimal, showing the common case- Default values: prefer showing in the signature; mention in prose only when semantics are surprising
- Overloads/options objects: document each property (
@param opts.retries - …); in Mode A use a@typedeffor reused option shapes
Step 4: Verify
- Mode A: run
tsc --noEmit(or the project's typecheck script) — all JSDoc types must check - Mode B/C: run the project's lint (
eslint-plugin-jsdocrules if configured) and doc build; fix every warning you introduced - Re-read each comment against the implementation: every claim (units, errors, defaults) must be true NOW — auditing existing comments for drift is part of the job when reviewing
Review Mode
When asked to review existing JSDoc rather than write it, walk the target files and flag with file:line:
- Drift — comment contradicts the current signature or behavior (wrong param names, stale defaults, removed throws)
- Type duplication in TS projects; missing/unchecked types in typed-JS projects
- Noise — comments restating the identifier; propose deletion
- Gaps — exported symbols with non-obvious contracts and no docs
Report as a table with a concrete fix per finding; apply fixes only when the user asked for fixes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

