ai-docs

Generate AI-first JSDoc headers for TypeScript functions, classes, and hooks.

Updated May 11, 2026
One-click install
npx skills add https://github.com/joaoporth/ai-skills --skill ai-docs-joaoporth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-docs
Source: https://github.com/joaoporth/ai-skills/tree/main/ai-docs
Command: npx skills add https://github.com/joaoporth/ai-skills --skill ai-docs-joaoporth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides an AI-first JSDoc convention for TypeScript code documentation, enabling AIs to understand business rules, side effects, and decisions without prior context.

Core Features & Use Cases

  • AI-first Documentation: Automates inline documentation, improving code readability and maintainability.
  • Business Rules and Side Effects: Clearly documents rules and side effects, reducing errors in refactoring and maintenance.
  • Use Case: When writing a new function, use the ai-docs skill to automatically generate JSDoc headers that include business rules, side effects, and error scenarios.

Quick Start

Install the ai-docs skill and use it to document a new function in your TypeScript code.

Frequently Asked Questions about ai-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document TypeScript business rules for AI context?

AI-first JSDoc provides inline TypeScript documentation that embeds business rules, side effects, and decisions directly in code headers, enabling AIs to understand context without prior conversation.

How to generate JSDoc for TypeScript functions and classes?

Generating JSDoc for TypeScript functions and classes involves applying a standardized convention that covers components, hooks, types, enums, and business-rule constants to automate inline documentation and improve readability.

How do I prevent JSDoc doc rot when refactoring TypeScript?

To prevent JSDoc doc rot when refactoring TypeScript, you must edit the code and update the JSDoc headers in the exact same edit, ensuring documentation stays synchronized with logic changes.

Does this AI-first documentation convention work without dependencies?

Yes, this AI-first documentation convention works without dependencies, providing standalone scripts and references to establish JSDoc patterns for TypeScript code without requiring external libraries.

Why include side effects and error scenarios in TypeScript documentation?

Including side effects and error scenarios in TypeScript documentation reduces errors during refactoring and maintenance by clearly communicating business rules and unexpected behaviors to both humans and AI assistants.

What is the best way to document TypeScript enums and business-rule constants?

The best way to document TypeScript enums and business-rule constants is using a standardized JSDoc convention that captures their specific business logic and decision context for AI processing.