A collection of code snippets, patterns, agent instructions, and workflows I use to bootstrap Svelte / SvelteKit projects (work in progress).
Three pre-built agent skills are available in agent-skills/dist/:
svelte-authoring: Implementation-focused Svelte skill
svelte-review: Architecture- and diagnosis-focused Svelte skill
shadcn-svelte: Understands concepts of shadcn-svelte
svelte-authoring (both desirable for one task)The outcome still depends heavily on the prompt, especially for svelte-review or svelte-authoring when deeper refactoring or rewrite pressure is needed.
The agents-tools directory contains a build script to build these agent skills based on the documents maintained in this repository.
Inspired by Bits UI and shadcn-svelte, templates/ui-components/:
Primitive.svelte: low-level composable primitiveComposite.svelte: composed higher-level componentHeadlessPrimitive.svelte: unstyled / headless primitive for advanced use casesA catalog of patterns, implementation rules, and review criteria for writing clean, maintainable Svelte 5 / SvelteKit code.
Purpose: Primarily used as source material for agent skills and instructions, with the goal of steering code generation toward code that is not only functional, but also more maintainable in the long run, introduces less tech debt, and requires less human cleanup.
Written to remain directly useful for humans as well.
The catalog is neither written entirely by hand nor generated by AI alone:
Contents β ./docs/catalog:
svelte-review-rubric.md: review criteria for checking AI-generated or human-written codepatterns-and-anti-patterns.md: main patterns and anti-patterns referencesvelte-implementation-rules.md: concise rules for writing codeGoal: Teach agents how to write well-structured, maintainable Svelte 5 code
shadcn-svelte component index for LLMs: Can be offered in an agent skill (progressive disclosure) like a llms.txt
UI Components.md: guidance for writing composable and well-structured Svelte 5 UI components
cn() refactoring