comments

Enforces minimal single-line comment policy across TypeScript, Astro, and CSS files.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/malikkotb/shellpluscore --skill comments-malikkotb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comments
Source: https://github.com/malikkotb/shellpluscore/tree/main/.agents/skills/comments
Command: npx skills add https://github.com/malikkotb/shellpluscore --skill comments-malikkotb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate noisy comments that restate the code, narrate structure, or leave stale TODO notes, making files harder to read. This Skill defines a strict comment policy so every comment that survives explains a non-obvious "why" and nothing else. ## Core Features & Use Cases - Comment minimalism rules: Default to no comment; keep only one-line comments that explain non-obvious decisions, magic values, workarounds, or ordering constraints. - Smell Test and Keep Test: Concrete checklists for deciding whether to delete or retain a comment during editing or review. - Protected comment types: Preserves license headers, @ts-* and biome-ignore directives, and aria rationale comments. - Use Case: While reviewing a pull request in an Astro project, apply this Skill to strip per-element narration and section banners from .tsx and .astro files while keeping a comment explaining a deliberate workaround. ## Quick Start Review the comments in this file and remove any that fail the smell test while keeping only those that explain a non-obvious why.

Frequently Asked Questions about comments

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

FAQPage Schema
How do I decide which code comments to keep or delete?

Keep a comment only when it explains a non-obvious why, such as a workaround, a magic value's meaning, or a load-bearing ordering. Delete comments that restate the next line, narrate visible structure, span multiple lines, or mark empty slots as for-later.

How should I write comments in Astro and TypeScript files?

Write at most one line per comment, using `{/* ... */}` in Astro markup and standard syntax in TypeScript. The comment must explain intent a reader cannot infer from names, types, or the code itself.

Are TODO comments allowed on empty placeholders?

No. Empty slots are self-explanatory, and out-of-scope or for-later notes are prohibited in the markup. If the work genuinely needs tracking, it belongs in an issue tracker rather than a code comment.

Which comments should never be removed during cleanup?

Never delete license headers, `@ts-expect-error` and other `@ts-*` directives, `biome-ignore` comments, or aria rationale notes. Also avoid hand-editing generated files like `sanity/types.ts` or `.astro/types.d.ts`.

When is a multi-line comment acceptable in this policy?

Never. The policy requires every comment to fit on one line; if a why needs two lines, cut it to the essential clause or delete it. Multi-line banners, preambles, and section dividers are explicitly banned.