skills/tapforce-sveltekit/SKILL.md
Best practices for setting up and developing Svelte projects using SvelteKit ^2.0.0. Use when considering setup or development based on SvelteKit framework.
npx skillsauth add tapforce/agents-skills tapforce-sveltekitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides best practices for setting up and developing Svelte projects using SvelteKit ^2.0.0.
Use this skill when:
pnpm ^10.0.0 as default package managerSets up a new SvelteKit project with options for templates and add-ons.
Usage:
npx sv create [options] [path]
Key Options:
--template <name>: Project template (minimal, demo, library)--types <option>: Type checking (ts, jsdoc)--no-types: Skip type checking (not recommended)--add [add-ons...]: Add specific add-ons during creation--no-add-ons: Skip interactive add-ons prompt--install <package-manager>: Specify package manager (npm, pnpm, yarn, bun, deno)--no-install: Skip dependency installation--from-playground <url>: Create from playground URLExamples:
# Basic setup with pnpm
pnpm dlx sv create . --install pnpm
# With TypeScript and Tailwind CSS
pnpm dlx sv create . --types ts --add tailwindcss --install pnpm
# From template with add-ons
pnpm dlx sv create . --template demo --add eslint prettier --install pnpm
Updates existing projects with new functionality and add-ons.
Usage:
npx sv add [add-ons]
Key Options:
-C, --cwd <path>: Path to project root--no-git-check: Skip git dirty files check--no-download-check: Skip download confirmations--install <package-manager>: Specify package manager--no-install: Skip dependency installationOfficial Add-ons:
tailwindcss: Tailwind CSS v4 integrationeslint: Code linting setupprettier: Code formatting setupplaywright: End-to-end testingvitest: Unit testing frameworkmdsvex: Markdown supportExamples:
# Add Tailwind CSS
pnpm dlx sv add tailwindcss
# Add multiple tools
pnpm dlx sv add eslint prettier playwright
# Add with specific package manager
pnpm dlx sv add vitest --install pnpm
Finds errors and warnings in SvelteKit projects.
Usage:
npx sv check [options]
Key Options:
--workspace <path>: Path to workspace directory--output <format>: Output format (human, human-verbose, machine, machine-verbose)--watch: Keep process alive and watch for changes--tsconfig <path>: Path to TypeScript config--no-tsconfig: Check only Svelte files--ignore <paths>: Files/folders to ignore--fail-on-warnings: Exit with error on warnings--compiler-warnings <warnings>: Configure warning behavior--diagnostic-sources <sources>: Specify diagnostic sources (js, svelte, css)--threshold <level>: Filter diagnostics (warning, error)Examples:
# Basic check
pnpm dlx sv check
# Watch mode
pnpm dlx sv check --watch
# With specific output
pnpm dlx sv check --output machine-verbose
# Ignore specific directories
pnpm dlx sv check --ignore "dist,build"
Migrates SvelteKit codebases between versions.
Usage:
npx sv migrate [migration]
Available Migrations:
svelte-5: Upgrade Svelte 4 to Svelte 5 with runessveltekit-2: Upgrade SvelteKit 1 to SvelteKit 2app-state: Migrate $app/stores to $app/stateself-closing-tags: Update self-closing element syntaxsvelte-4: Upgrade Svelte 3 to Svelte 4package: Upgrade @sveltejs/package v1 to v2routes: Upgrade pre-release to v1 routingExamples:
# Interactive migration
pnpm dlx sv migrate
# Specific migration
pnpm dlx sv migrate svelte-5
pnpm dlx sv migrate sveltekit-2
For new projects, use the SvelteKit CLI command to initialize the backbone codebase. NEVER create core files manually like package.json, tsconfig.json, etc., as SvelteKit CLI will create them for you.
Official documentation: https://svelte.dev/docs/kit/creating-a-project/llms.txt
Quick Setup Commands:
# Basic setup with pnpm (recommended)
pnpm dlx sv create . --install pnpm
pnpm run dev
# With TypeScript and Tailwind CSS
pnpm dlx sv create . --types ts --add tailwindcss --install pnpm
pnpm run dev
# With common development tools
pnpm dlx sv create . --add eslint prettier vitest --install pnpm
pnpm run dev
# Minimal setup with common addons (no-install approach)
pnpm dlx sv create . --template minimal --add tailwindcss prettier adapter-auto --no-install
echo 'packages:
- .' > pnpm-workspace.yaml
pnpm install
pnpm run dev
# Using npm
npm dlx sv create . --install npm
npm run dev
Troubleshooting pnpm Setup:
If you encounter ERR_PNPM_INVALID_WORKSPACE_CONFIGURATION error during installation, see the Package Management rule for solutions.
Template Options:
minimal: Barebones scaffoldingdemo: Showcase app with word guessing gamelibrary: Template for Svelte library with svelte-packagePackage Manager Support:
pnpm (recommended)npmyarnbundenoConsider using these helpful libraries for SvelteKit development:
Style Framework/UXUI Framework:
Testing Frameworks:
Development Tools:
After project creation, update package.json to match project information like name, version, description, etc.
Ensure all Svelte code (including Svelte and SvelteKit) uses the latest features and coding style from Svelte ^5 and SvelteKit ^2.
Available features from Svelte ^5: $state, $effect, $inspect, etc.
AVOID legacy features from older versions. If you find other skills or rules teaching practices with Svelte/SvelteKit features, learn and follow the latest approaches.
Official documentation: https://svelte.dev/docs/kit/migrating-to-sveltekit-2/llms.txt
Understand SvelteKit project structure and how it works.
Official documentation: https://svelte.dev/docs/kit/project-structure/llms.txt
SvelteKit supports a wide range of project types. Understand the different kinds available.
Official documentation: https://svelte.dev/docs/kit/project-types/llms.txt
SvelteKit has a unique routing system. Understand how it works.
Official documentation:
SvelteKit provides options to handle links. Understand these capabilities.
Official documentation: https://svelte.dev/docs/kit/link-options/llms.txt
Read and understand how SvelteKit projects can handle errors.
Official documentation: https://svelte.dev/docs/kit/errors/llms.txt
SvelteKit has built-in support for Web Standards and Web APIs. Understand these capabilities.
Official documentation: https://svelte.dev/docs/kit/web-standards/llms.txt
SvelteKit has built-in features to help optimize performance. Understand these best practices.
Official documentation: https://svelte.dev/docs/kit/performance/llms.txt
SvelteKit has documentation about accessibility practices. Understand these guidelines.
Official documentation: https://svelte.dev/docs/kit/accessibility/llms.txt
SvelteKit has documentation about SEO optimization practices. Understand these guidelines.
Official documentation: https://svelte.dev/docs/kit/seo/llms.txt
SvelteKit supports snapshot data on pages, allowing restoration of values when users navigate back. Understand this feature.
Official documentation: https://svelte.dev/docs/kit/snapshots/llms.txt
SvelteKit has documentation about state management practices. Understand these approaches.
Official documentation: https://svelte.dev/docs/kit/state-management/llms.txt
This skill includes the following rules:
development
Debate and reach a decision with another AI agent (e.g. Claude Code <-> Codex) over one shared markdown file. Use when the user asks two agents to discuss, debate, cross-check, or jointly decide a topic, when the user says "talk to the other agent / Codex / Claude about X", or hands you a name and a topic to debate. Agents take turns, poll every ~3 minutes, and pause to ask the user when stuck.
development
Best practices for setting up and developing UX/UI for projects using Tailwind CSS ^4. Use when setting up new projects with Tailwind CSS support or when projects have Tailwind CSS installed.
development
Best practices for setup and use of shadcn-svelte library to develop UX/UI in Svelte projects. Use this skill when project is using Svelte/SvelteKit framework as main app framework, when user attempts to setup new project or when user is developing on existing project using shadcn-svelte components.
tools
Best practices for using pnpm ^10.0.0 in Node.js projects. Use when working with Node.js-based projects.