ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

jsdoc-gen

Add JSDoc or TSDoc comments to your code. Use when documentation is missing.

Why use this skill?

Automatically add JSDoc and TSDoc to your exported functions. Improve code readability and IDE support with zero config using this OpenClaw AI tool.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/lxgicstudios/docs-gen
Or

What This Skill Does

The jsdoc-gen skill acts as an automated documentation assistant for your codebase. It scans your files for exported functions, classes, and types, then injects professionally formatted JSDoc or TSDoc comments directly into the source code. Unlike manual documentation, this skill leverages AI to understand the logic and inferred types of your functions, ensuring that parameter descriptions, return values, and potential exceptions are documented accurately without requiring you to write a single line of boilerplate documentation yourself.

Installation

You can integrate this skill into your workflow via the OpenClaw CLI using the following command: clawhub install openclaw/skills/skills/lxgicstudios/docs-gen

No heavy local installation is required, as the tool functions via npx and a valid OPENAI_API_KEY, making it a lightweight addition to any Node.js environment (Node 18+ recommended).

Use Cases

  • Legacy Codebase Revitalization: Perfect for documenting large, undocumented projects where developers have left without leaving behind clear interface definitions.
  • Open Source Readiness: Quickly bring your public-facing APIs up to standard before a major release to help external contributors understand your code.
  • IDE Efficiency: Ensure that your IDE's IntelliSense provides meaningful hover-over hints for your teammates by providing clear JSDoc descriptions.
  • Onboarding Automation: Help new developers understand what specific utility functions do without interrupting senior team members with constant clarification requests.

Example Prompts

  1. "OpenClaw, use jsdoc-gen on the /src/utils folder and preview the changes in JSDoc style so I can review them before applying."
  2. "Please run the jsdoc-gen tool on 'api/auth.ts' using TSDoc formatting and write the changes directly to the file."
  3. "Can you document the entire 'src/services' directory using jsdoc-gen to improve our team's documentation coverage?"

Tips & Limitations

  • Review before writing: Always use the --write flag only after you have confirmed the preview looks accurate. AI-generated comments are context-aware, but complex business logic might require a quick manual sanity check.
  • Focus on exports: The tool is designed to prioritize public interfaces. If you have thousands of internal helper functions, consider filtering your execution to keep the codebase clean.
  • Environment Variables: Remember to export your OPENAI_API_KEY in your terminal session, as the tool relies on external AI models to infer the function meanings.
  • Version Control: It is recommended to run this tool on a clean Git branch so you can easily compare changes using git diff.

Metadata

Stars1601
Views2
Updated2026-02-27
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-lxgicstudios-docs-gen": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#jsdoc#documentation#developer-tool#typescript#automation
Safety Score: 4/5

Flags: file-write, file-read, external-api