Package.json Command Commenter

Add descriptive // comments to new or modified package.json scripts.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/corey-alix/dwp-hours --skill package-json-command-commenter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Package.json Command Commenter
Source: https://github.com/corey-alix/dwp-hours/tree/main/.github/skills/package-json-commenter
Command: npx skills add https://github.com/corey-alix/dwp-hours --skill package-json-command-commenter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that all new or modified script commands in package.json files are accompanied by clear, descriptive comments, improving code maintainability and understanding.

Core Features & Use Cases

  • Automated Commenting: Automatically adds // comments for new or changed npm scripts.
  • Consistency: Enforces a project convention for documenting scripts.
  • Use Case: When adding a new script like "test": "jest --coverage" to your package.json, this Skill will ensure it becomes "test//": "Run unit tests with coverage", making its purpose immediately clear.

Quick Start

Add a new npm script to run lint fixes and ensure it has a descriptive comment.

Frequently Asked Questions about Package.json Command Commenter

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

FAQPage Schema
How do I add comments to npm scripts in package.json?

To add comments to npm scripts in package.json, you can pair script names with descriptive keys using a "//" convention. This ensures every command includes a corresponding comment describing its purpose for better code documentation.

What is the best way to document npm scripts for project maintainability?

Documenting npm scripts for maintainability is achieved by enforcing a convention that pairs every new or modified command with a clear description. This automated commenting ensures team members understand the purpose of each script immediately.

Can I automatically generate documentation for modified package.json scripts?

Yes, you can automatically generate documentation for modified package.json scripts by enforcing a pairing convention. This process ensures any added or changed script command automatically includes a descriptive comment explaining its function.

How does the script commenting convention format work in package.json?

The script commenting convention works by transforming a standard script entry like "test": "jest" into a paired format such as "test//": "Run unit tests". This ensures every command has an adjacent descriptive comment.

Why should I document my npm script commands?

You should document your npm script commands to improve code maintainability and understanding across your project. Adding descriptive comments ensures that complex script logic is immediately clear to new developers and team members.