Skip to content
Back to skills

Auto Poster

ASecurity

Post or schedule a video to Instagram, TikTok, YouTube Shorts, LinkedIn, Facebook and Threads through Zernio. Input is a local video file or a public video URL. If no caption is given, it transcribes the video on this computer (faster-whisper) and writes the caption from what was said. Also posts Instagram Stories: one image or short video, or several as a set that goes up in order. Triggers: post this video, post my latest video, post /path/to/video.mp4, schedule this video, queue this video...

  • 2 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added November 28, 2026
content-marketingpythongoshellbashdebuggingapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add jasonc00person/claude-auto-poster --skill auto-poster --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auto Poster?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auto Poster
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jasonc00person-auto-poster/badge)](https://www.skillsdirectory.com/skills/jasonc00person-auto-poster)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: auto-poster
description: "Post or schedule a video to Instagram, TikTok, YouTube Shorts, LinkedIn, Facebook and Threads through Zernio. Input is a local video file or a public video URL. If no caption is given, it transcribes the video on this computer (faster-whisper) and writes the caption from what was said. Also posts Instagram Stories: one image or short video, or several as a set that goes up in order. Triggers: post this video, post my latest video, post /path/to/video.mp4, schedule this video, queue this video, publish reel, post to instagram, post to tiktok, post everywhere, post to my story, instagram story, did my post go out, refresh my accounts."
---

# Auto Poster

Take the video the user gives you and post it through Zernio:

`video -> caption (from the user, or written from a local transcript) -> Zernio -> every connected account`

Every command below runs from the repo root through the wrappers in `scripts/`, which use the private toolbox `scripts/setup.sh` builds (its own Python, ffmpeg, ffprobe and faster-whisper). Never call `python3`, `ffmpeg` or `pip` directly: the user's machine may not have them, and that's the point of the toolbox.

```bash
bash .claude/skills/auto-poster/scripts/autopost <video> [flags]   # post / schedule / status
bash .claude/skills/auto-poster/scripts/transcribe_for_caption.sh <video>
bash .claude/skills/auto-poster/scripts/ffmpeg.sh <ffmpeg args>    # the re-encode recipes below
bash .claude/skills/auto-poster/scripts/setup.sh --check           # is everything ready?
```

If `autopost` says a key or account is missing, run `setup.sh --check` and follow the setup flow in `CLAUDE.md`. Never print or read `.claude/skills/auto-poster/.env`: it holds the user's Zernio key.

## Finding the video

- A path the user gives (dragged into the chat, typed, or pasted): use it as is.
- "My latest video", "the one I just exported", "the video in my Downloads": list the newest video files there (`ls -t ~/Downloads/*.{mp4,mov,MP4,MOV} 2>/dev/null | head -5`, likewise Desktop and Movies) and take the newest; if the top two are close in time or the name doesn't fit what they said, ask which one.
- A public direct video URL (ends in .mp4 or serves the file): pass it straight in. A page link (an Instagram or YouTube page, a Google Drive share page) is not a direct URL: ask for the file.

## Steps

1. Get the video (above). Nothing to post = ask for it.
2. Caption: if the user gave one, use it word for word. If not, transcribe and write one (see "Writing the caption"), saved to a file you create (see "Temp files").
3. Confirm once, in one short message: the caption, the platforms it's going to, and when (now, or the scheduled time). Post on their yes. Skip the confirm only if the user already said "just post it" / "don't ask" in this conversation, or gave the caption themselves and said post now.
4. Run `autopost` (commands below). Default targets = every account in `.env`; narrow with `--platforms instagram,tiktok` when the user names platforms.
5. Report back in plain words: where it went, the links, and anything that failed with what to do about it. Never re-run a post that partly worked (see "Exit codes").

## Commands

Post now (default mode `shareNow`):

```bash
bash .claude/skills/auto-poster/scripts/autopost "/absolute/path/to/video.mp4" --caption-file "$CAPTION_FILE"
```

Only some platforms:

```bash
bash .claude/skills/auto-poster/scripts/autopost "/absolute/path/to/video.mp4" --caption-file "$CAPTION_FILE" --platforms instagram,tiktok
```

Schedule (the time zone comes from `.env`, filled by setup from the computer's clock; `--timezone America/New_York` overrides it for one post):

```bash
bash .claude/skills/auto-poster/scripts/autopost "/absolute/path/to/video.mp4" --caption-file "$CAPTION_FILE" \
  --mode customScheduled --due-at "2026-05-18T12:00:00"
```

Turn "tomorrow at 9am" into the ISO time yourself (check today's date with `date`). The script refuses a time in the past (Zernio would publish it immediately) and anything more than 6 days out (Zernio deletes an unpublished upload after 7 days, so the video would be gone; for later dates, run it again closer to the day). Read the output's `scheduled_local` (e.g. `Fri 2026-09-25 11:30 PDT`) back to the user: that's the time it will really go out.

Draft (lands in Zernio, posts nowhere): `--mode draft`. Zernio's posting-slot queue: `--mode addToQueue` (needs `ZERNIO_PROFILE_ID` in `.env`).

See the exact payload with zero network calls: add `--dry-run`.

YouTube title: `--yt-title "..."` (default: the caption's first line or the filename). YouTube visibility: `--yt-visibility public|private|unlisted` (default public).

Did it go out? `autopost --status <post_id>` checks one post (exit 2 + the reason if a platform failed); `autopost --status` alone lists everything scheduled or in flight plus failures from the last 14 days. Use it whenever the user asks, and after a scheduled time has passed in a session.

## Writing the caption

```bash
TRANSCRIPT_FILE=$(bash .claude/skills/auto-poster/scripts/transcribe_for_caption.sh "/absolute/path/to/video.mp4")
```

It prints the path of the transcript file it wrote. Read that file, write the caption, save it to a file you created, pass it with `--caption-file`. Transcription runs on this computer (the audio is never uploaded for it) and takes a few seconds; on a machine with an NVIDIA GPU, the first run downloads its GPU libraries once (about 1.2 GB).

- Write it from what the video actually says, not a template. Lead with the strongest hook or take in the first line.
- If the speaker says a call to action on camera ("comment GUIDE", "link in bio", "follow for part 2"), put it on line 1 and repeat it at the end. If they don't, don't invent one.
- Never add a link, offer, or hashtag block the video didn't call for. A few relevant hashtags at the end are fine if the user wants them.
- Short, casual, line breaks between thoughts. If the user has told you how they like captions (tone, emojis, hashtags, a sign-off), follow that every time.
- Limits: Threads takes 500 characters. If the caption is longer, write an under-500 version too and pass it as `--threads-caption` in the same call (the script refuses a long caption on Threads without it). Instagram and TikTok cap at 2,200, LinkedIn at 3,000.

## Instagram Story

`--ig-story` puts the file on the Instagram Story instead of posting it as a Reel:

```bash
bash .claude/skills/auto-poster/scripts/autopost "/absolute/path/to/story.png" --ig-story
```

- The media: a 9:16 (1080x1920) JPEG or PNG, or an MP4/MOV of 3 to 60 seconds and up to 100 MB. Cut a long video into clips of 60 s or less first.
- Several Stories that go in an order are ONE call, a set: list the files in order (`autopost first.mp4 second.mp4 third.mp4 --ig-story`). Never one call per Story with times a minute apart: Zernio publishes each Story on its own and Instagram takes anywhere from under a minute to 7+ to process a video, so three Stories scheduled 9:00, 9:01 and 9:02 once went live in reverse. A set posts each Story only after the one before it is live. If one fails, is still processing, or the run is stopped midway, it prints what posted and what did not: post only the rest, never the whole set again.
- A set at a time: add `--mode customScheduled --due-at <time>`. The script uploads everything now and holds the set itself until that time (Zernio can't keep a scheduled set in order), so the computer must be on and the process alive: run it detached with a log (`nohup bash .claude/skills/auto-poster/scripts/autopost ... > /absolute/path/story-set.log 2>&1 &`) and check `--status` after the time.
- Run every Story call in the background: each one waits until the Story is live (up to 15 minutes), longer than a foreground command may run.
- The 30-minute guard: a Story, or a set over its whole run, is refused while another Story is scheduled or still processing within 30 minutes of it, or while a set is held on this computer within 30 minutes. The error names the post to delete or the process to stop.
- Instagram only, whatever else is connected. Stories show no caption, so none is written (skip the transcriber).
- Instagram's API has no link, poll, question, music or mention stickers: a Story that needs one goes up from the phone. Text has to be in the image or video itself.
- A single Story takes the usual modes (now, scheduled, draft, dry run); a set takes now or scheduled. A Story disappears 24 hours after it goes up.
- The duplicate guard keys on the caption and a Story has none, so after an interrupted Story run, check `--status` before running it again.

## Exit codes

- `0`: posted (or scheduled), nothing failed.
- `2`: the post EXISTS but a platform failed (or a schedule landed at a different time than asked). Tell the user which platform and why. Never re-run the same command (it would double-post on the platforms that worked); retry only the failed one with `--platforms <that one>`.
- `1`: nothing was posted (a safety check refused, or Zernio errored before creating it). Fix the cause and run it again.

## Safety checks built into the script

You normally don't need to do anything; know how it behaves so you can explain it:

- **No double posts.** Before uploading, it looks for the same caption posted in the last 24 hours and refuses if it's already live or queued on any target platform (it names the post id). A timed-out post is reconciled against Zernio before any retry, so a slow connection never posts twice. Never re-run by hand after a timeout.
- **YouTube Shorts only by default.** YouTube has no Shorts switch: it decides from the file (vertical or square AND 3 minutes or under). Anything else would go up as a regular long-form video on the channel, so the script drops YouTube with a warning. Pass `--yt-long-form` only when the user explicitly says this IS a regular YouTube video. To put a horizontal clip on Shorts, pad it to 9:16 first (recipe below).
- **Instagram's size limit.** Instagram's API takes Reels up to 300 MB, and a 4K file can hang for 20+ minutes with no error. The script refuses Instagram files over 300 MB or sharper than 1080 on the short side and prints the re-encode command (recipe below). Re-encode, then post the new file.
- **Threads 500-character limit** (Caption rules above).
- **Schedules only inside Zernio's window** (Commands above).
- **A partial failure is reported, not hidden**: each failed platform's reason is printed and the exit code is 2.

## Re-encode recipes

Shrink a 4K or oversized file for Instagram (keeps the framing, short side becomes 1080):

```bash
bash .claude/skills/auto-poster/scripts/ffmpeg.sh -i in.mp4 -vf "scale='if(gt(iw,ih),-2,1080)':'if(gt(iw,ih),1080,-2)'" -c:v libx264 -crf 20 -maxrate 12M -bufsize 24M -c:a aac -b:a 160k -movflags +faststart out-1080p.mp4
```

Horizontal clip onto a 9:16 canvas for Shorts / Reels (black bars, shot untouched):

```bash
bash .claude/skills/auto-poster/scripts/ffmpeg.sh -i in.mp4 -vf "scale=1080:-2,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -c:v libx264 -crf 20 -maxrate 12M -bufsize 24M -c:a aac -b:a 160k -movflags +faststart out-9x16.mp4
```

Write the output next to the original with a clear suffix, never over it. Zernio uploads cap at 5 GB.

## Temp files (security)

Don't write transcripts or captions to fixed shared paths like `/tmp/caption.txt`: anything else on the machine could pre-seed that file and put words in the user's post.

- Let `transcribe_for_caption.sh` choose its own output (it makes a private `mktemp` file and prints the path) and read the path it prints.
- Write captions to a file you just created: `CAPTION_FILE="$(mktemp -t auto-poster-caption.XXXXXXXX)"`, then write into it.

## Known platform gotchas

- **TikTok "direct posting is at capacity"**: Zernio's shared TikTok app hit TikTok's 24-hour posting cap. Not the video, not the account. Retry in a few hours, or send it as a TikTok draft with `--platforms tiktok --tiktok-draft`: it arrives in the TikTok app under Inbox → System notifications ("video is ready to share"); tap it to finish posting. TikTok allows 5 pending drafts a day. If it keeps happening, the user can reconnect TikTok in Zernio, which moves the account onto Zernio's uncapped lane.
- **"accounts do not belong to this user"**: the account ids in `.env` went stale (Zernio issues new ones when an account is reconnected). Run `bash .claude/skills/auto-poster/scripts/setup.sh --accounts`, then post again.
- **A stuck Instagram post leaves a live upload open.** If an Instagram post hangs, don't post the same video again until the stuck one is deleted in Zernio, or it double-posts when the first one finishes.
- **Taking a post down**: Zernio can delete drafts and scheduled posts (`DELETE /posts/{id}`). A published YouTube, Threads, Facebook or LinkedIn post can be pulled with `POST /posts/{id}/unpublish` and `{"platform": "youtube"}` (YouTube deletion is permanent). Instagram and TikTok posts are deleted in their apps.

## How it talks to Zernio (for debugging)

- API base `https://zernio.com/api/v1`, bearer auth with `ZERNIO_API_KEY` from `.env` (values there win over anything exported in the shell).
- A local file is uploaded with `POST /media/presign`, then a `PUT` to the returned URL; the post uses the returned public URL.
- The post is `POST /posts` with `content` (caption), `mediaItems: [{type: "video", url}]`, `platforms: [{platform, accountId}]`, plus `publishNow` / `scheduledFor` + `timezone` / `queuedFromProfile` / `isDraft` by mode.
- Other flags: `--wait-seconds N` (post now only: wait for every platform to finish, for an exact final report; a Story always waits, up to at least 900 s), `--skip-verify`, `--max-retries N`, `--ig-collaborators a,b` (invite up to 3 Instagram usernames as collaborators on the Reel).
- Regression tests (mock Zernio, no real account touched, about 10 s): `bash .claude/skills/auto-poster/tests/run.sh`. Run them after any change to `post_to_zernio.py`.

Files in this skill

  • .env.example998 B
  • SKILL.md13.7 KB
  • scripts/autopost557 B
  • scripts/env.sh863 B
  • scripts/ffmpeg.sh266 B
  • scripts/fw_fast.py7.7 KB
  • scripts/post_to_zernio.py48.1 KB
  • scripts/setup.sh11.9 KB
  • scripts/transcribe_for_caption.sh2.8 KB
  • tests/run.sh383 B
  • tests/test_post_to_zernio.py30.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in content-marketing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.