/frontend:commentsfrom frontend
Provides rules for writing, editing, and deleting comments across all languages: survival test, format, protected comments, placement, and TODOs. Auto-activates when editing code files.
Ships in frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
REQUIRED SUB-SKILL: deslop, from stephenturner/skill-deslop (MIT). If it isn't installed, stop and ask the user to install it: git clone https://github.com/stephenturner/skill-deslop.git ~/.claude/skills/deslop. Where deslop and this skill disagree, this skill wins: deslop's "we" loses to the we use ban, for example.
Don't apply this skill from memory. It covers //, /* */, /** */, #, docstrings and <!-- -->.
Your comments default to DELETE. The survival test, Format and the ban-list judge only the comments you add in this task. A comment you add earns its place by the survival test, or it goes. The code already says WHAT, so a comment merely restating WHAT is noise. Default-DELETE removes only noise.
A comment someone else requires skips the survival test and takes the syntax and format they define. The ban-list still applies to the wording you choose, and any reason you give with it must pass the survival test. Required comments are:
@component block and prop JSDoc (svelte-5:code-style-svelte, svelte-5:doc-component)eslint-disable-next-line; whether a directive is allowed at all is frontend:editing's ruleExisting comments stay, with all their information. A comment that was in the file before this task started is not yours to judge or reformat, even when it looks redundant. Never turn its /** */ block into // lines. NEVER remove information from it, not with Write, not with Edit, not ever. Information means:
HINT/TODO/FIXME keyword# v26.12.1Unless the user asks for a specific change, you may change it in four ways only; the first is mandatory:
This outranks default-DELETE. When in doubt, ask the user!
Keep each comment with its code, and don't merge comments. Separately placed comments stay separate, and a rationale stays next to the code it explains.
Don't restore a comment the user deleted (they told you, or it was already gone from the file when this task started).
A comment you add earns its place only if ALL hold:
see popup.on('close') in popup.ts), never a relative position.A label passes rule 1 when it names what it heads or points to:
// request validation)/** */ block (close event listener)HINT:, TODO:, FIXME:); the text after it still has to pass// close event listener not // close event listener.// Svelte 5 unmount() is async; void satisfies no-floating-promises.30s not 30 s./** */ blocks, not in stacked // lines: a non-obvious invariant, a multi-step rationale, a foot-gun warning. A block stands out, and IDEs and tooling render it on declarations. Per syntax:
//: short single-line comments and inline notes# comment stays one or two lines<!-- --> block// ❌ BAD: stacked // lines for a multi-line rationale
// Programmatic closes (showPopup, closePopup) reassign or clear
// activePopup before remove(), so the comparison fails for those
// and the listener returns. User-initiated closes still match.
popup.on('close', () => { ... })
// ✅ GOOD: lengthy/important rationale in a /** */ block
/**
* close event listener
*
* Programmatic closes (showPopup, closePopup) reassign or clear
* activePopup before remove(), so the comparison fails for those
* and the listener returns. User-initiated closes still match.
*/
popup.on('close', () => { ... })
// ✅ GOOD: short single-line note stays inline
// Reassign before remove() so the close listener sees activePopup !== popup.
this.activePopup = popup
No hedges, emphasis words or appeals to a process: likely, probably, per plan, per spec, per locked decision, fire-and-forget, for safety, just in case, obviously, simply, basically, actually, of course, as you can see, note that, this is, we use, their synonyms, and any restated function name, parameter list, or return value.
deslop on the comments and text you added. Wording the user or a format dictates (a props list, a @param entry) is exempt from deslop and the ban-list.* markers remainpath:line KEEP <rule or required>, UPDATE fixed|appended, or DELETE <failed rule or code removed>.// ❌ BAD: restates what void does
// fire-and-forget the unmount promise
void unmount(component);
// ❌ BAD: references removed code, becomes a lie on the next refactor
// no longer recomputes the radius on zoom
// ✅ GOOD: says WHY the unusual syntax exists
// Svelte 5 unmount() is async; void satisfies no-floating-promises.
void unmount(component);
| Excuse | Reality |
|---|---|
| "The user asked me to comment my changes" | A general request doesn't lift the survival test. Explain the rest in your reply. |
| "The spec number helps reviewers find the reasoning" | It's history. Write the WHY itself, or put the reference in the commit message. |
| "It's likely the cause" | "Likely" marks an unchecked guess, and an unchecked reason becomes a lie. Check it or leave it out. |
| "Only the wording fails, so I'll reword it" | Delete it. Only a required comment gets its wording fixed. |
| "A longer comment is clearer" | Length isn't clarity. Cut to the one fact the code can't show. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fubits1/svelte-skills --plugin frontend13 skills in this plugin
/code-styleCode style rules for all languages: variable naming, brace style, HTML data attributes, markup, forms and locale formatting, CSS nesting. Auto-invoke when editing code files, writing new functions or markup, or naming variables./code-style-cssUse when editing CSS, SCSS, or style blocks in .svelte files. Covers CSS-specific code style rules. Auto-invoke when writing or modifying styles./css-nestingConvert flat CSS to nested & syntax while satisfying stylelint's no-descending-specificity and no-duplicate-selectors rules. Use when nesting selectors, refactoring flat CSS to &, or fixing stylelint specificity/duplicate errors after nesting.Other plugins' skills for the same job