writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
talking-avatar-skillBuild or transform lightweight realtime voice-chat apps with a talking character avatar from either a user-supplied photograph or a text description. Use when Codex is asked to create a talking avatar, photo avatar, character chatbot, roleplaying voice companion, mouth-sprite animation, or reusable OpenAI Realtime avatar app in Vite/Next.js, including BYOK …
Independent GitHub snapshot · Automated classification · Original documentation governs
Create one focused voice conversation with a fixed character portrait whose mouth poses follow the actual remote audio. Accept either a photograph or a character description, generate a canonical portrait plus small mouth sprites, and build the app around OpenAI Realtime.
imagegen for every canonical portrait or mouth-frame generation/edit. Read its full instructions before generating.openai-docs and, when applicable, openai-platform-api-key to verify the current Realtime WebRTC endpoint, session schema, model, voices, and credential flow. Never rely on this skill's model examples as current truth..openai/hosting.json exists, follow sites-building and sites-hosting through deployment.view_image, treat it as an identity reference, and preserve face shape, skin tone, hair, glasses, facial hair, and distinguishing features.Read references/image-pipeline.md before creating or editing the avatar assets.
soft: lips slightly parted;round: a natural rounded vowel;open: a natural medium-open vowel.public/avatar/avatar-base.jpgpublic/avatar/mouth-soft.pngpublic/avatar/mouth-round.pngpublic/avatar/mouth-open.pngscripts/validate_avatar_assets.py --dir <project>/public/avatar and fix all failures.Never animate the complete portrait. Only replace the mouth patch.
Prefer an existing working stack. For a new project, use Next.js or vinext because the user's API key must cross a server route; use plain Vite only when a safe backend already exists.
For a compatible new Next/vinext project, scaffold the proven core:
python3 <skill-dir>/scripts/scaffold_app.py \
--target <project-dir> \
--character-name "Mira" \
--app-name "Mira Live" \
--persona "a concise, curious field researcher" \
--model "<verified-realtime-model>" \
--transcription-model "<verified-transcription-model>" \
--voice "<verified-realtime-voice>"
The target must already contain the framework configuration and dependencies. Install framer-motion and @phosphor-icons/react when missing. Use --force only for a newly initialized project after inspecting the files it will replace. For an existing product, copy or adapt individual files from assets/starter/ instead of overwriting its architecture.
Read references/app-contract.md before changing the Realtime route, API-key flow, or event handling.
Read references/realtime-lipsync.md and preserve its behavioral contract:
MediaStream, not microphone input and not Realtime event cadence.closed → soft → round → open) instead of jumping.data-mouth attribute and let CSS reveal exactly one patch.Do not use a canned infinite mouth animation. response.output_audio.delta identifies speaking state but does not provide lip timing.
Cache-Control: no-store.AnalyserNode, requestAnimationFrame, a 90–110 ms pose interval, adjacent-pose stepping, and no CSS @keyframes mouth-* loop.Return the runnable app, the final avatar asset paths, the generation prompt set, whether photo or description mode was used, the Realtime model/voice verified for that run, validation results, and the deployed URL when applicable.