agentleFS
gitroomhqgitroomhq/postiz-content-skills/skills/heygen-avatar-video/SKILL.md

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

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
  1. Very specific:

    Run node generate-video.js --list-looks.

    line 32
  2. Very specific:

    If --list-looks is empty, the user has no avatar yet.

    line 37
  3. Very specific:

    Never change the presenter from the task: Do not pass --avatar-id, --voice-id or similar.

    line 42
  4. Distinctive:

    Keep chat clean: No ids, request bodies or polling chatter.

    line 46
  5. Very specific:

    Use --resolution 2k when the clip will be shown full-screen in a 1080x1920 Short: 1080p landscape gets upscaled ~1.8x.

    line 62
  6. Distinctive:

    No stage directions, emojis or markdown.

    line 72

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 --json

First-time setup

The presenter is configured once, in ~/.content-skills/.env:

  1. HEYGEN_API_KEY from https://app.heygen.com (Settings > API).
  2. Run node generate-video.js --list-looks. It prints the user's own avatar looks. Ask the user which one, then set HEYGEN_AVATAR_ID=<id>. Prefer a landscape look: video-shorts crops it into split screens.
  3. HEYGEN_VOICE_ID can stay empty (the look's own voice is used). To pick another clone: --list-voices.
  4. node generate-video.js --whoami confirms 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

  1. Never change the presenter from the task. Do not pass --avatar-id, --voice-id or similar; the script rejects them. The only way to change the presenter is to edit ~/.content-skills/.env, and only when the user asks.
  2. Only call HeyGen through generate-video.js.
  3. Never invent a script. Given a topic, draft it, show it, and get a yes. Rendering costs credits.
  4. Keep chat clean. No ids, request bodies or polling chatter. Deliver the file.

Options

NeedFlagDefault
Vertical--aspect 9:1616:9
Save locally (+ .srt with --caption)--out <path.mp4>not downloaded
Captions sidecar / burned in--caption / --caption burnoff
Background--background "#0f172a" or --background <https url>the look's own
Delivery speed--speed 0.5-1.51.0
Calmer gestures--motion-expressiveness lessdefault
Engine--engine heygen-avatar-6 or heygen-avatar-6-turbo (older: avatar_v, avatar_iv)heygen-avatar-6
Resolution--resolution 2k|1080p1080p
Check the request without spending--dry-runoff

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

SymptomAction
HEYGEN_AVATAR_ID is not setRun the first-time setup above.
401Key invalid or revoked. Tell the user.
429Backs off automatically; if it persists, wait and retry once.
status=failed + failure_codeReport it verbatim. Usually moderation on the script or a bad background URL.
Timed out after 20 minutesGive the dashboard link https://app.heygen.com/videos/<id>; it may still finish.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.