jsdoc
Skill1 starsChanged 3 months agoMITView on GitHub
Enforces purposeful JSDoc on complex or non-obvious TypeScript code—algorithms, invariants, side effects, edge cases, and public contracts—without restating types or narrating simple code. Use when writing or reviewing TypeScript, adding documentation comments, cleaning noisy JSDoc, documenting public APIs, or when the user says jsdoc, JSDoc, document this, or add docs comments.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- sektek/skillstheir own version, first seen Nov 22, 2026
- yamcodes/arkenvtheir own version, first seen Oct 8, 2026
- stijnvanhulle/agentstheir own version, first seen Sep 21, 2026
- ivklgn/ai-kittheir own version, first seen Sep 4, 2026
- ivklgn/bag-of-skillstheir own version, first seen Sep 4, 2026
- CorentinGC/claude-skillstheir own version, first seen Mar 7, 2026
Used with
Projects with it also use humanizer.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillhumanizer
Tone enforcement patterns for external-facing community responses
Also in 3 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- yamcodes/arkenv★ 151same name
- ivklgn/ai-kit★ 12same name
- ivklgn/bag-of-skills★ 12same name
- stijnvanhulle/agents★ 1same name
- CorentinGC/claude-skills★ 0same name
- sektek/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 repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Add JSDoc only where a careful reader cannot infer intent, constraints, or failure modes from names and types alone.
- Distinctive: line 12
Document a symbol when any of these are true:
- Distinctive: line 32
Default: no comment. Silence is better than noise.
- Very specific: line 36
Types carry the shape: Do not duplicate types in JSDoc (@param {string} id) when the signature already has id: string.
- Distinctive: line 37
JSDoc carries meaning: Use prose + selective tags for behavior types cannot express.
- Very specific: line 38
Prefer @param name / @returns descriptions without type braces when documenting TS.
- Distinctive: line 39
Keep the first sentence a summary of behavior or purpose, not a restatement of the symbol name.
- Very specific: line 40
Document non-obvious generics with a short note on what T represents and any constraints beyond the type bound.
- Distinctive: line 46
Every JSDoc block you add must include:
- Distinctive: line 51
Add tags only when they earn their keep:
- Distinctive: line 63
Do not invent tags the project never uses.
- Distinctive: line 94
When asked to document a scope, report briefly:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JSDoc
Add JSDoc only where a careful reader cannot infer intent, constraints, or failure modes from names and types alone. Prefer TypeScript types for shape; use JSDoc for why, when, and what breaks.
When to Document
Document a symbol when any of these are true:
- Control flow, algorithm, or state machine is non-obvious on first look.
- Behavior depends on invariants, ordering, timing, idempotency, or concurrency.
- Side effects matter (I/O, mutation, cache, network, timers, global state).
- Failure modes, throws, empty results, or partial success are part of the contract.
- Units, ranges, formats, or domain meanings are not clear from the type.
- Public / exported API that callers will use without reading the implementation.
- Deprecation, migration, security, or compatibility constraints apply.
When Not to Document
Skip JSDoc when:
- The name + TypeScript types already explain the symbol.
- The body is a trivial getter, setter, passthrough, or one-liner map/filter.
- The comment would only restate the parameter or return type.
- The comment narrates what the next line does (
// increment i). - Generated code, tests that are self-describing fixtures, or vendored files (unless documenting a public test helper).
Default: no comment. Silence is better than noise.
TypeScript Rules
- Types carry the shape. Do not duplicate types in JSDoc (
@param {string} id) when the signature already hasid: string. - JSDoc carries meaning. Use prose + selective tags for behavior types cannot express.
- Prefer
@param name/@returnsdescriptions without type braces when documenting TS. - Keep the first sentence a summary of behavior or purpose, not a restatement of the symbol name.
- Document non-obvious generics with a short note on what
Trepresents and any constraints beyond the type bound. - For overloads, document each distinct call pattern; put shared caveats on the implementation or the primary export.
- Match existing project JSDoc style (tag set, punctuation,
@returnsvs@return) when one is already dominant.
Required Content for Documented Symbols
Every JSDoc block you add must include:
- Summary — one sentence: what it does or why it exists (not “This function…” fluff).
- Non-obvious details — only what a reader would miss: invariants, ordering, side effects, edge cases, units, security.
Add tags only when they earn their keep:
| Tag | Use when |
@param | Param semantics, units, valid ranges, or “must be…” constraints beyond the type |
@returns | Meaning of the value, empty/sentinel cases, or “never returns” style contracts |
@throws | Documented error conditions callers should handle |
@example | Non-trivial usage that types alone do not teach (keep short; one example usually enough) |
@see | Related symbol, RFC, ticket, or algorithm source |
@deprecated | Replacement path and removal intent |
@template | Only in JS files or when documenting a generic’s role; prefer TS type params in .ts |
Do not invent tags the project never uses. Prefer standard JSDoc/TS-supported tags.
Workflow
- Scope — files, symbols, or “public API only” as the user named. If unclear, prefer exported / complex symbols over private helpers.
- Scan — find candidates using the “When to Document” list. Skip obvious code.
- Audit existing JSDoc — remove or rewrite comments that restate types, lie about behavior, or narrate the obvious.
- Write — add concise blocks; prefer editing the symbol in place over separate doc files.
- Verify — re-read: would a new teammate understand the hard parts without opening every callee? Types still match the prose?
Quality Bar
Good JSDoc:
- Explains a constraint or failure mode you cannot see from the signature.
- Stays accurate if implementation details change under the same contract.
- Is shorter than the code it documents whenever possible.
Bad JSDoc:
@param id - The id@returns {Promise<User>}when the signature already says that- Essays that duplicate the function body
- Outdated comments that contradict the code (delete or fix; never leave lying docs)
Examples
Concrete good/bad patterns: examples.md.
Completion
When asked to document a scope, report briefly:
- What was documented and why it qualified.
- What was left undocumented (and that it was intentional).
- Any JSDoc removed as noise or corrected as wrong.
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.

