Scaffold ElevenLabs Example
Use this skill when a user wants a new example scaffold in this repo.
Defaults
- Ignore the deprecated root
examples/ folder.
- Put new examples under
<product>/<runtime>/<slug>.
- The parent example directory owns authoring files; generated code lives in
example/.
Inputs to confirm
- destination path
- product and runtime
- whether the example needs bundled
assets/
- whether the user wants scaffold only or scaffold plus a generated
example/
Ask concise follow-ups only when these are missing.
Workflow
- Read reference.md.
- Inspect available repo skills in
.agents/skills/ and choose the best fit for the requested example.
- Prefer the helper scaffold:
python3 .cursor/skills/scaffold-elevenlabs-example/scripts/scaffold_example.py \
--path text-to-speech/expo/my-example
Add --with-assets when the example should ship sample files, or --reference <path> to copy from a specific existing example.
- Edit the scaffolded
README.md, PROMPT.md, and setup.sh until they match the requested example.
- Treat the helper output as a copy of the closest reference. Adapt all three files for the new example.
- Keep
PROMPT.md terse:
- first line invokes the most relevant repo skill found in
.agents/skills/; for current examples this is often /text-to-speech, /speech-to-text, or /agents, but do not assume that list is exhaustive
- sections are file-by-file using
## \path/to/file``
- bullets call out concrete SDKs, env handling, models, voice IDs, UI states, and error handling
- do not restate repo preamble like
example/-only rules or DESIGN.md; the generator adds that
- for
expo, assume the shared template already provides the generic Expo Router shell, server-ready web config, and baseline verification scripts; keep the prompt focused on ElevenLabs-specific UI and +api.ts work
- Keep
setup.sh aligned with current patterns:
- use
set -euo pipefail
- derive
DIR and REPO_ROOT
- clean
example/ but preserve cache dirs (node_modules, .venv, .next, .expo) when relevant
- seed from
templates/<runtime>/
- copy
README.md into example/README.md
- copy
assets/ and local .env only when present
- install dependencies at the end
- for
nextjs, fetch latest ElevenLabs package versions at setup time and patch package.json
- for
expo, keep the shared template generic and server-capable so PROMPT.md only needs to describe the ElevenLabs integration
- Keep
README.md aligned with the closest current reference:
- always include a heading, one-sentence summary,
## Setup, and ## Run
- add
## Usage for interactive examples such as Next.js, Expo, and agents demos
- commands should work from inside
example/
- Recommended when shipping the example: add it to the root
README.md.
- Verify:
bash <path>/setup.sh
- inspect the generated
example/
- run
pnpm run generate <path> only when the user wants full prompt validation or generated output
Constraints
- Stay inside the current template matrix unless the user explicitly asks for a new base template.
- Reuse the closest existing example instead of inventing a new file format.
- Do not add application code directly under the parent example directory.
- Do not use the deprecated root
examples/ folder for new work.
Output checklist
1---2name: scaffold-elevenlabs-example3description: Scaffold prompt-driven examples in this repository using the existing example patterns and repo skills in `.agents/skills`. Use when adding a new example directory, creating matching `README.md`, `PROMPT.md`, and `setup.sh` files, or preparing a new example for `pnpm run generate`.4---56# Scaffold ElevenLabs Example78Use this skill when a user wants a new example scaffold in this repo.910## Defaults1112- Ignore the deprecated root `examples/` folder.13- Put new examples under `<product>/<runtime>/<slug>`.14- The parent example directory owns authoring files; generated code lives in `example/`.1516## Inputs to confirm1718- destination path19- product and runtime20- whether the example needs bundled `assets/`21- whether the user wants scaffold only or scaffold plus a generated `example/`2223Ask concise follow-ups only when these are missing.2425## Workflow26271. Read [reference.md](reference.md).282. Inspect available repo skills in `.agents/skills/` and choose the best fit for the requested example.293. Prefer the helper scaffold:3031```bash32python3 .cursor/skills/scaffold-elevenlabs-example/scripts/scaffold_example.py \33 --path text-to-speech/expo/my-example34```3536Add `--with-assets` when the example should ship sample files, or `--reference <path>` to copy from a specific existing example.37384. Edit the scaffolded `README.md`, `PROMPT.md`, and `setup.sh` until they match the requested example.395. Treat the helper output as a copy of the closest reference. Adapt all three files for the new example.406. Keep `PROMPT.md` terse:4142- first line invokes the most relevant repo skill found in `.agents/skills/`; for current examples this is often `/text-to-speech`, `/speech-to-text`, or `/agents`, but do not assume that list is exhaustive43- sections are file-by-file using `## \`path/to/file\``44- bullets call out concrete SDKs, env handling, models, voice IDs, UI states, and error handling45- do not restate repo preamble like `example/`-only rules or `DESIGN.md`; the generator adds that46- for `expo`, assume the shared template already provides the generic Expo Router shell, server-ready web config, and baseline verification scripts; keep the prompt focused on ElevenLabs-specific UI and `+api.ts` work47487. Keep `setup.sh` aligned with current patterns:4950- use `set -euo pipefail`51- derive `DIR` and `REPO_ROOT`52- clean `example/` but preserve cache dirs (`node_modules`, `.venv`, `.next`, `.expo`) when relevant53- seed from `templates/<runtime>/`54- copy `README.md` into `example/README.md`55- copy `assets/` and local `.env` only when present56- install dependencies at the end57- for `nextjs`, fetch latest ElevenLabs package versions at setup time and patch `package.json`58- for `expo`, keep the shared template generic and server-capable so `PROMPT.md` only needs to describe the ElevenLabs integration59608. Keep `README.md` aligned with the closest current reference:6162- always include a heading, one-sentence summary, `## Setup`, and `## Run`63- add `## Usage` for interactive examples such as Next.js, Expo, and agents demos64- commands should work from inside `example/`65669. Recommended when shipping the example: add it to the root `README.md`.6710. Verify:6869- `bash <path>/setup.sh`70- inspect the generated `example/`71- run `pnpm run generate <path>` only when the user wants full prompt validation or generated output7273## Constraints7475- Stay inside the current template matrix unless the user explicitly asks for a new base template.76- Reuse the closest existing example instead of inventing a new file format.77- Do not add application code directly under the parent example directory.78- Do not use the deprecated root `examples/` folder for new work.7980## Output checklist8182- [ ] new example directory exists at the requested path83- [ ] `README.md`, `PROMPT.md`, and `setup.sh` exist84- [ ] `setup.sh` uses the correct shared template85- [ ] `PROMPT.md` matches the terse style of the current examples86- [ ] the scaffold is ready for `pnpm run generate <path>`