Skip to content

Commit 50bd742

Browse files
Sync ai-tools docs (#1858)
Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent a41fb68 commit 50bd742

File tree

4 files changed

+41
-29
lines changed

4 files changed

+41
-29
lines changed

apps/svelte.dev/content/docs/ai/10-introduction/10-overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ To get the most out of the MCP server we recommend including the following promp
1818

1919
> [!NOTE] This is already setup for you when using `npx sv add mcp`
2020
21+
<!-- prettier-ignore-start -->
22+
````markdown
2123
You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively:
2224

2325
## Available Svelte MCP Tools:
@@ -42,5 +44,7 @@ You MUST use this tool whenever writing Svelte code before sending it to the use
4244
Generates a Svelte Playground link with the provided code.
4345
After completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project.
4446

47+
````
48+
<!-- prettier-ignore-end -->
4549

4650
If your MCP client supports it, we also recommend using the [svelte-task](prompts#svelte-task) prompt to instruct the LLM on the best way to use the MCP server.

apps/svelte.dev/content/docs/ai/30-capabilities/.generated/prompts.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,22 @@ This prompt should be used whenever you are asking the model to work on a Svelte
55
<details>
66
<summary>Copy the prompt</summary>
77

8-
```md
8+
<!-- prettier-ignore-start -->
9+
````markdown
910
You are a Svelte expert tasked to build components and utilities for Svelte developers. If you need documentation for anything related to Svelte you can invoke the tool `get-documentation` with one of the following paths. However: before invoking the `get-documentation` tool, try to answer the users query using your own knowledge and the `svelte-autofixer` tool. Be mindful of how many section you request, since it is token-intensive!
1011
<available-docs>
1112

13+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/overview
14+
- title: Local setup, use_cases: use title and path to estimate use case, path: ai/local-setup
15+
- title: Remote setup, use_cases: use title and path to estimate use case, path: ai/remote-setup
16+
- title: Tools, use_cases: use title and path to estimate use case, path: ai/tools
17+
- title: Resources, use_cases: use title and path to estimate use case, path: ai/resources
18+
- title: Prompts, use_cases: use title and path to estimate use case, path: ai/prompts
19+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/plugin
20+
- title: Subagent, use_cases: use title and path to estimate use case, path: ai/subagent
21+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/opencode-plugin
22+
- title: Subagent, use_cases: use title and path to estimate use case, path: ai/opencode-subagent
23+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/skills
1224
- title: Overview, use_cases: project setup, creating new svelte apps, scaffolding, cli tools, initializing projects, path: cli/overview
1325
- title: Frequently asked questions, use_cases: project setup, initializing new svelte projects, troubleshooting cli installation, package manager configuration, path: cli/faq
1426
- title: sv create, use_cases: project setup, starting new sveltekit app, initializing project, creating from playground, choosing project template, path: cli/sv-create
@@ -18,7 +30,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
1830
- title: devtools-json, use_cases: development setup, chrome devtools integration, browser-based editing, local development workflow, debugging setup, path: cli/devtools-json
1931
- title: drizzle, use_cases: database setup, sql queries, orm integration, data modeling, postgresql, mysql, sqlite, server-side data access, database migrations, type-safe queries, path: cli/drizzle
2032
- title: eslint, use_cases: code quality, linting, error detection, project setup, code standards, team collaboration, typescript projects, path: cli/eslint
21-
- title: lucia, use_cases: authentication, login systems, user management, registration pages, session handling, auth setup, path: cli/lucia
33+
- title: better-auth, use_cases: use title and path to estimate use case, path: cli/better-auth
2234
- title: mcp, use_cases: use title and path to estimate use case, path: cli/mcp
2335
- title: mdsvex, use_cases: blog, content sites, markdown rendering, documentation sites, technical writing, cms integration, article pages, path: cli/mdsvex
2436
- title: paraglide, use_cases: internationalization, multi-language sites, i18n, translation, localization, language switching, global apps, multilingual content, path: cli/paraglide
@@ -29,6 +41,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
2941
- title: tailwindcss, use_cases: project setup, styling, css framework, rapid prototyping, utility-first css, design systems, responsive design, adding tailwind to svelte, path: cli/tailwind
3042
- title: vitest, use_cases: testing, unit tests, component testing, test setup, quality assurance, ci/cd pipelines, test-driven development, path: cli/vitest
3143
- title: add-on, use_cases: use title and path to estimate use case, path: cli/add-on
44+
- title: sv-utils, use_cases: use title and path to estimate use case, path: cli/sv-utils
3245
- title: Introduction, use_cases: learning sveltekit, project setup, understanding framework basics, choosing between svelte and sveltekit, getting started with full-stack apps, path: kit/introduction
3346
- title: Creating a project, use_cases: project setup, starting new sveltekit app, initial development environment, first-time sveltekit users, scaffolding projects, path: kit/creating-a-project
3447
- title: Project types, use_cases: deployment, project setup, choosing adapters, ssg, spa, ssr, serverless, mobile apps, desktop apps, pwa, offline apps, browser extensions, separate backend, docker containers, path: kit/project-types
@@ -96,17 +109,6 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
96109
- title: Configuration, use_cases: project setup, configuration, adapters, deployment, build settings, environment variables, routing customization, prerendering, csp security, csrf protection, path configuration, typescript setup, path: kit/configuration
97110
- title: Command Line Interface, use_cases: project setup, typescript configuration, generated types, ./$types imports, initial project configuration, path: kit/cli
98111
- title: Types, use_cases: typescript, type safety, route parameters, api endpoints, load functions, form actions, generated types, jsconfig setup, path: kit/types
99-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/overview
100-
- title: Local setup, use_cases: use title and path to estimate use case, path: mcp/local-setup
101-
- title: Remote setup, use_cases: use title and path to estimate use case, path: mcp/remote-setup
102-
- title: Tools, use_cases: use title and path to estimate use case, path: mcp/tools
103-
- title: Resources, use_cases: use title and path to estimate use case, path: mcp/resources
104-
- title: Prompts, use_cases: use title and path to estimate use case, path: mcp/prompts
105-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/plugin
106-
- title: Skill, use_cases: use title and path to estimate use case, path: mcp/skill
107-
- title: Subagent, use_cases: use title and path to estimate use case, path: mcp/subagent
108-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/opencode-plugin
109-
- title: Subagent, use_cases: use title and path to estimate use case, path: mcp/opencode-subagent
110112
- title: Overview, use_cases: always, any svelte project, getting started, learning svelte, introduction, project setup, understanding framework basics, path: svelte/overview
111113
- title: Getting started, use_cases: project setup, starting new svelte project, initial installation, choosing between sveltekit and vite, editor configuration, path: svelte/getting-started
112114
- title: .svelte files, use_cases: always, any svelte project, component creation, project setup, learning svelte basics, path: svelte/svelte-files
@@ -154,6 +156,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
154156
- title: Lifecycle hooks, use_cases: component initialization, cleanup tasks, timers, subscriptions, dom measurements, chat windows, autoscroll features, migration from svelte 4, path: svelte/lifecycle-hooks
155157
- title: Imperative component API, use_cases: project setup, client-side rendering, server-side rendering, ssr, hydration, testing, programmatic component creation, tooltips, dynamic mounting, path: svelte/imperative-component-api
156158
- title: Hydratable data, use_cases: use title and path to estimate use case, path: svelte/hydratable
159+
- title: Best practices, use_cases: use title and path to estimate use case, path: svelte/best-practices
157160
- title: Testing, use_cases: testing, quality assurance, unit tests, integration tests, component tests, e2e tests, vitest setup, playwright setup, test automation, path: svelte/testing
158161
- title: TypeScript, use_cases: typescript setup, type safety, component props typing, generic components, wrapper components, dom type augmentation, project configuration, path: svelte/typescript
159162
- title: Custom elements, use_cases: web components, custom elements, component library, design system, framework-agnostic components, embedding svelte in non-svelte apps, shadow dom, path: svelte/custom-elements
@@ -204,6 +207,7 @@ This is the task you will work on:
204207
</task>
205208

206209
If you are not writing the code into a file, once you have the final version of the code ask the user if it wants to generate a playground link to quickly check the code in it and if it answer yes call the `playground-link` tool and return the url to the user nicely formatted. The playground link MUST be generated only once you have the final version of the code and you are ready to share it, it MUST include an entry point file called `App.svelte` where the main component should live. If you have multiple files to include in the playground link you can include them all at the root.
207-
```
210+
````
211+
<!-- prettier-ignore-end -->
208212

209213
</details>

apps/svelte.dev/content/docs/ai/30-capabilities/30-prompts.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,22 @@ This prompt should be used whenever you are asking the model to work on a Svelte
1212
<details>
1313
<summary>Copy the prompt</summary>
1414

15-
```md
15+
<!-- prettier-ignore-start -->
16+
````markdown
1617
You are a Svelte expert tasked to build components and utilities for Svelte developers. If you need documentation for anything related to Svelte you can invoke the tool `get-documentation` with one of the following paths. However: before invoking the `get-documentation` tool, try to answer the users query using your own knowledge and the `svelte-autofixer` tool. Be mindful of how many section you request, since it is token-intensive!
1718
<available-docs>
1819

20+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/overview
21+
- title: Local setup, use_cases: use title and path to estimate use case, path: ai/local-setup
22+
- title: Remote setup, use_cases: use title and path to estimate use case, path: ai/remote-setup
23+
- title: Tools, use_cases: use title and path to estimate use case, path: ai/tools
24+
- title: Resources, use_cases: use title and path to estimate use case, path: ai/resources
25+
- title: Prompts, use_cases: use title and path to estimate use case, path: ai/prompts
26+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/plugin
27+
- title: Subagent, use_cases: use title and path to estimate use case, path: ai/subagent
28+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/opencode-plugin
29+
- title: Subagent, use_cases: use title and path to estimate use case, path: ai/opencode-subagent
30+
- title: Overview, use_cases: use title and path to estimate use case, path: ai/skills
1931
- title: Overview, use_cases: project setup, creating new svelte apps, scaffolding, cli tools, initializing projects, path: cli/overview
2032
- title: Frequently asked questions, use_cases: project setup, initializing new svelte projects, troubleshooting cli installation, package manager configuration, path: cli/faq
2133
- title: sv create, use_cases: project setup, starting new sveltekit app, initializing project, creating from playground, choosing project template, path: cli/sv-create
@@ -25,7 +37,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
2537
- title: devtools-json, use_cases: development setup, chrome devtools integration, browser-based editing, local development workflow, debugging setup, path: cli/devtools-json
2638
- title: drizzle, use_cases: database setup, sql queries, orm integration, data modeling, postgresql, mysql, sqlite, server-side data access, database migrations, type-safe queries, path: cli/drizzle
2739
- title: eslint, use_cases: code quality, linting, error detection, project setup, code standards, team collaboration, typescript projects, path: cli/eslint
28-
- title: lucia, use_cases: authentication, login systems, user management, registration pages, session handling, auth setup, path: cli/lucia
40+
- title: better-auth, use_cases: use title and path to estimate use case, path: cli/better-auth
2941
- title: mcp, use_cases: use title and path to estimate use case, path: cli/mcp
3042
- title: mdsvex, use_cases: blog, content sites, markdown rendering, documentation sites, technical writing, cms integration, article pages, path: cli/mdsvex
3143
- title: paraglide, use_cases: internationalization, multi-language sites, i18n, translation, localization, language switching, global apps, multilingual content, path: cli/paraglide
@@ -36,6 +48,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
3648
- title: tailwindcss, use_cases: project setup, styling, css framework, rapid prototyping, utility-first css, design systems, responsive design, adding tailwind to svelte, path: cli/tailwind
3749
- title: vitest, use_cases: testing, unit tests, component testing, test setup, quality assurance, ci/cd pipelines, test-driven development, path: cli/vitest
3850
- title: add-on, use_cases: use title and path to estimate use case, path: cli/add-on
51+
- title: sv-utils, use_cases: use title and path to estimate use case, path: cli/sv-utils
3952
- title: Introduction, use_cases: learning sveltekit, project setup, understanding framework basics, choosing between svelte and sveltekit, getting started with full-stack apps, path: kit/introduction
4053
- title: Creating a project, use_cases: project setup, starting new sveltekit app, initial development environment, first-time sveltekit users, scaffolding projects, path: kit/creating-a-project
4154
- title: Project types, use_cases: deployment, project setup, choosing adapters, ssg, spa, ssr, serverless, mobile apps, desktop apps, pwa, offline apps, browser extensions, separate backend, docker containers, path: kit/project-types
@@ -103,17 +116,6 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
103116
- title: Configuration, use_cases: project setup, configuration, adapters, deployment, build settings, environment variables, routing customization, prerendering, csp security, csrf protection, path configuration, typescript setup, path: kit/configuration
104117
- title: Command Line Interface, use_cases: project setup, typescript configuration, generated types, ./$types imports, initial project configuration, path: kit/cli
105118
- title: Types, use_cases: typescript, type safety, route parameters, api endpoints, load functions, form actions, generated types, jsconfig setup, path: kit/types
106-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/overview
107-
- title: Local setup, use_cases: use title and path to estimate use case, path: mcp/local-setup
108-
- title: Remote setup, use_cases: use title and path to estimate use case, path: mcp/remote-setup
109-
- title: Tools, use_cases: use title and path to estimate use case, path: mcp/tools
110-
- title: Resources, use_cases: use title and path to estimate use case, path: mcp/resources
111-
- title: Prompts, use_cases: use title and path to estimate use case, path: mcp/prompts
112-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/plugin
113-
- title: Skill, use_cases: use title and path to estimate use case, path: mcp/skill
114-
- title: Subagent, use_cases: use title and path to estimate use case, path: mcp/subagent
115-
- title: Overview, use_cases: use title and path to estimate use case, path: mcp/opencode-plugin
116-
- title: Subagent, use_cases: use title and path to estimate use case, path: mcp/opencode-subagent
117119
- title: Overview, use_cases: always, any svelte project, getting started, learning svelte, introduction, project setup, understanding framework basics, path: svelte/overview
118120
- title: Getting started, use_cases: project setup, starting new svelte project, initial installation, choosing between sveltekit and vite, editor configuration, path: svelte/getting-started
119121
- title: .svelte files, use_cases: always, any svelte project, component creation, project setup, learning svelte basics, path: svelte/svelte-files
@@ -161,6 +163,7 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
161163
- title: Lifecycle hooks, use_cases: component initialization, cleanup tasks, timers, subscriptions, dom measurements, chat windows, autoscroll features, migration from svelte 4, path: svelte/lifecycle-hooks
162164
- title: Imperative component API, use_cases: project setup, client-side rendering, server-side rendering, ssr, hydration, testing, programmatic component creation, tooltips, dynamic mounting, path: svelte/imperative-component-api
163165
- title: Hydratable data, use_cases: use title and path to estimate use case, path: svelte/hydratable
166+
- title: Best practices, use_cases: use title and path to estimate use case, path: svelte/best-practices
164167
- title: Testing, use_cases: testing, quality assurance, unit tests, integration tests, component tests, e2e tests, vitest setup, playwright setup, test automation, path: svelte/testing
165168
- title: TypeScript, use_cases: typescript setup, type safety, component props typing, generic components, wrapper components, dom type augmentation, project configuration, path: svelte/typescript
166169
- title: Custom elements, use_cases: web components, custom elements, component library, design system, framework-agnostic components, embedding svelte in non-svelte apps, shadow dom, path: svelte/custom-elements
@@ -211,7 +214,8 @@ This is the task you will work on:
211214
</task>
212215

213216
If you are not writing the code into a file, once you have the final version of the code ask the user if it wants to generate a playground link to quickly check the code in it and if it answer yes call the `playground-link` tool and return the url to the user nicely formatted. The playground link MUST be generated only once you have the final version of the code and you are ready to share it, it MUST include an entry point file called `App.svelte` where the main component should live. If you have multiple files to include in the playground link you can include them all at the root.
214-
```
217+
````
218+
<!-- prettier-ignore-end -->
215219

216220
</details>
217221

apps/svelte.dev/content/docs/ai/50-opencode-plugin/opencode-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OpenCode has a [plugin system](https://opencode.ai/docs/plugins/) that allows de
77

88
## Installation
99

10-
To install the plugin in OpenCode you can edit your [OpenCode config]() (either the global or the local one), adding `@sveltejs/opencode` to the list of plugins.
10+
To install the plugin in OpenCode you can edit your [OpenCode config](https://opencode.ai/docs/config/) (either the global or the local one), adding `@sveltejs/opencode` to the list of plugins.
1111

1212
```json
1313
{

0 commit comments

Comments
 (0)