jsdoc
Use this skill to automatically write or fix JSDoc comments for JavaScript/TypeScript code.
Skill by yamcodes
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yamcodes-jsdoc
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
jsdoc- Description
- 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.
- License
- MIT
- Metadata
- internal: true
- Instructions
- 57 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- evals.json · evals/
SKILL.md (first lines)
# Jsdoc generation skill
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:
1. **Follow JSDoc Specification**: Use standard block comment format (`/** ... */`).
2. **Document all inputs**: Use the `@param` tag for every parameter.
3. **Document the output**: Use the `@returns` tag for the return value (unless the function returns `void` and it's obvious).
4. **Document errors**: If the function explicitly throws an error (e.g., `throw new Error(...)`), document it using the `@throws` tag.
5. **NO Type Tags**: The codebase uses TypeScript, so do NOT include types in the JSDoc tags. For example, use `@param id The user ID` instead of `@param {string} id The user ID`.
6. **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".
7. **No Trailing Periods in Tags**: Descriptions inside `@param`, `@returns`, and `@throws` tags 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:**
```typescript
export function calculateDiscountedPrice(basePrice: number, discountPercentage: number, taxRate?: number): number {
if (basePrice < 0) throw new Error("Price cannot be negative");
// ...
}
```
**Output:**
```typescript
/**
* 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 diff` or similar) to identify which functions were added or modified, and only update those functions.From yamcodes/the-hat, MIT.
More from yamcodes/the-hat
- 0.522score
codebase-design
yamcodes
Shared vocabulary for designing deep modules.
SkillBFreshness: B★ 1Claude Code +9 - 0.522score
domain-modeling
yamcodes
Build and sharpen a project's domain model.
SkillBFreshness: B★ 1Claude Code +9 - 0.522score
grilling
yamcodes
Grill the user relentlessly about a plan, decision, or idea.
SkillBFreshness: B★ 1Claude Code +9 - 0.511score
implement
yamcodes
Implement a piece of work based on a spec or set of tickets.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 6
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/yamcodes/the-hat
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from yamcodes
- 0.789score
create-skill
yamcodes
Create new skills, modify and improve existing skills, and measure skill performance.
SkillAFreshness: A★ 147Claude Code +9 - 0.786score
gh-cli
yamcodes
Use for GitHub-related tasks such as managing issues, pull requests, actions runs, and repository configuration using the GitHub CLI (gh).
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
code-review
yamcodes
Fetch, analyze, and address code reviews and comments on GitHub, or perform a code review on changes in the workspace.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
forward-port
yamcodes
Manually forward-ports merged dev (v0) changes to the v1 branch, adapting code to v1's package layout and changeset names.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
arkenv
yamcodes
Answer questions about ArkEnv and help implement environment variable validation.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
groom-issue
yamcodes
Groom a poorly written issue by grilling the user to clarify requirements, updating the issue on GitHub via the gh cli, and utilizing the triage skill to…
SkillAFreshness: A★ 147Claude Code +9
Cite this page
jsdoc skill. Agent Mart. https://agentmart.dev/skills/yamcodes-jsdoc (last updated 2026-10-24)