genviral
Complete genviral Partner API automation. Create and schedule posts (video + slideshow) across TikTok, Instagram, and any supported platform. Includes slideshow generation, file uploads, template/pack management, analytics, and full content pipeline automation.
git clone https://github.com/fdarkaou/genviral-skill
git clone --depth=1 https://github.com/fdarkaou/genviral-skill ~/.claude/skills/fdarkaou-genviral-skill-genviral
SKILL.mdgenviral Partner API Skill
TL;DR: Wraps genviral's Partner API into 60+ bash commands. Core flow:
→ analyze images (metadata + vision) →get-packwithgenerate→pinned_images→ visual review (hard gate) →render→ log tocreate-post. TikTok copy flow:workspace/performance/log.json→copy-tiktok-preview(with exactly one ofcopy-tiktok-importorpack_id). Studio AI:pack_images→studio-models(sync) orstudio-generate-image→studio-generate-video(async). Folders:studio-video-status --poll→create-folderto organize files/slideshows. Analytics correlation: treatfolder-items-add/analyticsId,id, andplatformPostIdas different identifiers; usegenviralPostIdorgenviralPostIdto map analytics rows back to created posts. Auth viaexternalId. Config inGENVIRAL_API_KEY. Instance data indefaults.yaml.workspace/
What This Skill Does
- Multi-Platform Posting: Video or slideshow posts across TikTok, Instagram, YouTube, Pinterest, LinkedIn, Facebook
- Studio AI Generation: Generate images (sync) and videos (async) via AI models through the API
- File Management: Upload videos/images to genviral's CDN; organize with folders
- Folder Management: Nested folders for uploads, AI images, AI videos, and slideshows
- AI Slideshow Generation: Photo carousels from prompts, rendered to images
- Template System: Reusable slideshow structures, convert winners to templates
- Pack Management: Image packs as slideshow backgrounds
- Analytics: KPIs, post-level metrics, tracked accounts, refresh triggers
- Niche Intelligence: One-call trend research (
) for hashtags, sounds, creators, posting windows, and hook anglestrend-brief - Content Pipeline: Full automation from prompt to posted content
- Performance Tracking: Post log, hook tracking, weekly review
- Hook Library: Maintain and evolve a library of proven content hooks
How It Works
- Generate or upload media
- Create a post targeting one or more accounts
- Schedule or publish (for TikTok slideshows, optionally save as drafts so you can add trending audio before publishing — music selection requires human judgment for best results)
- Track performance via analytics
- Learn and optimize
Important analytics identity rule:
is the analytics-row ID (analyticsId
is a legacy alias of the same value)id
is the platform-native post/video IDplatformPostId
is the originating Genviral post ID when correlation succeedsgenviralPostId
is the originating Partner APIexternalId
when presentexternal_id- For BYO TikTok
, the draft/inboxMEDIA_UPLOAD
is not the final public TikTok video ID. Correlation is best-effort for recent unresolved drafts after the user actually publishes in TikTok, so older rows can still showpublish_id
/genviralPostId
asexternalId
.null
All configuration in
defaults.yaml. Secrets via environment variables. Everything posted shows up in the Genviral dashboard.
First-Time Setup
If fresh install, read
docs/setup.md and walk the user through onboarding conversationally:
- Set API key and verify it works
- List accounts and pick which to post to
- Discuss image strategy (existing packs, create new, generate per post, or mix)
- Optionally set up product context and brand voice together
No hardcoded defaults. Ask the user what they prefer and adapt. Everything done through this skill shows up in the Genviral dashboard, so the user always has full visibility and control.
File Structure
genviral/ SKILL.md # This file (kernel + routing) README.md # Human-facing overview defaults.yaml # API config and defaults docs/ setup.md # Onboarding guide (conversational, 5 phases) api/ accounts-files.md # accounts, upload, list-files folders.md # folder CRUD, move, ancestors, items management posts.md # create-post, update-post, retry, list, get, delete slideshows.md # generate/render/update + TikTok copy preview/import + text styles packs.md # pack CRUD + smart image selection (MANDATORY reading for any pack workflow) templates.md # template CRUD + create-from-slideshow analytics.md # all analytics commands studio.md # Studio AI: generate images/videos, list models, poll status subscription.md # subscription status, credits, tier pipeline.md # content pipeline, performance loop, CTA testing, platform tips errors.md # error codes and troubleshooting references/ analytics-loop.md # Full analytics feedback loop and weekly review process competitor-research.md # How to research competitors prompts/ slideshow.md # Prompt templates for slideshow generation hooks.md # Prompt templates for hook brainstorming workspace/ # All instance/customer data (override with GENVIRAL_WORKSPACE_DIR) content/ scratchpad.md # Working content plan and drafts calendar.json # Upcoming planned posts context/ product.md # Product description, value props, target audience brand-voice.md # Tone, style, do's and don'ts niche-research.md # Platform research for the niche hooks/ library.json # Hook instances (grows over time, tracks performance) formulas.md # Hook formula patterns and psychology performance/ log.json # CANONICAL post record (single source of truth) hook-tracker.json # Hook and CTA tracking with metrics (the feedback loop) insights.md # Agent learnings from performance data weekly-review.md # Weekly review notes competitor-insights.md # Competitor research findings scripts/ genviral.sh # Main API wrapper (all commands) update-skill.sh # Self-updater
Command Routing
Load only what you need for the current task:
| Task | Read |
|---|---|
| Account discovery, file upload | |
| Folder management (create, list, move, delete, items) | |
| Create, update, list, delete posts | |
| Slideshow generation, TikTok copy import, rendering, editing, text styles | |
| Pack management, image selection (ANY pack workflow) | |
| Template creation and management | |
| Analytics queries and target management | |
| Studio AI: generate images, videos, list models | |
| Subscription: check credits, tier, renewal dates | |
| Research a specific niche quickly (trend + competitors + hooks) | , , |
| Full content pipeline, performance loop, CTA testing | |
| Error codes, troubleshooting | |
Niche Research Mode (When user asks to research a niche)
When asked things like "research this niche", "find what works in this niche", or "give me niche intelligence":
- Run
first for the niche keyword (trend-brief
baseline, then7d
for freshness if needed).24h - Extract and report: top hashtags, top sounds, top creators, posting windows (UTC), recommended hook angles.
- Run competitor deep-dive using
(3-5 accounts minimum).docs/references/competitor-research.md - Produce a short actionable output with:
- 3 hook angles to test
- 2 CTA suggestions
- 2 best posting windows
- 5 hashtags to start with
- 1 "gap to exploit" insight
- Save findings to
and use them in subsequent content prompts.workspace/performance/competitor-insights.md
TikTok Copy Remix Mode (When user asks "make similar but new")
When the user wants to copy a TikTok slideshow idea but generate new visuals:
- Run
first and capturecopy-tiktok-preview
, source image URLs, and slide count.preview_id - Run
with exactly one pack source (copy-tiktok-import
orpack_id
) so text overlays are extracted and mapped into editable slides.pack_images - Generate replacement images through Studio using
with each source slide image as reference input:google/nano-banana-2- command:
studio-generate-image --model-id "google/nano-banana-2" --image-urls "<source_url>" --prompt "<product-aware transformation prompt>"
- command:
- Build prompts with product context from
so generated visuals stay relevant to the advertised product.workspace/context/product.md - Replace slide backgrounds with generated URLs (
) while preserving/editing imported text elements.update --slides-file ... - Render (
) and review (render
) before posting; never skip visual QA.review
Analytics Correlation Mode (When user asks "match analytics back to posts")
- Pull
.analytics-posts --json - Prefer
for matching analytics rows back to Genviral posts.genviralPostId - If you need the caller's own stable ID, use
.externalId - Treat
/legacyanalyticsId
as the analytics-row identifier only.id - Treat
as the platform-native TikTok/Instagram/YouTube post identifier only.platformPostId - For BYO TikTok drafts (
), do not assume a draft upload is correlated immediately. The draftMEDIA_UPLOAD
becomes matchable only after the human posts from TikTok and Genviral resolves it to the final public TikTok video ID.publish_id
Non-Negotiable Rules
These apply regardless of what docs you've loaded:
-
ALWAYS use
when generating a slideshow with a pack. Never callpinned_images
with justgenerate
— the server will pick random images. Read--pack-id
before any pack workflow.docs/api/packs.md -
ALWAYS visually review every rendered slide before posting. If any slide fails readability, fix it. This is a hard gate — not a suggestion.
-
ALWAYS log to
immediately after posting. This is the canonical record.workspace/performance/log.json -
ALWAYS add a hook-tracker entry after posting. No tracking = no learning.
-
Never use em-dashes in any generated content.
-
Respect
— all instance data lives here. Do not write state files to the skill root.workspace/
Script Usage
/path/to/genviral/scripts/genviral.sh <command> [options]
Requires
GENVIRAL_API_KEY as an environment variable (format: public_id.secret). Loads defaults from defaults.yaml. Set GENVIRAL_WORKSPACE_DIR to override the workspace path (defaults to workspace/ relative to the skill dir).
Auto-Updates
This skill includes a self-updater that keeps skill-owned files in sync with the latest version from
fdarkaou/genviral-skill.
bash scripts/update-skill.sh # check + apply if updates available bash scripts/update-skill.sh --dry-run # preview only, no changes bash scripts/update-skill.sh --force # force re-apply even if already current
What gets updated (skill-owned):
README.md, SKILL.md, scripts/, docs/ (all subdirs)
What never gets touched (user-owned):
workspace/ — your data, context, hooks, and performance logs are always preserved.
Notes
- Works with any platform genviral supports (TikTok, Instagram, etc.)
- Supports both video and slideshow posts
- Works with hosted and BYO accounts
- Posts can be scheduled or queued for immediate publishing
- TikTok slideshow drafts: use
to save to drafts inbox for audio additionpost_mode: MEDIA_UPLOAD - BYO TikTok draft uploads (
) create the Genviral post immediately, but the final public TikTok video ID exists only after the user publishes in TikTok. InMEDIA_UPLOAD
, useanalytics-posts
orgenviralPostId
for correlation; treatexternalId
/legacyanalyticsId
as the analytics-row ID andid
as the TikTok-native ID.platformPostId
Meta Ads Companion (Included)
This repo includes the meta-ads companion guide in the
meta-ads/ directory — an autonomous Meta (Facebook/Instagram) Ads manager and 8-stage AI campaign builder that uses Genviral's Studio API for ad creative generation.
See
for the bundled workflow and setup guide.meta-ads/INSTRUCTIONS.md
Also available standalone: fdarkaou/meta-ads-skill