Skip to documentation
svelte/elevenlabs Docs

Docs Agent kit

Agent kit

Give Claude Code, Cursor, OpenCode, Copilot, Windsurf, Cline, Gemini CLI, and other coding agents one accurate guide to this package.

Why a kit

Coding agents are useful when they already know the shape of an API. They are less useful when they invent a method name, forget that useConversation must run during component initialisation, or move an API key into a client component. The agent kit gives them one reviewed source file and puts it where their tool already looks.

The guide is plain Markdown. It describes the public surface, the lifecycle rules, the signed URL route, the ready-made components, client tools, error codes, and a review checklist. It contains no credentials.

Install

Run the command inside the project that already depends on the package:

Terminal
# Bunbunx svelte-elevenlabs agents install# npmnpx svelte-elevenlabs agents install

With no target names, the command detects the agent configuration in the project. When it cannot detect one, it adds a managed block to AGENTS.md. Choose targets explicitly when you want more than detection finds:

Terminal
bunx svelte-elevenlabs agents install claude cursor opencodebunx svelte-elevenlabs agents install --allbunx svelte-elevenlabs agents install claude --dry-runbunx svelte-elevenlabs agents install claude --force

agents list prints every target and destination path. agents print sends the guide to standard output so you can review it or pipe it into another file.

Targets

Supported agent tools and their destination files
NameToolDestination
claudeClaude Code.claude/skills/svelte-elevenlabs/SKILL.md
cursorCursor.cursor/rules/svelte-elevenlabs.mdc
opencodeOpenCode.opencode/skills/svelte-elevenlabs/SKILL.md
copilotGitHub Copilot.github/copilot-instructions.md
windsurfWindsurf.windsurf/rules/svelte-elevenlabs.md
clineCline.clinerules/svelte-elevenlabs.md
geminiGemini CLIGEMINI.md
agentsCodex, OpenCode, Jules, and other AGENTS.md toolsAGENTS.md

Claude Code and OpenCode skills use the standard name and description frontmatter. Cursor and Windsurf receive rule frontmatter. Copilot, Gemini, and generic agent files use a marked block.

What it writes

Shared files such as AGENTS.md, GEMINI.md, and the Copilot instructions keep your existing content. The installer adds or updates only the block between svelte-elevenlabs:agent-kit:start and svelte-elevenlabs:agent-kit:end. Running the command again replaces that block, so updates do not duplicate text.

Dedicated skill and rule files are treated as owned files. If one already exists without a managed block, the installer skips it and tells you to use --force before it replaces your work. A dry run reports every planned write and changes nothing.

Use it

Restart the agent session after installation so the tool reloads its rules. Then describe the outcome, not the implementation detail:

Agent prompt
Add a voice conversation panel to src/routes/support/+page.svelte.Use svelte-elevenlabs with a signed URL route and the ready-madeConversationWidget. Keep the API key on the server, render errors withrole="alert", and make the start action a real user gesture.

For a review, ask for the checklist directly:

Agent prompt
Review this SvelteKit app for svelte-elevenlabs misuse. Check lifecycle,secret exposure, secure context handling, text only mode, and teardown.Report findings before changing files.

The guide includes the exact controller fields, methods, options, error codes, and code samples the agent needs. It also points to this documentation and to the full machine reference.

Manual setup

If you cannot run the CLI, copy the canonical guide into the file your tool reads. For Claude Code or OpenCode, add this frontmatter above the guide:

SKILL.md
---name: svelte-elevenlabsdescription: Build or review Svelte 5 ElevenLabs Conversational AI voice and text sessions with svelte-elevenlabs.license: MIT---

For a shared file, wrap the guide in the two markers shown above. The CLI uses the same format, so a later install can update the manual copy without touching the rest of the file.

Machine docs

The kit complements the existing plain text documentation. Use llms.txt as a compact index and llms-full.txt as the complete reference. The agent guide is shorter than the full reference and focuses on decisions an agent has to make while editing an application.

Safety

The installer is deliberately conservative. It reads the guide from the installed package, writes only the targets you name or detection finds, and never calls the network, runs a generated script, or asks for credentials. Run a dry run before a real install when the project already has agent rules you want to keep.

  • Run agents install --dry-run first and review every destination path before the installer writes a file.
  • Keep .env and local overrides out of version control. The bundled guide contains no key, no account data, and no agent configuration.
  • Keep ELEVENLABS_API_KEY in server code such as src/routes/api/signed-url/+server.ts, never in a PUBLIC_* variable and never in a static artifact.
  • Review generated code as you would review a pull request. The kit describes the public API, but it cannot verify that the agent used it correctly.
  • Treat a change to the signed URL route, audio permissions, or dependencies as security sensitive and inspect it by hand.
  • Run bun run check, bun run test, and bun run lint before you merge an agent change in this repository.

The guide is documentation, not a sandbox. An agent can still make an unsafe choice, so keep the review checklist in the loop and keep production credentials out of the workspace you hand to it.

Edit this page on GitHub