Svelte Store Analyzer skill for Claude and Codex
A diagnostic read of a Svelte store file: the state it holds, who reads and writes it, derived stores and side effects, leaks and race conditions, and…
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 file has grown confusing and needs its state shape, readers, writers, derived stores, and leaks mapped out with refactoring advice. Do not use for creating a new store from scratch or reviewing Svelte components that merely use the store. Related topics: coding, svelte.
What it will ask you for
- Store file path (free text, e.g. "src/lib/store.js")
- Store source (longer free text)
- Include derived stores (choose one: Yes, No)
- Detail level (choose one: Summary, Moderate, Deep)
- Svelte version (choose one: 3, 4, 5)
- Output format (choose one: Markdown, JSON)
- Notes (longer free text)
How it works
- Write the state shape as a type, including any optional or union fields the code implies.
- Trace every read and write of the store and note async writes that can land stale results.
- Review derived stores and manual subscriptions for excess recomputation and missing unsubscribes.
- For Svelte 5, mark which state belongs in runes inside a .svelte.js module and which still needs a store for sharing.
- Rank recommendations by impact and provide the code change for the top three.
What you get
A report in Markdown or JSON with Overview, State schema, Subscriptions, Derived stores (optional), and Recommendations, at the requested depth.
What it watches out for
- Mutating an object inside update and returning the same reference, which Svelte treats as unchanged.
- Calling subscribe manually in a component without storing and calling the unsubscribe function, which leaks on every mount.
- Recommending runes for cross-component shared state in Svelte 5 when the project still needs a store for that case.
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.