Global Commenting

Generate JSDoc comments explaining technical decisions in components and APIs.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/SpacePlushy/portfolio --skill global-commenting-spaceplushy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Commenting
Source: https://github.com/SpacePlushy/portfolio/tree/main/.claude/skills/global-commenting
Command: npx skills add https://github.com/SpacePlushy/portfolio --skill global-commenting-spaceplushy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Poorly documented or over-commented code hinders understanding and maintainability. This skill guides AI in writing concise, purposeful comments that explain the "why" behind complex logic and technical decisions, using JSDoc where appropriate, so your codebase is always clear.

Core Features & Use Cases

  • Meaningful Explanations: Directs AI to comment on complex algorithms, performance optimizations, and non-obvious implementations.
  • API & Component Documentation: Guides AI in using JSDoc for component props and documenting API request/response formats.
  • Avoids Redundancy: Ensures AI avoids commenting on obvious code or maintaining change history within comments.

Quick Start

Add JSDoc comments to the 'UserProfile' React component, documenting its props and their types.

Frequently Asked Questions about Global Commenting

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

FAQPage Schema
How do I write effective JSDoc comments for React component props?

JSDoc comments document component props using @param or @prop tags with type and description. This approach clarifies what each prop does and its expected type, making components easier to use and maintain without over-commenting obvious code.

What should I comment on in complex code versus what to skip?

Comment on the 'why' behind technical decisions: complex algorithms, performance optimizations, browser compatibility workarounds, and non-obvious implementations. Skip obvious code like simple assignments or straightforward loops to avoid redundancy.

How do I document API routes and request/response formats?

Use JSDoc comments on API route handlers to specify request parameters, response formats, and status codes. This creates clear contracts for API consumers and improves maintainability by documenting expected data structures.

Can I use JSDoc to document configuration files and regex patterns?

Yes, JSDoc comments work for configuration schemas and regex patterns. Explain what each configuration option does, constraints, and what regex patterns match, helping future maintainers understand purpose without guessing intent.

What's the difference between over-commenting and meaningful documentation?

Meaningful documentation explains the reasoning and context behind decisions; over-commenting restates what code obviously does. JSDoc-based comments focus on non-obvious logic, technical trade-offs, and 'why' decisions were made this way.

How do I avoid maintaining change history inside code comments?

Keep comments focused on current functionality and reasoning, not past changes. Use version control and commit messages for change history; comments should explain the present design, not chronicle evolution.