Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/elevenlabs-local-dev-loop

@0d57af8
Run it yourself

Use when setting up a local ElevenLabs dev environment for a TTS/voice project and you need SDK mocking, hot reload, quota-aware iteration, and audio-output testing that does not burn character quota during development. Trigger with "elevenlabs dev setup", "elevenlabs local development", "elevenlabs dev environment", "develop with elevenlabs", "test elevenlabs locally".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/elevenlabs-local-dev-loop

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈645 tokens on demand. Your agent reads this file only when SKILL.md points to it.

ElevenLabs Local Dev Loop — Worked Examples

Concrete end-to-end runs of the dev loop. Each example uses the code from implementation.md.

Example 1: Run the unit test suite with zero API cost

The mock layer (tests/__mocks__/elevenlabs.ts) returns the known-good sample.mp3 fixture, so unit tests never call the real API or burn character quota.

npm run test

The mocked test drives the service through the fake client:

it("should generate audio from text (mocked)", async () => {
  const audio = await mockElevenLabsClient.textToSpeech.convert(
    "21m00Tcm4TlvDq8ikWAM",
    { text: "Test speech", model_id: "eleven_flash_v2_5" }
  );
  expect(audio).toBeDefined();
});

Expected: the suite passes offline, with no ELEVENLABS_API_KEY set and no character charges.

Example 2: Check quota before spending real credits

Run the quota checker before any integration run so a low balance fails fast instead of surprising you mid-test.

npm run quota

Expected output on a healthy free tier:

Characters: 500 / 10,000 (5.0% used)
Remaining: 9,500 characters

When remaining < 1000, the script prints the low-quota warning and exits 1, which stops a CI step or a chained command before it hits the paid API.

Example 3: Opt into a real integration run

Real API calls are gated behind ELEVENLABS_INTEGRATION=1 so they only happen when you explicitly ask for them.

npm run test:integration

This sets the flag that flips the guarded test on:

const useRealApi = process.env.ELEVENLABS_INTEGRATION === "1";

it.skipIf(!useRealApi)("should generate real audio (integration)", async () => {
  const { ElevenLabsClient } = await import("@elevenlabs/elevenlabs-js");
  const client = new ElevenLabsClient();
  const audio = await client.textToSpeech.convert("21m00Tcm4TlvDq8ikWAM", {
    text: "Integration test.",
    model_id: "eleven_flash_v2_5",
  });
  expect(audio).toBeDefined();
});

Without the flag, this test is skipped and only the mocked path runs.

Example 4: Hot-reload iteration while building

Use tsx watch for a fast edit-save-rerun loop on your entry point. Because dev config selects eleven_flash_v2_5 (0.5 credits/char, ~75ms latency), each iteration is cheaper and faster than the production eleven_multilingual_v2 path.

npm run dev

Edit src/index.ts, save, and tsx restarts the process automatically — pair this with the mock layer to keep the loop free until you deliberately switch to integration mode.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a secure and well-structured boilerplate for local ElevenLabs development. It correctly implements secret management via environment variables and utilizes standard, reputable libraries for testing and execution. No malicious code or exfiltration patterns were identified.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 months ago
What it can do
Reads files Edits files Runs commands
version
1.6.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "voice",
  "ai",
  "elevenlabs",
  "tts",
  "testing"
]
All 5 allowed tools
ReadWriteEditBash(npm:*)Bash(pnpm:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/elevenlabs-local-dev-loop