mirror of
https://github.com/sveltejs/ai-tools.git
synced 2026-07-04 19:45:32 +08:00
Compare commits
3 Commits
@sveltejs/
...
@sveltejs/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f538265d1 | ||
|
|
71295bc11f | ||
|
|
b5040ff5cf |
@@ -4,19 +4,19 @@ title: Overview
|
|||||||
|
|
||||||
The open source [repository](https://github.com/sveltejs/mcp) containing the code for the MCP server is also a Claude Code Marketplace plugin.
|
The open source [repository](https://github.com/sveltejs/mcp) containing the code for the MCP server is also a Claude Code Marketplace plugin.
|
||||||
|
|
||||||
The marketplace allow you to install the `svelte` plugin which will give you both the remote MCP server, a [skill](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview) to instruct the LLM on how to properly write Svelte 5 code, and a specialized agent for editing Svelte files.
|
The marketplace allows you to install the `svelte` plugin which will give you both the remote MCP server, a [skill](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview) to instruct the LLM on how to properly write Svelte 5 code, and a specialized agent for editing Svelte files.
|
||||||
|
|
||||||
If possible is recommended to instruct the LLM to execute MCP calls with the agent (you can explicitly mention an agent in your message to delegate work to it) when creating or editing `.svelte` files or `.svelte.ts`/`.svelte.js` modules as it helps save context by handling Svelte-specific tasks more efficiently.
|
If possible, we recommend that you instruct the LLM to execute MCP calls with the agent (you can explicitly mention an agent in your message to delegate work to it) when creating or editing `.svelte` files or `.svelte.ts`/`.svelte.js` modules as it helps save context by handling Svelte-specific tasks more efficiently.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To add the repository as a marketplace launch claude code and type
|
To add the repository as a marketplace, launch Claude Code and type the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/plugin marketplace add sveltejs/mcp
|
/plugin marketplace add sveltejs/mcp
|
||||||
```
|
```
|
||||||
|
|
||||||
once you do that you can install the svelte skill doing
|
Then, install the Svelte skill:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/plugin install svelte
|
/plugin install svelte
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
title: Skill
|
title: Skill
|
||||||
---
|
---
|
||||||
|
|
||||||
Claude Skills are a set of Markdown files that live in your `.claude` folder (or that you can upload in your Claude web/desktop). They are automatically loaded by Claude when it thinks they are appropriate for the current task.
|
Claude Skills are sets of markdown files that live in your `.claude` folder (or that you can upload via the Claude web/desktop app). They are automatically loaded by Claude when it thinks they are appropriate for the current task.
|
||||||
|
|
||||||
With those markdown files you can steer the agent behaviours and, in our case, we teach him how to properly write Svelte 5 code. The advantage over the MCP server is that the relevant tokens are only loaded when they are needed (so if you ask the LLM to write a Typescript utility in a Svelte project it will not load the skill in the context).
|
With those markdown files you can steer the agent's behaviour and, in our case, teach it how to properly write Svelte 5 code. The advantage over the MCP server is that the relevant tokens are only loaded when they are needed (for example, if you ask the LLM to write a Typescript utility in a Svelte project it will not load the skill in the context).
|
||||||
|
|
||||||
You can find the skill inside the [`sveltejs/mcp`](https://github.com/sveltejs/mcp/tree/main/plugins/svelte/skills) repo (it's in the `/plugins/svelte/skills` folder). You can also download the latest zip file from the [releases page](https://github.com/sveltejs/mcp/releases?q=svelte-code-writer) to load it in your Claude web/desktop or to extract it inside your `.claude` folder.
|
You can find the skill inside the [`sveltejs/mcp`](https://github.com/sveltejs/mcp) repo in the [`plugins/svelte/skills`](https://github.com/sveltejs/mcp/tree/main/plugins/svelte/skills) folder. You can also download the latest zip file from the [releases page](https://github.com/sveltejs/mcp/releases?q=svelte-code-writer) to load it in the Claude web/desktop app or to extract it inside your `.claude` folder.
|
||||||
|
|
||||||
If you are using Claude Code you can also install it through the [Svelte marketplace](plugin).
|
If you are using Claude Code you can also install it through the [Svelte marketplace](plugin).
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ The Svelte plugin includes a specialized subagent called `svelte-file-editor` de
|
|||||||
|
|
||||||
## Benefits
|
## Benefits
|
||||||
|
|
||||||
The subagent is executed in a separate "agent" that has access to it's own context window. This allows the agent to fetch the documentation, iterate with the `svelte-autofixer` tool and write to the file system without wasting context in the main agent.
|
The subagent has access to its own context window, allowing it to fetch the documentation, iterate with the `svelte-autofixer` tool and write to the file system without wasting context in the main agent.
|
||||||
|
|
||||||
The delegation should happen automatically when appropriate, but you can also explicitly request the subagent be used for Svelte-related tasks.
|
The delegation should happen automatically when appropriate, but you can also explicitly request the subagent be used for Svelte-related tasks.
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @sveltejs/opencode
|
# @sveltejs/opencode
|
||||||
|
|
||||||
|
## 0.0.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- chore: add README to opencode plugin ([`71295bc`](https://github.com/sveltejs/mcp/commit/71295bc11fb7bac6703e655f5fddead29967353c))
|
||||||
|
|
||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
75
packages/opencode/README.md
Normal file
75
packages/opencode/README.md
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# @sveltejs/opencode
|
||||||
|
|
||||||
|
OpenCode plugin for Svelte that provides the Svelte MCP server, a specialized file editor subagent and instruction files.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Add `@sveltejs/opencode` to your OpenCode config (either global or local):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"$schema": "https://opencode.ai/config.json",
|
||||||
|
"plugin": ["@sveltejs/opencode"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it! You now have the Svelte MCP server and the file editor subagent configured automatically.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### Svelte MCP Server
|
||||||
|
|
||||||
|
The plugin automatically configures the [Svelte MCP server](https://mcp.svelte.dev) which provides:
|
||||||
|
|
||||||
|
- **list-sections** - Discover available Svelte 5 and SvelteKit documentation sections
|
||||||
|
- **get-documentation** - Retrieve full documentation content for specific sections
|
||||||
|
- **svelte-autofixer** - Analyze Svelte code and get issues/suggestions
|
||||||
|
- **playground-link** - Generate Svelte Playground links with provided code
|
||||||
|
|
||||||
|
### Svelte File Editor Subagent
|
||||||
|
|
||||||
|
A specialized subagent (`svelte-file-editor`) that is automatically used when creating, editing, or reviewing `.svelte`, `.svelte.ts`, or `.svelte.js` files. It fetches relevant documentation and validates code using the Svelte MCP server tools.
|
||||||
|
|
||||||
|
### Agent Instructions
|
||||||
|
|
||||||
|
The plugin injects instructions that teach the agent how to effectively use the Svelte MCP tools.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The default configuration:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/sveltejs/mcp/refs/heads/main/packages/opencode/schema.json",
|
||||||
|
"mcp": {
|
||||||
|
"type": "remote",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"subagent": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"instructions": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuration Options
|
||||||
|
|
||||||
|
| Option | Type | Default | Description |
|
||||||
|
| ---------------------- | ----------------------- | ---------- | -------------------------------------------------------------------------------- |
|
||||||
|
| `mcp.type` | `"remote"` \| `"local"` | `"remote"` | Use the remote server at `mcp.svelte.dev` or run locally via `npx @sveltejs/mcp` |
|
||||||
|
| `mcp.enabled` | `boolean` | `true` | Enable/disable the MCP server |
|
||||||
|
| `subagent.enabled` | `boolean` | `true` | Enable/disable the Svelte file editor subagent |
|
||||||
|
| `instructions.enabled` | `boolean` | `true` | Enable/disable agent instructions injection |
|
||||||
|
|
||||||
|
### Config File Location
|
||||||
|
|
||||||
|
Place your configuration at one of these locations:
|
||||||
|
|
||||||
|
- `~/.config/opencode/svelte.json` (global)
|
||||||
|
- `$OPENCODE_CONFIG_DIR/svelte.json` (if `OPENCODE_CONFIG_DIR` is set, takes priority)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sveltejs/opencode",
|
"name": "@sveltejs/opencode",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/sveltejs/mcp#readme",
|
"homepage": "https://github.com/sveltejs/mcp#readme",
|
||||||
|
|||||||
Reference in New Issue
Block a user