Openclaw Skills
by @veezvg
Full pipeline to turn a video podcast episode into Instagram content (carousel posts, quote cards, and Reels). Transcribes the episode, extracts key quotes w...
clawhub install veezvg-episode-to-instagramπ About This Skill
name: episode-to-instagram version: 1.0.1 description: Full pipeline to turn a video podcast episode into Instagram content (carousel posts, quote cards, and Reels). Transcribes the episode, extracts key quotes with timestamps, pulls video frames, generates aesthetic carousel slides, and posts to Instagram via browser automation. Use when the user provides a full podcast/video episode or a YouTube/video webpage URL and wants Instagram-ready content generated and posted.
Episode to Instagram
End-to-end pipeline: video episode or YouTube/video webpage URL β local media acquisition β transcript β content extraction β carousel/image generation β Instagram posting via browser automation.
Prerequisites
ffmpeg (installed via Homebrew)openclaw browser for Instagram postingbrand-config.json, e.g. @yourhandle)Pipeline Steps
Step 0: Acquire Source Media
If the user provides a YouTube URL or a webpage that embeds a podcast/video episode:
1. Resolve the actual video URL from the page if needed 2. Download the best practical local source copy before transcription/frame extraction 3. Save the original source URL alongside the working files for traceability 4. Prefer a stable MP4/MOV source when possible; if only YouTube is available, download the combined video/audio asset first
Expected outputs in the episode working directory:
source-url.txtsource-video.mp4 (or equivalent local video file)Step 1: Transcribe
Script: scripts/transcribe.sh
1. Extract audio from the video file using ffmpeg 2. Split into chunks if >25MB (Whisper API limit) 3. Send to OpenAI Whisper API for transcription 4. Output: timestamped transcript as JSON + plain text
Step 2: Extract Content
This step is model-driven (not scripted). The agent should:
1. Read the full transcript 2. Identify the 8-12 best moments for Instagram content: - 3-4 short quotable moments (for carousel text overlays) - 2-3 key insight passages (for carousel takeaway slides) - 3-4 high-energy or visually interesting segments (for Reel clip timestamps) 3. For each moment, record: - Exact timestamp (start + end) - The quote or passage text - Content type: quote_card | takeaway | reel_clip - Suggested carousel slide text (cleaned up for Instagram) 4. Output a structured content plan as JSON
Step 3: Extract Video Frames
Script: scripts/extract-frames.sh
1. For each quote/takeaway moment, extract a frame at the timestamp using ffmpeg 2. Extract multiple frames around each timestamp (Β±2 seconds) and pick the best one 3. Output: PNG frames in a working directory
Step 4: Attach Frames to the Content Plan
Before rendering any carousel slides, the agent must update the content plan so each slide that references a selected moment has a concrete framePath pointing at an extracted frame file. Do not render slides until this mapping is present and verified.
Validation before rendering:
framePath or be intentionally text-onlyframePath values are missing, stop and repair the plan before running the generatorStep 5: Generate Carousel Slides
Script: scripts/generate-carousel.js
For each carousel post (5-7 slides):
1. Slide 1: Hook slide β bold text + video frame background 2. Slides 2-5: Key quotes/takeaways with text overlay on video frames 3. Final slide: CTA ("Follow for more" / episode link)
Carousel image specs:
For visual enhancement, optionally use Replicate models:
Step 6: Preview & Approve
Before posting, the agent must:
1. Send all generated carousel slides to the user via Slack 2. Send the full proposed caption text verbatim so the user can reply with direct edits 3. Send the content plan summary 4. Wait for explicit approval 5. Accept edits/feedback and regenerate as needed
Step 7: Post to Instagram
Script: scripts/post-to-instagram.js
Uses openclaw browser to:
1. Open Instagram in the browser
2. Use the main sidebar/header + / Create entrypoint
3. Explicitly choose Post or Reel based on the asset being uploaded (do not assume every + opens post creation; profile-page New may open Highlight instead)
4. Upload the staged media from OpenClaw's upload temp root
5. For videos/Reels, use the CDP-backed draft helper instead of openclaw browser upload so the flow avoids the flaky browser upload bridge
6. Preserve the original image/video aspect ratio via the bottom-left Select crop control before moving past the crop step; do not leave it on Instagram's default crop if that changes the intended composition
7. Enter the caption text
8. Screenshot the preview for final confirmation
9. Only post after explicit approval
Crop rule:
Practical note:
New Highlight or any non-post flow, back out and retry from the main Create/sidebar + entrypoint, then select Post before uploading media.instagram when helpful (for example: ~/Desktop/instagram/), but before calling openclaw browser upload, copy the final asset(s) into /tmp/openclaw/uploads/... because the browser CLI only accepts uploads from that temp root.instagram folder if you want a visible local working copy, then stage that Desktop copy into /tmp/openclaw/uploads/... for browser upload..mp4 or .mov uploads, prefer the Reel flow unless the user explicitly wants a feed video post.Content Rules
Quote Cards
Takeaway Carousels
Reel Clips
Brand Aesthetic
To be configured per user. Store in brand-config.json:
{
"primaryColor": "#000000",
"secondaryColor": "#FFFFFF",
"accentColor": "#8B5CF6",
"fontStyle": "clean-modern",
"overlayOpacity": 0.6,
"format": "1080x1350",
"accountHandle": "",
"seriesName": "",
"hashtagSets": []
}
Approval Rules (Strict)
File Structure
episode-to-instagram/
βββ SKILL.md
βββ brand-config.json
βββ scripts/
β βββ transcribe.sh # Audio extraction + Whisper API
β βββ extract-frames.sh # ffmpeg frame extraction
β βββ generate-carousel.js # Canvas-based slide generation
β βββ post-to-instagram.js # Browser automation for IG posting
βββ output/ # Working directory for generated content
βββ {episode-id}/
βββ transcript.json
βββ transcript.txt
βββ content-plan.json
βββ frames/
βββ slides/
βββ reels/
Public Repo Notes
brand-config.json; customize it for your own account before generating slides.OPENAI_API_KEY should be provided by your shell, secret manager, or OpenClaw runtime before using scripts/transcribe.sh.βοΈ Configuration
ffmpeg (installed via Homebrew)openclaw browser for Instagram postingbrand-config.json, e.g. @yourhandle)