Skip to content
Agentmart
Submit a tool

jsdoc

Use when writing or reviewing JSDoc on JavaScript/TypeScript functions, for required tags, typedef rules, and formatting.

Skill by ioncache

IndexedMIT
Write a review

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/ioncache-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.

We use your email only for this newsletter. Privacy

About

Use when writing or reviewing JSDoc on JavaScript/TypeScript functions, for required tags, typedef rules, and formatting. Opinionated JS/TS documentation standard.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/jsdoc

What's inside

Skill name
jsdoc
Description
Use when writing or reviewing JSDoc on JavaScript/TypeScript functions, for required tags, typedef rules, and formatting. Opinionated JS/TS documentation standard.
License
MIT
Instructions
128 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# JSDoc Documentation Standards

## CRITICAL REQUIREMENTS

1. **Every function MUST have JSDoc**, no exceptions
2. **NO inline type definitions**, use typedefs or imported types
3. **Import types from packages**, use `import('package').Type` syntax
4. **Include function description**, clear explanation of what it does
5. **Add @example for functions with I/O**, show actual usage patterns
6. **Add @throws for each error type**, document every throw statement with
   specific error condition

## Type Definition Rules

**Use `import()` for external types:**

```javascript
/**
 * @typedef {import('fastify').FastifyInstance} FastifyInstance
 * @typedef {import('mongodb').Collection} Collection
 */
```

**Define custom types as typedefs:**

```javascript
/**
 * @typedef {'optimal'|'warning'|'danger'} RangeType
 * @typedef {Object} EncounterFilters
 * @property {string} [member_id] - Member UUID
 * @property {string} [staff_id] - Staff UUID
 * @property {number} [page=1] - Page number
 * @property {number} [limit=100] - Items per page
 */
```

**Use `[...]` for arrays, not `Array<...>`:**

```javascript
@param {[number, number][]} ranges - Array of [min, max] pairs
@returns {string[]} Array of user IDs
```

## Complete Function Documentation

Every function needs:

1. **Description**, what the function does
2. **@param**, all parameters with imported/typedef types
3. **@returns**, return type (use `Promise<Type>` for async)
4. **@throws**, document error conditions
5. **@example**, usage example for functions with parameters or return values

```javascript
/**
 * Retrieves and enriches records with optional pagination.
 *
 * @param {import('mongodb').Collection} collection - MongoDB collection
 * @param {EncounterFilters} filters - Filter criteria
 * @returns {Promise<object>} Enriched results
 * @throws {Error} When the database operation fails
 *
 * @example
 * const result = await getRecords(collection, {
 *   member_id: 'uuid-123',
 *   page: 1,
 *   limit: 50
 * })
 */
async function getRecords(collection, filters) {
  // Implementation
}
```

## Type Accuracy Checklist

When documenting types, verify:

- [ ] Types match actual data passed to function
- [ ] Return types match actual returned data
- [ ] Optional params marked with `[param]` or `[param=default]`
- [ ] Nullable types marked with `|null` or `|undefined`
- [ ] Union types used for multiple accepted types
- [ ] No inline `Object`, use typedef or imported type
- [ ] Array element types specified: `[ElementType]`
- [ ] Async functions return `Promise<Type>`

## Common Patterns

**Optional parameters with defaults:**

```javascript
@param {number} [page=1] - Page number
@param {boolean} [include_counts=false] - Include counts
```

**Multiple type options:**

```javascript
@param {string|number} id - User ID
@returns {User|null} User object or null if not found
```

**Destructured parameters:**

Define a typedef for the parameter object and reference it. Never use an inline
`{Object}` (see CRITICAL REQUIREMENTS).

```javascript
/**
 * @typedef {Object} ProcessOptions
 * @property {string} memberId - Member UUID
 * @property {boolean} [includeCounts] - Include counts
 */

/**
 * @param {ProcessOptions} options
 */
function process({ memberId, includeCounts }) {}

From ioncache/ioncache-ai-tools, MIT.

More from ioncache/ioncache-ai-tools

Signals

Stars
0
Forks
0
Open issues
3
Last commit (this folder)
Jul 29, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ioncache

Cite this page

jsdoc skill. Agent Mart. https://agentmart.dev/skills/ioncache-jsdoc (last updated 2026-10-24)