@houserules/plugin-svelte
v0.1.2
Published
houserules plugin: Svelte 5 authoring conventions, an opt-in SvelteKit guide, and the Svelte MCP server config.
Maintainers
Readme
@houserules/plugin-svelte
An agent trained on older Svelte reaches for export let, a $: reactive statement, and
on:click by reflex, because that is what most of its training data still shows. None of
those fail a Svelte 5 build outright, so they slip into a runes-based codebase as a second,
undocumented convention living next to the first.
This plugin ships the Svelte 5 rule that heads that off, as a rule the agent loads only when a Svelte file is in the working set.
Install
pnpm add -D @houserules/plugin-svelte
pnpm exec houserules initRequires @houserules/cli.
init is what writes the modules into .claude/. Both modules below are off by default, so
select them when init asks.
Modules
svelteinstalls.claude/rules/svelte.md, a path-scoped rule for Svelte 5 authoring: runes throughout ($state,$derived,$effect,$props,$bindable), component structure, context providers, and styling conventions. Neverexport let, never a$:reactive statement, neveron:click.Scoped to
**/*.svelte,**/*.svelte.ts, and**/*.svelte.jsthrough itspaths:frontmatter, so Claude Code loads it only when a matching file is in the working set. Keep that frontmatter. A rule file withoutpaths:is loaded on every turn.Ships an opt-in SvelteKit guide (
sveltekit), covering routing, load functions, form actions, and the server-versus-universal split. It installs alongside the base rule when chosen, never on its own, because it opens by assumingsvelte.mdis already installed.svelte-mcpinstalls the three Svelte MCP server configs under.claude/mcp/:svelte.http.json,svelte.stdio.json, andsvelte.vscode.json. houserules never writes.mcp.json, so an advise action explains how to wire one of them into this repo's own config, and that an unused MCP server costs context on every turn. The names are namespaced by server, so a second plugin shipping an MCP config cannot collide with these. An install predating that change carriedmcp.http.json,mcp.stdio.json, andvscode.mcp.json, andupdateremoves those three.
Doc comments, verification commands, and accessibility are deliberately out of scope of the
svelte rule. Those belong to code-comments.md and prose-voice.md in
@houserules/plugin-prose,
CLAUDE.md's managed region, and accessibility-svelte.md in
@houserules/plugin-accessibility,
if those rules are installed.
Part of houserules
houserules is a portable set of Claude Code infrastructure that keeps the agent's context lean. This is one of twelve first-party plugins. The package list has the rest.
License
MIT. See LICENSE.
