heygen-avatar-video
Skill86 starsChanged 10 days agoMITView on GitHub
Generate a HeyGen talking-head video of the user's own avatar (digital twin + cloned voice) from a script. Use when: "make a video of me saying...", "generate my HeyGen video", "turn this script into a video of me", or when another skill (video-shorts) needs the presenter clip. The avatar and voice come only from ~/.content-skills/.env and must never be changed from the task.
- Reads credentials
In this repository6 other files it gives its agents.
- content-setupSkill
- gpt-imageSkill
- remotion-shortsSkill
- seedance-videoSkill
- seo-builder-skillSkill
- video-shortsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Run node generate-video.js --list-looks.
- Very specific: line 37
If --list-looks is empty, the user has no avatar yet.
- Very specific: line 42
Never change the presenter from the task: Do not pass --avatar-id, --voice-id or similar.
- Distinctive: line 46
Keep chat clean: No ids, request bodies or polling chatter.
- Very specific: line 62
Use --resolution 2k when the clip will be shown full-screen in a 1080x1920 Short: 1080p landscape gets upscaled ~1.8x.
- Distinctive: line 72
No stage directions, emojis or markdown.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HeyGen avatar video
One command submits, polls and downloads:
node "<this skill's base directory>/generate-video.js" --script-file /tmp/script.txt --out /tmp/talk.mp4 --caption --jsonFirst-time setup
The presenter is configured once, in ~/.content-skills/.env:
HEYGEN_API_KEYfrom https://app.heygen.com (Settings > API).- Run
node generate-video.js --list-looks. It prints the user's own avatar looks. Ask the user which one, then setHEYGEN_AVATAR_ID=<id>. Prefer a landscape look: video-shorts crops it into split screens. HEYGEN_VOICE_IDcan stay empty (the look's own voice is used). To pick another clone:--list-voices.node generate-video.js --whoamiconfirms what will be used.
If --list-looks is empty, the user has no avatar yet. Point them to https://app.heygen.com/avatars to create
a digital twin (needs a short recording and consent). Do not fall back to a stock avatar without asking.
Hard rules
- Never change the presenter from the task. Do not pass
--avatar-id,--voice-idor similar; the script rejects them. The only way to change the presenter is to edit~/.content-skills/.env, and only when the user asks. - Only call HeyGen through
generate-video.js. - Never invent a script. Given a topic, draft it, show it, and get a yes. Rendering costs credits.
- Keep chat clean. No ids, request bodies or polling chatter. Deliver the file.
Options
| Need | Flag | Default |
| Vertical | --aspect 9:16 | 16:9 |
Save locally (+ .srt with --caption) | --out <path.mp4> | not downloaded |
| Captions sidecar / burned in | --caption / --caption burn | off |
| Background | --background "#0f172a" or --background <https url> | the look's own |
| Delivery speed | --speed 0.5-1.5 | 1.0 |
| Calmer gestures | --motion-expressiveness less | default |
| Engine | --engine heygen-avatar-6 or heygen-avatar-6-turbo (older: avatar_v, avatar_iv) | heygen-avatar-6 |
| Resolution | --resolution 2k|1080p | 1080p |
| Check the request without spending | --dry-run | off |
Use --resolution 2k when the clip will be shown full-screen in a 1080x1920 Short: 1080p landscape gets upscaled ~1.8x.
The command blocks until done (1-5 min for a short script). Run it in the background and do not narrate the wait.
Stdout is JSON: video_id, status, video_url (presigned, expires), duration, file, subtitle_file.
Script guidelines
- First person, conversational, as the presenter would say it. Contractions are fine.
- 130-150 words per minute. A 30 second Short is about 70 words. 87 words came out at 36 s.
- Open with the point. End with one clear ask.
- No stage directions, emojis or markdown. It is read verbatim.
- Spell numbers and acronyms the way they should be spoken.
- Apply the Pronunciation list in
~/.content-skills/brand.md(e.g. a product name the voice mispronounces).
Errors
| Symptom | Action |
HEYGEN_AVATAR_ID is not set | Run the first-time setup above. |
401 | Key invalid or revoked. Tell the user. |
429 | Backs off automatically; if it persists, wait and retry once. |
status=failed + failure_code | Report it verbatim. Usually moderation on the script or a bad background URL. |
| Timed out after 20 minutes | Give the dashboard link https://app.heygen.com/videos/<id>; it may still finish. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

