Svelte Debug

A command for svelte workflows.

CommandsvelteMIT1 source files

Before you use this component

This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.

Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.

Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.

Source publisher
Claude Code Templates
Creator supplied by source
Not listed in source
Pinned source version
a344359459263d73d8948651c789244093c02e4e
License evidence
LICENSE

Source preview

cli-tool/components/commands/svelte/svelte-debug.md

# /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:

1. **Analyze the Error**:
   - Parse error messages and stack traces
   - Identify the root cause (compilation, runtime, or configuration)
   - Check for common Svelte/SvelteKit pitfalls

2. **Diagnose the Problem**:
   - Examine the relevant code files
   - 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

3. **Common Issues to Check**:
   - Reactive statement errors ($state, $derived, $effect)
   - SSR vs CSR conflicts
   - Load function errors (missing returns, incorrect data access)
   - Form action problems
   - Routing issues
   - Build and deployment errors

4. **Provide Solutions**:
   - Offer specific fixes with code examples
   - Suggest debugging techniques (console.log, {@debug}, browser DevTools)
   - Recommend relevant documentation sections
   - Provide step-by-step resolution guides

5. **Preventive Measures**:
   - Suggest TypeScript additions for better error catching
   - 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

Preview capped at 60,000 characters. Download the bundle for every original file and notice.

Read the redistribution license
MIT License

Copyright (c) 2025 Daniel (San) Ávila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Bundle SHA-256: 6fd8c96a8a2525add9621ae927a8a95f00634b6199e0b6ff79e6c8e7ff7d6d9e. Files are served as downloads and are never executed by this page.