jsdoc-gen for Openclaw

An automated documentation tool that generates JSDoc or TSDoc comments for exported functions and classes without modifying code logic.

lxgicstudios
v1.0.0
Jan 29, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install jsdoc-gen

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install jsdoc-gen using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is jsdoc-gen?

The jsdoc-gen skill is a specialized utility within the Openclaw Skills ecosystem designed to solve the problem of undocumented codebases. It automatically scans your JavaScript or TypeScript files to identify exported members and generates descriptive, context-aware documentation blocks. By interpreting function signatures and logic, it provides meaningful descriptions for parameters, return types, and potential exceptions, ensuring your code remains readable and professional.

This tool is ideal for developers who want to maintain high documentation standards without the manual overhead. Because it focuses strictly on exports and preserves existing logic, it serves as a safe and efficient way to improve IDE intellisense and developer onboarding. As part of the broader collection of Openclaw Skills, it emphasizes developer productivity and codebase maintainability.

jsdoc-gen Use Cases

  • Documenting legacy codebases that currently lack any JSDoc or TSDoc comments.
  • Standardizing documentation across a large team or multi-repository project.
  • Preparing internal utility libraries for public or open-source release.
  • Improving the quality of IDE hover hints and autocomplete suggestions for other team members.

How jsdoc-gen Works

  1. The skill processes a specified file, directory, or glob pattern to locate exported functions, classes, and types.
  2. It performs a static analysis of the code logic to infer the purpose of parameters and the nature of the returned values.
  3. Appropriate documentation blocks are generated based on the selected style (JSDoc or TSDoc).
  4. Users can preview the generated comments in the terminal or apply them directly to the source files using a write flag.

jsdoc-gen Setup

To use this tool, ensure you have Node.js 18+ and an active OpenAI API key configured in your environment.

# Set your API key
export OPENAI_API_KEY='your_api_key'

# Run the generator on your source folder
npx ai-docs src/ --style jsdoc

jsdoc-gen Data Schema & Taxonomy

Feature Description
Supported Languages JavaScript, TypeScript, JSX, TSX
Comment Styles JSDoc (standard), TSDoc (TypeScript-optimized)
Logic Impact Zero. Only comments are added or modified
Target Elements Exported functions, classes, and interface definitions

jsdoc-gen Advanced Features

  • Support for complex glob patterns to target specific file structures.
  • Dry-run capability to preview AI-generated documentation before modifying any files.
  • Automatic inference of @throws tags by analyzing error handling within the function body.
  • Integration ready for various Openclaw Skills workflows to automate documentation during CI/CD or git hooks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*