Agent skill

Elevenlabs Reference Architecture

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Implement an ElevenLabs reference architecture for production TTS/voice applications.

MITAuto-check passedMedia & Creative

Install Elevenlabs Reference Architecture

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill elevenlabs-reference-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace elevenlabs-reference-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/elevenlabs-reference-architecture .claude/skills/elevenlabs-reference-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
elevenlabs-reference-architecture
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
571 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Implement an ElevenLabs reference architecture for production TTS/voice applications.

  • Works in 6 steps: Lay out the project → Configuration layer → TTS service layer → …
  • Designing new ElevenLabs integrations
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Needs ELEVENLABS_API_KEY

What it does

Elevenlabs Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement an ElevenLabs reference architecture for production TTS/voice applications. Use when designing new ElevenLabs integrations, reviewing project structure, or building a scalable audio generation service. Trigger with "elevenlabs architecture", "elevenlabs project structure", "how to organize elevenlabs", "TTS service architecture", "elevenlabs design patterns", "voice API architecture".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/architecture.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Media & Creative, covering Text to speech and voice. It works with ElevenLabs. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Designing new ElevenLabs integrations
  • Reviewing project structure
  • Building a scalable audio generation service
  • With elevenlabs architecture

Example prompts

  • “elevenlabs architecture”
  • “elevenlabs project structure”
  • “how to organize elevenlabs”
  • “/elevenlabs-reference-architecture”

Requirements

  • A credential in ELEVENLABS_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Lay out the project
  2. Configuration layer
  3. TTS service layer
  4. Voice management service
  5. Wire the data flow
  6. Health check composition

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • elevenlabs.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ELEVENLABS_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Elevenlabs Reference Architecture loads about 1.6k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 571 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 571 words, ~1,575 tokens.

Download SKILL.mdSave it as .claude/skills/elevenlabs-reference-architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
elevenlabs-reference-architecture
description
Implement an ElevenLabs reference architecture for production TTS/voice applications. Use when designing new ElevenLabs integrations, reviewing project structure, or building a scalable audio generation service. Trigger with "elevenlabs architecture", "elevenlabs project structure", "how to organize elevenlabs", "TTS service architecture", "elevenlabs design patterns", "voice API architecture".
allowed-tools
Read
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, voice, ai, elevenlabs, architecture, patterns

ElevenLabs Reference Architecture

Overview

Production-ready architecture for ElevenLabs TTS/voice applications. Covers project layout, service layers, caching, streaming, and multi-model orchestration. The full code for each layer lives in references/ so this file stays a navigable map; drill into a reference file when you need the exact implementation.

Prerequisites

  • Understanding of layered architecture patterns
  • ElevenLabs SDK knowledge (see elevenlabs-sdk-patterns)
  • TypeScript project with async patterns
  • Redis (optional, for distributed caching)
  • Auth: an ElevenLabs API key exported as ELEVENLABS_API_KEY (read by the config layer). This is the only ElevenLabs credential — your app's own request auth (middleware/auth.ts) is separate and unrelated.

Instructions

Build the service in six layers. Each step below is the high-level move; the verbatim code and diagrams are in the linked reference files.

Step 1: Lay out the project

Split the codebase into elevenlabs/ (client, config, models, errors, types), services/ (tts, voice, audio, cache), api/ (routes + middleware), queue/, and monitoring/. See the full project tree.

Step 2: Configuration layer

Define an environment-aware ElevenLabsConfig — dev uses the cheap/fast eleven_flash_v2_5 and small output format; production uses eleven_multilingual_v2 at higher quality, more concurrency, and a larger cache. loadConfig() merges the per-environment defaults with ELEVENLABS_API_KEY. Full interface and ENV_CONFIGS: implementation walkthrough.

Step 3: TTS service layer

Wrap the SDK client in a TTSService that owns a singleton client and a p-queue sized to maxConcurrency (this is what prevents 429s). generate() supports both streaming and buffered convert, logs latency, and routes errors through classifyError. generateLongText() splits on sentence boundaries under the 5000-char limit to preserve prosody. Full class: implementation walkthrough.

Step 4: Voice management service

A VoiceService over the client for list/clone/get-settings/update-settings/delete, with category filtering (premade / cloned / generated). Full class: implementation walkthrough.

Step 5: Wire the data flow

Requests flow Client → API layer → Cache/TTS/Voice services → queue → singleton SDK client → ElevenLabs REST/WS endpoints. See the data flow diagram.

Step 6: Health check composition

Compose a /health route that runs connectivity, quota, and cache checks with Promise.allSettled, returning healthy / degraded / unhealthy (degraded once quota exceeds 90%). Full function: implementation walkthrough.

Every architectural choice (singleton client, p-queue, LRU-vs-Redis, sentence splitting, environment-based model selection, HTTP-vs-WS streaming) and its rationale is tabulated in the architecture decisions table.

Show full SKILL.md (215 more words)Show less

Output

Applying this skill produces a layered service scaffold, not a single file:

  • A directory tree matching the project structure.
  • An environment-aware config module resolving dev/staging/production defaults.
  • A TTSService (queued, retry-aware, streaming-capable) and a VoiceService.
  • A /health route returning { status, services, timestamp } where status is healthy, degraded, or unhealthy.
  • At runtime, generate() returns a Buffer (or a ReadableStream when streaming: true); generateLongText() returns Buffer[], one per chunk.

Error Handling

