Skip to content

Commit 2d9c5f6

Browse files
authored
Merge branch 'main' into main
2 parents 6a57b49 + 2fe203a commit 2d9c5f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1357
-956
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: svelte-code-writer
3+
description: CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (.svelte) or Svelte module (.svelte.ts/.svelte.js). If possible, this skill should be executed within the svelte-file-editor agent for optimal results.
4+
---
5+
6+
# Svelte 5 Code Writer
7+
8+
## CLI Tools
9+
10+
You have access to `@sveltejs/mcp` CLI for Svelte-specific assistance. Use these commands via `npx`:
11+
12+
### List Documentation Sections
13+
14+
```bash
15+
npx @sveltejs/mcp list-sections
16+
```
17+
18+
Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths.
19+
20+
### Get Documentation
21+
22+
```bash
23+
npx @sveltejs/mcp get-documentation "<section1>,<section2>,..."
24+
```
25+
26+
Retrieves full documentation for specified sections. Use after `list-sections` to fetch relevant docs.
27+
28+
**Example:**
29+
30+
```bash
31+
npx @sveltejs/mcp get-documentation "$state,$derived,$effect"
32+
```
33+
34+
### Svelte Autofixer
35+
36+
```bash
37+
npx @sveltejs/mcp svelte-autofixer "<code_or_path>" [options]
38+
```
39+
40+
Analyzes Svelte code and suggests fixes for common issues.
41+
42+
**Options:**
43+
44+
- `--async` - Enable async Svelte mode (default: false)
45+
- `--svelte-version` - Target version: 4 or 5 (default: 5)
46+
47+
**Examples:**
48+
49+
```bash
50+
# Analyze inline code (escape $ as \$)
51+
npx @sveltejs/mcp svelte-autofixer '<script>let count = \$state(0);</script>'
52+
53+
# Analyze a file
54+
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte
55+
56+
# Target Svelte 4
57+
npx @sveltejs/mcp svelte-autofixer ./Component.svelte --svelte-version 4
58+
```
59+
60+
**Important:** When passing code with runes (`$state`, `$derived`, etc.) via the terminal, escape the `$` character as `\$` to prevent shell variable substitution.
61+
62+
## Workflow
63+
64+
1. **Uncertain about syntax?** Run `list-sections` then `get-documentation` for relevant topics
65+
2. **Reviewing/debugging?** Run `svelte-autofixer` on the code to detect issues
66+
3. **Always validate** - Run `svelte-autofixer` before finalizing any Svelte component

api-routes/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
},
1212
"dependencies": {
1313
"@upstash/ratelimit": "2.0.8",
14-
"@upstash/redis": "1.36.1",
15-
"hono": "4.11.4"
14+
"@upstash/redis": "1.37.0",
15+
"hono": "4.12.7"
1616
},
1717
"devDependencies": {
18-
"@cloudflare/workers-types": "4.20260114.0",
19-
"wrangler": "4.59.1"
18+
"@cloudflare/workers-types": "4.20260312.1",
19+
"wrangler": "4.72.0"
2020
}
2121
}

0 commit comments

Comments
 (0)