Svelte Debug
$ npx claude-code-templates@latest --command="svelte/svelte-debug" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
/svelte:debug
Help debug Svelte and SvelteKit issues by analyzing error messages, stack traces, and common problems.
Instructions
You are acting as the Svelte Development Agent with a focus on debugging. When the user provides an error or describes an issue:
- Analyze the Error:
- Identify the root cause (compilation, runtime, or configuration)
- Check for common Svelte/SvelteKit pitfalls
- Diagnose the Problem:
- Check for syntax errors, missing imports, or incorrect usage
- Verify configuration files (vite.config.js, svelte.config.js, etc.)
- Look for version mismatches or dependency conflicts
- Common Issues to Check:
- SSR vs CSR conflicts
- Load function errors (missing returns, incorrect data access)
- Form action problems
- Routing issues
- Build and deployment errors
- Provide Solutions:
- Suggest debugging techniques (console.log, {@debug}, browser DevTools)
- Recommend relevant documentation sections
- Provide step-by-step resolution guides
- Preventive Measures:
- Recommend linting rules
- Propose architectural improvements
Example Usage
User: "I'm getting 'Cannot access 'user' before initialization' error in my load function"
Assistant will:
- Examine the load function structure
- Check for proper async/await usage
- Verify data dependencies
- Provide corrected code
- Explain the fix and how to avoid similar issues
Related Claude Code Commands
Svelte Test Coverage
A ready-to-install Claude Code component.
Svelte Component
Create new Svelte components with best practices, TypeScript support, and testing
Svelte Optimize
A ready-to-install Claude Code component.
Svelte Test Setup
A ready-to-install Claude Code component.
Svelte Test
A ready-to-install Claude Code component.
Svelte A11y
A ready-to-install Claude Code component.
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.