IssueCauseSolution
Circular dependenciesWrong layeringServices depend on client, never reverse
Cold start latencyClient initializationPre-warm in server startup
Memory pressureUnbounded audio cacheSet maxSizeMB on cache
Type errorsSDK version mismatchPin SDK version in package.json
Frequent 429sConcurrency above plan limitLower maxConcurrency in config
Missing API keyELEVENLABS_API_KEY unsetExport it before loadConfig() runs

Examples

Generate speech through the service layer:

typescript
const tts = new TTSService();
const audio = await tts.generate("Hello from production.", {
  voiceId: "21m00Tcm4TlvDq8ikWAM",
});

Stream a long article with prosody-preserving chunking:

typescript
const chunks = await tts.generateLongText(longArticleText);
// chunks: Buffer[] — concatenate or pipe in order

For the complete, runnable layers behind these snippets — config, full TTSService, VoiceService, and the /health composition — see the implementation walkthrough. For the project tree, data flow, and decision rationale, see architecture.md.

Resources

Next Steps

Start with elevenlabs-install-auth for setup, then apply this architecture. Use elevenlabs-core-workflow-a and elevenlabs-core-workflow-b for feature implementation.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/.curated/elevenlabs-reference-architecture of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/architecture.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Elevenlabs Reference Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Elevenlabs Reference Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Elevenlabs Reference Architecture this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Musictadaspetra/loop2962 repos~827Automated safety check: PassMIT
Sound Effectstadaspetra/loop2962 repos~1.1kAutomated safety check: PassMIT
Elevenlabs Transcribeqdhenry/Claude-Command-Suite1.3k—~1.5kAutomated safety check: NotesNone
Dubbingelevenlabs/skills482—~3.3kAutomated safety check: PassMIT
Sagtrpc-group/trpc-agent-go1.9k15 repos~574Automated safety check: PassApache-2.0

Similar skills

  • Music

    tadaspetra/loop

    Generate music using ElevenLabs Music API. An agent skill from tadaspetra/loop.

    296 GitHub starsUsed in 2 repos~827 tokens
    Media & CreativeAuto-check passed
  • Sound Effects

    tadaspetra/loop

    Generate sound effects from text descriptions using ElevenLabs.

    296 GitHub starsUsed in 2 repos~1.1k tokens
    Media & CreativeAuto-check passed
  • Elevenlabs Transcribe

    qdhenry/Claude-Command-Suite

    Transcribes audio/video files using ElevenLabs Scribe v2 API.

    1.3k GitHub stars~1.5k tokensUpdated 7 mo ago
    Media & CreativeAuto-check: notes
  • Dubbing

    elevenlabs/skills

    Dub audio and video into other languages using the ElevenLabs Dubbing API (dubbingv2), preserving the original speakers' voices.

    482 GitHub stars~3.3k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Sag

    trpc-group/trpc-agent-go

    ElevenLabs text-to-speech with mac-style say UX. An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 15 repos~574 tokens
    Media & CreativeAuto-check passed
  • Music

    bozhouDev/video-skills-toolkit

    Generate music using ElevenLabs Music API. An agent skill from bozhouDev/video-skills-toolkit.

    150 GitHub stars~3.6k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Elevenlabs Reference Architecture

What does Elevenlabs Reference Architecture do?

Implement an ElevenLabs reference architecture for production TTS/voice applications. Elevenlabs Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement an ElevenLabs reference architecture for production TTS/voice applications.

When should I use Elevenlabs Reference Architecture?

Elevenlabs Reference Architecture fits situations like: designing new ElevenLabs integrations; reviewing project structure; building a scalable audio generation service; with elevenlabs architecture.

How do I install Elevenlabs Reference Architecture in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill elevenlabs-reference-architecture -a claude-code`. Or copy the skill folder (skills/.curated/elevenlabs-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/elevenlabs-reference-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Elevenlabs Reference Architecture in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill elevenlabs-reference-architecture -a codex`. Or copy the skill folder (skills/.curated/elevenlabs-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/elevenlabs-reference-architecture in your project. Codex loads it when a task matches its description.

Can I use Elevenlabs Reference Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill elevenlabs-reference-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/elevenlabs-reference-architecture, .gemini/skills/elevenlabs-reference-architecture, .github/skills/elevenlabs-reference-architecture and .opencode/skills/elevenlabs-reference-architecture in your project.

What does Elevenlabs Reference Architecture need to run?

Going by SKILL.md and its folder, Elevenlabs Reference Architecture needs credentials named ELEVENLABS_API_KEY. Our summary lists: A credential in ELEVENLABS_API_KEY. Its frontmatter pre-approves these tools: Read. Compatibility (from SKILL.md): Designed for Claude Code.

Does Elevenlabs Reference Architecture access the network?

SKILL.md names 2 domains. As links in the text: github.com and elevenlabs.io. This is read from the text; nothing was executed.

Is Elevenlabs Reference Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Elevenlabs Reference Architecture use?

Elevenlabs Reference Architecture is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Elevenlabs Reference Architecture use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Elevenlabs Reference Architecture?

Skills that share tags, products or a category with Elevenlabs Reference Architecture: Music (tadaspetra/loop, 296 stars), Sound Effects (tadaspetra/loop, 296 stars), Elevenlabs Transcribe (qdhenry/Claude-Command-Suite, 1.3k stars) and Dubbing (elevenlabs/skills, 482 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Elevenlabs Reference Architecture?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.