Agents: MCP + skills

Two surfaces give agents programmatic insight (route tree, type contracts, diagnostics) instead of guessing from raw files.

MCP server (@swelte/mcp)

Transport is stdio only — the IDE spawns the server, no ports or auth.

config
{ "mcpServers": { "swelte": { "command": "node",
	"args": ["./node_modules/@swelte/mcp/dist/index.js"] } } }

Or via the bin: swelte-mcp (stdio, no args).

ToolWhat it does
list_routesroute tree: URL path, RPC fns, .svelte partner
get_routeone route in detail: V fns, structs, source
checkswelte check diagnostics (orphans, clashes, backend violations)
get_configresolved project config
validate_data_contractV response struct vs Svelte $props() per-field match
scaffold_routecreate a route pairing (static | dynamic | api)
explain_bytecode_errorQuickJS trace / wasm trap → source lines

Skills

Six playbooks ship inside the npm packages — extracted automatically on npm install into .agents/skills/ (scaffolded projects carry the postinstall hook). A skill tells the agent how to do the work, the MCP tool gives it the live project facts. Prefer MCP tools over grepping src/routes/ by hand.

SkillShips inUse when
swelte-overview@swelte/corescaffolding, explaining, navigating (layout, CLI, .swelte/)
swelte-mcp@swelte/mcpquerying via the MCP server (routes, contracts, diagnostics)
swelte-ssr-load@swelte/ssr-qjsadding @[load] data, debugging SSR output
swelte-svelte5@swelte/corecreating/fixing .svelte files (runes only)
swelte-sveltekit-delta@swelte/coreporting SvelteKit apps, checking parity
swelte-v-routes@swelte/corecreating/fixing .v files (attrs, request shape, types)

Installing skills

Automatic — the scaffold template carries a postinstall hook (npm-skills extract --skip-production --override, scoped via npmSkills.consume.only: ["@swelte/*"] so unrelated packages are never resolved), so npm install drops each dependency's skills/ into .agents/skills/. Versioned with the packages, no manual copy step.