Jsdoc generation skill
SkillFiles & storageLets your agent write or fix JSDoc documentation comments for JavaScript and TypeScript code.
Use Jsdoc generation skill in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Jsdoc generation skill and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Jsdoc generation skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Use this skill to automatically write or fix JSDoc comments for JavaScript/TypeScript code. It handles requests to document code at any scope: a single function, all functions in a file, or just the new and changed functions in a pull request.
What this skill tells your AI
The instructions your AI receives, as published by yamcodes/arkenv in skills/jsdoc/SKILL.md and read by Ahel’s review.
This skill guides the agent in adding or updating JSDoc comments for functions in TypeScript codebases.
When to add jsdoc
- Add JSDoc to functions UNLESS the code is entirely self-explanatory or the function is named so clearly that a comment would be redundant.
- If in doubt, lean towards adding JSDoc if the function has complex logic or multiple parameters, but skip it for simple getters/setters or obvious utilities.
- For existing functions that already have JSDoc, ONLY update the JSDoc if there is a typo or if it no longer reflects the code's intent. Do NOT make redundant rephrasings or meaningless sentence shifts.
Jsdoc requirements
When generating JSDoc comments, you MUST strictly adhere to the following rules:
- Follow JSDoc Specification: Use standard block comment format (
/** ... */). - Document all inputs: Use the
@paramtag for every parameter. - Document the output: Use the
@returnstag for the return value (unless the function returnsvoidand it's obvious). - Document errors: If the function explicitly throws an error (e.g.,
throw new Error(...)), document it using the@throwstag. - NO Type Tags: The codebase uses TypeScript, so do NOT include types in the JSDoc tags. For example, use
@param id The user IDinstead of@param {string} id The user ID. - Imperative Verb Form: The description MUST use the imperative verb form. For example, use "Create a user", "Add an item", "Calculate the total" instead of "Creates a user", "Adds an item", "Calculates the total".
- No Trailing Periods in Tags: Descriptions inside
@param,@returns, and@throwstags must NOT end with a period. The main function description may end with a period, but tag descriptions should remain concise and period-free.
Example
Input:
export function calculateDiscountedPrice(basePrice: number, discountPercentage: number, taxRate?: number): number {
if (basePrice < 0) throw new Error("Price cannot be negative");
// ...
}
Output:
/**
* Calculate the final price after applying a discount and optional tax.
*
* @param basePrice The original price of the item
* @param discountPercentage The discount to apply as a percentage (e.g., 20 for 20%)
* @param taxRate The optional tax rate to apply after discount
* @returns The final calculated price
* @throws An error if the base price is negative
*/
export function calculateDiscountedPrice(basePrice: number, discountPercentage: number, taxRate?: number): number {
if (basePrice < 0) throw new Error("Price cannot be negative");
// ...
}
Applying to multiple functions
- If the user asks to apply JSDoc to all functions in a file, process every function, but remember to skip those that are trivial and self-explanatory.
- If the user asks to apply JSDoc to all changed files in a PR, use the GitHub CLI (
gh pr diffor similar) to identify which functions were added or modified, and only update those functions.
Signals
- GitHub stars
- 145
- Forks
- 6
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
jsdoc-yamcodes- Source
- github.com/yamcodes/arkenv
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · wshobson
The pick for JavaScriptsetup-ts-deep-modules
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptpptx
Skill · anthropics
More in Files & storagedocx
Skill · anthropics
More in Files & storage