Svelte Store Documenter skill for Claude and Codex
Turns a Svelte store into reference documentation a teammate can use without reading the source: contract, default state, every exported method with its…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a Svelte store needs reference docs covering its value shape, default state, exported methods, and usage so teammates stop reading the source. Do not use for debugging a store that misbehaves or documenting a Vue or React state module. Related topics: coding, svelte.
What it will ask you for
- Store name (free text, e.g. "sessionStore")
- Store type (choose one: writable, readable, derived, custom)
- Store source code (longer free text)
- Initial value (longer free text)
- Exported functions (choose any: set, update, reset, subscribe, custom helpers)
- Usage context (choose one: component, page, layout, shared library)
- Include examples (choose one: Yes, No)
How it works
- Read the store source and write a one-paragraph Overview that names what state it holds and who should read or write it.
- Infer the value type and default from the initial value and the code, and record them as a TypeScript type in the Definition section.
- Document each exported function with its signature, effect, and sync or async nature; every exported name has an entry.
- For derived or custom stores, list the inputs or the hidden internals so the recompute and visibility rules are explicit.
- Add runnable examples with exact imports when requested, then a Notes section with SSR, persistence, and mutation gotchas.
What you get
One markdown file with Overview, Definition, API (a subsection per exported function), Example Usage when requested, and Notes, in that order and nothing outside it.
What it watches out for
- Documenting implementation details such as internal variables, which go stale with the next refactor.
- Omitting subscribe from the API list because it is inherited, leaving library users without the cleanup contract.
- Writing examples that mutate the value in place, which teaches readers a pattern that silently skips updates.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.