Skip to content
Skills Library
Programming · Writing

doc-component

/doc-component

Document a Svelte component using @component JSDoc. Auto-invoke when asked to document a .svelte component. Reads the component, analyzes its interface, and writes a structured @component comment block.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
2
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (2). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Document a Svelte component using @component JSDoc. Auto-invoke when asked to document a .svelte component. Reads the component, analyzes its interface, and writes a structured @component comment block.

Original author description

Document a Svelte component using @component JSDoc. Auto-invoke when asked to document a .svelte component. Reads the component, analyzes its interface, and writes a structured @component comment block.

How it works

  1. Process
  2. Format
  3. Rules
  4. What NOT to document
  5. Prerequisites
  6. Verification
Original SKILL.md headings · 60 lines, 423 words
SKILL.md preview
---
name: doc-component
description: "Document a Svelte component using @component JSDoc. Auto-invoke when asked to document a .svelte component. Reads the component, analyzes its interface, and writes a structured @component comment block."
user-invocable: true
---

# Document Svelte Component

> **ALWAYS** respect `frontend:editing` and `frontend:comments` skill rules.

Write a `<!-- @component -->` JSDoc comment block at the top of a `.svelte` file. The comment is processed by svelte2tsx into a JSDoc block on the component class, IDE hover tooltips render it directly.

## Process

1. **Read the component file**: understand what it does, its props, its reactive dependencies, its key functions.
2. **Read direct dependencies**: imports, models, utilities, to understand the full interface.
3. **Write the `@component` block**: structured, tab-indented, at the very top of the file (before `<script>`).

## Format

````svelte
<!--
	@component
	One-line summary of what this component does.

	## Section heading
	- Bullet point with key information
	- Another bullet point

	@see {@link ./RelatedFile.ts} for details on X
	@example
	```svelte
	<MyComponent prop={value} />
	```
-->
````

## Rules

- **Tab-indent everything** inside the comment (project convention).
- **`@component` on its own line**, description starts on the next line.
- **No component name after `@component`**: the filename IS the name. Write `@component`, not `@component MyComponent`.
- **Use markdown**: headers (`##`), lists (`-`), code blocks (triple backtick), inline code. All render in IDE hover.
- **Supported JSDoc tags**: `@example`, `@see`, `@deprecated`, `@since`, `@author`, `{@link}`. These are rendered by TypeScript's language service.
- **Do NOT use**: `@param`, `@returns`, `@slot`, `@event`: they have no effect at the component level. Document props with JSDoc on their declarations inside `<script>`.
- **Focus on the interface, not internals.** The reader wants to know: what does this do, how do I use it, what are the key concepts. Implementation details only where they affect usage (e.g. debounce timing, cluster behavior).
- **Enumerate core properties/concepts only.** No noise. If a prop has a sensible default that most users never touch, skip it.
- **"How to extend" sections** are valuable for complex components: e.g. how to add a new marker type, how to add a new filter.
- **Keep it concise.** If the component is simple, a one-liner after `@component` is enough. Don't pad simple components with unnecessary structure.

## What NOT to document

- Pages, layouts, tests, stories (`.stories.svelte`)
- Internal implementation details that don't affect the component's consumers
- Every single local variable or helper function
- Types that are already documented in their own `.ts` files

## Prerequisites

This skill edits `.svelte` files, **invoke the `frontend:editing` and `frontend:comments` skills first** and follow their rules (comment style, svelte-autofixer, etc.).

## Verification

After writing the comment, run `mcp__plugin_svelte_svelte__svelte-autofixer` on the file, then read the first few lines to confirm the comment is well-formed HTML.

Versions

The database has no other skills named doc-component.

Database snapshot: 13.11.2026 · package version 4364542b80b2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100code-style-svelte
    Svelte component code style rules. Auto-invoke when creating .svelte files, editing component structure, transitions or layout reads, or SvelteKit URL state and navigation guards. Covers component docs and Svelte style conventions.
  • 100svelte-code-writer
    CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (.svelte) or Svelte module (.svelte.ts/.svelte.js). If possible, this skill should be executed within the svelte-file-editor agent for optimal results.
  • 100svelte-code-writer
    CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (`.svelte`) or Svelte module (`.svelte.ts`/`.svelte.js`).
  • 95frontend-component
    Create React/Vue component with TypeScript, tests, and styles. Auto-invoke when user says "create component", "add component", "new component", or "build component".
  • 100jsdoc-comment-generator
    Generate jsdoc comment generator operations. Auto-activating skill for Technical Documentation. Triggers on: jsdoc comment generator, jsdoc comment generator Part of the Technical Documentation skill category. Use when working with jsdoc comment generator functionality. Trigger…
  • 100svelte-grab
    Inspect, edit and verify a live Svelte 5 / SvelteKit app through the svelte-grab MCP tools (ui_snapshot, ui_find, ui_inspect, ui_wait_for_hmr, ui_verify, ui_profile). Use when changing UI in a Svelte app running in dev, when asked "which component renders X", "where is this…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.