/skills:write-commentsfrom skills
Use this skill whenever asked to write, add, update, or review comments in code. Also trigger when the user mentions "self-documenting code" or claims "good code doesn't need comments." Use when documenting a function, module, or API, or when asked to improve comment quality in a codebase.
Ships in skills. 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.
Good names tell you what the code does. Comments tell you why it exists, what constraints it operates under, why this approach was chosen over alternatives, and what invariants must hold. No matter how expressive the identifiers, these things cannot be inferred from reading the code alone.
Do not skip comments on the grounds that "the code is clear." Clear code and good comments are complementary, not substitutes.
Cover: what the function/module does, preconditions, postconditions, side effects, error semantics, and units where relevant. Never reveal implementation details the caller doesn't need.
Bad (repeats code, vague):
# processes user
def process_user(user):
Good (precise, captures non-obvious contract):
# Validates and normalizes the user record before persistence.
# Raises ValueError if user.email is missing — callers must handle this
# before calling. Does NOT send a welcome email; that's the caller's job.
def process_user(user):
Explain tricky logic, non-obvious algorithmic choices, and workarounds. The target reader already knows what the code does — explain why it's done this way.
Bad (states the obvious):
i += 1 # increment i
Good (explains the non-obvious):
# Skip the first byte — it's a UTF-8 BOM that the downstream XML parser chokes on.
data = raw[1:]
Document dependencies, shared invariants, and coupling that can't be localized to a single module. These often belong in a module-level docstring or an architecture note.
| Signal | Problem |
|---|---|
| Comment Repeats Code | English translation of what the code already says — adds noise, drifts out of sync. Delete or rewrite to add meaning. |
| Vague Comment | Says something without saying anything ("handles errors", "processes data", "helper function"). Be specific or remove it. |
| Impl Contaminates Interface | Interface comment mentions internal data structures, algorithms, or implementation choices the caller doesn't need. Strip them out — they create unnecessary coupling. |
Write interface comments before writing the implementation — use them as a design tool. If you struggle to write a clear, precise comment for a function, the design itself likely has a problem. The difficulty of articulation is diagnostic.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub vagkaratzas/skills --plugin skills10 skills in this plugin
/drawio-nf-core-metromapsUse when creating, updating, or exporting an nf-core / Nextflow pipeline metro map (subway-style workflow diagram) with draw.io (app.diagrams.net) through Claude in Chrome: redrawing the map for a new release, adding or removing module stations and lanes, editing an existing draw.io metro map, drawing a map of how several pipelines chain (stations = pipelines with their logos), or exporting light and dark PNG/SVG versions into docs/images. Not for maps drawn with Inkscape, the nf-metro plugin, or other tools.
/migrate-nf-core-static-typesUse when migrating, or reviewing a PR that migrates, an nf-core / Nextflow pipeline to typed
parameters or static types — e.g. "add parameter types", "typed params block", "strict typing",
"nextflow.enable.types", "convert to records", bumping to Nextflow >= 26.04, or nf-core lint
failing on nextflow_config / schema_params after moving params into main.nf.
/plan-nf-core-releasesUse when creating, revising, or re-prioritising a release roadmap (ROADMAP.md) for an nf-core / Nextflow pipeline: deciding what goes into the next version, splitting a large feature across releases, choosing minor vs major (breaking) version, or mapping open GitHub issues, PRs, and a maintainer's to-do list onto upcoming releases. Do not trigger for writing the CHANGELOG, cutting/tagging a release, or implementing roadmap items.
/redesignUse this skill only when the user explicitly asks to redesign code, such as "redesign this code", "redesign this module", or invokes $redesign. Do not trigger for ordinary code review, refactoring, cleanup, naming, documentation, or comment-writing requests unless the user specifically asks for a redesign.
/token-saviourPick the most token-efficient tool for a coding task instead of reflexively reading whole files, dumping raw command output into context, or writing more code than asked. Use this skill BEFORE you explore or explain a codebase, locate a symbol/definition/callers, trace a call path, map an architecture, plan or implement a feature across layers, or run verbose commands (tests, builds, git, grep, directory listings) — and whenever context/token budget, cost, or "make this use fewer tokens" comes up. It routes the scenario to serena, rtk, caveman, Ponytail, or plain tools, with concrete commands and the combinations to use vs. avoid. Reach for it even when the user doesn't name a tool: if you're about to `cat`/Read several files, or about to generate a big implementation, that's the trigger.
/using-depictio-nf-coreUse when turning nf-core / Nextflow pipeline results into interactive Depictio dashboards: installing or starting Depictio locally, running `depictio ingest` on an outdir, picking a template or its variables (samplesheet, GROUP_COL), checking whether a pipeline version has a Depictio template, fixing a blank or failing dashboard, auto-ingesting runs from Nextflow, or adding/updating a pipeline template after its output layout changed.