Viraloop
Analyze any website and generate a 6-slide carousel for TikTok/Instagram with visual coherence. Posts directly to your feed (no drafts) with auto trending music. Both APIs (Gemini + upload-post.com) have free plans — no credit card needed to start.
Philosophy: Daily Automated Loop
The key to growth is consistency + learning. This skill is designed to run every day, fully autonomous. The agent executes the entire pipeline without asking for confirmation — from research to publishing — and only notifies you at the end with the published TikTok and Instagram URLs.
- 1. Post 1 carousel per day - Consistency beats virality
- Track everything - Every post generates data
- Learn from data - What hooks work? What times? What visuals?
- Iterate and improve - Each carousel is better than the last
CODEBLOCK0
The skill maintains a learnings.json that accumulates insights across all posts:
- - Best performing hooks
- Optimal posting times
- Visual styles that work
- CTAs that convert
This is not a one-shot tool. It's a growth engine.
Before You Start: Account Warmup
If your TikTok or Instagram accounts are brand new, don't post carousels on day one. Both platforms throttle reach on fresh accounts that jump straight into publishing content.
TikTok (7-14 days warmup)
- - Spend 30-60 minutes per day using TikTok normally: scroll, like (about 1 in 10 videos), follow accounts in your niche
- Wait until your For You page is dominated by content in your niche — that means the algorithm has profiled your account
- Only then start posting. Your first posts will reach the right audience instead of getting buried
Instagram (5-7 days warmup)
- - Browse Reels and the Explore page daily, engage with content in your niche
- Follow relevant accounts, like and comment genuinely
- Post 2-3 stories before your first carousel to signal the account is active
Why this matters
Platforms flag accounts that go from zero activity to automated posting. A warmed-up account gets 5-10x more initial reach than a cold one. This step is boring but it's the difference between 500 views and 50,000 views on your first carousel.
If your accounts are already active and established, skip this and go straight to Quick Start.
Quick Start
The agent should run the full pipeline automatically. Do not ask for confirmation between steps.
CODEBLOCK1
The agent only notifies the user at the very end, with the published TikTok and Instagram post URLs. Everything else runs autonomously.
How Learnings Improve Each Carousel
The learnings.json file grows smarter with every post. Before generating slides, the agent reads it and applies:
- - Best hooks: Use hook styles that got the most views. Try variations of winners.
- Best times: Schedule publishing at the time that historically gets most reach.
- Best days: Prefer days that perform better.
- Low performers: Avoid hook styles that consistently underperform.
- Engagement tips: If engagement is low, use more provocative hooks or different visual styles.
This means carousel #30 will have dramatically better prompts than carousel #1.
Agent Execution Schedule: The agent shouldn't just run at a random time. It should read learnings.json, look at the bestTimes array, and automatically adjust its own cron/automation schedule so that tomorrow's execution happens right at the optimal publishing time.
First runs (no data yet): The first few times there won't be analytics data — that's fine. The agent uses the default hooks from analyze-web.js and the generic recommendations. After 5-10 posts, learnings.json will have enough data to start making meaningful recommendations. The more you post, the smarter it gets.
Image Model
Uses gemini-3.1-flash-image-preview to generate slides.
- - Local script: INLINECODE6
- Supports image-to-image for visual coherence between slides
Step 1: Full Research (analyze-web.js)
Performs COMPLETE business investigation:
1. Brand Analysis
- - Brand name (from domain or title)
- Logo (URL or SVG)
- CSS colors (background, primary, links, headings)
- Typography (body font, heading font)
- Favicon
2. Content Analysis
- - Headline and tagline
- All headings (page structure)
- Features/benefits (title + description)
- Pricing/plans
- Testimonials
- Stats/metrics
- CTAs
- Meta tags (title, description, og:image)
3. Internal Pages
- - Navigates pricing, features, about, testimonials
- Extracts additional content from each page
4. Competitor Detection
- - Searches for known competitor mentions in content
- List of 20+ known SaaS competitors (Buffer, Hootsuite, Later, etc.)
- Detects "vs", "alternative", "compare" sections
- No external searches required - all from the website itself
5. Storytelling
- - Detects business type (SaaS, ecommerce, app)
- Detects niche (social-media-tools, developer-tools, etc.)
- Generates hooks based on customer pain points
- Defines pain points from features
- Creates transformation narrative (before → after)
6. Visual Context
- - Brand colors in CSS format
- Color description for prompts
- Typography for slides
- Image themes based on niche
- Style guide for coherence
Output: INLINECODE8
Step 2: Generate Slides (generate-slides.sh)
Generates 6 slides with visual coherence using image-to-image:
| Slide | Type | Content |
|---|
| 1 | HOOK | Question/problem that hooks. Establishes ALL visual style. |
| 2 |
Problem | Agitate the pain. "You upload to TikTok... then Instagram..." |
| 3 |
Agitation | Competition advancing. Urgency. |
| 4 |
Solution | Present the product with its value proposition. |
| 5 |
Feature | Main benefit. |
| 6 |
CTA | "Link in bio 👆" + call to action. |
Visual Coherence
- - Slide 1 generates the base style (colors, typography, mood)
- Slides 2-6 use image-to-image with slide 1 as reference
- Maintains same color palette, fonts, and aesthetic
Prompts per Slide
Each slide has:
- - Text: The main message
- Scene: Detailed visual description for background
- Style: Based on brand analysis
Output:
- - INLINECODE10
- INLINECODE11
Step 3: Review with Vision (Autonomous)
After generating, the agent MUST review each slide using its vision/image-to-text model. This step is fully automatic — do not ask the user to review.
For each slide, verify:
- - ✓ Text is fully legible and correct
- ✓ No words cut off at edges
- ✓ Product name spelled correctly
- ✓ Visual coherence between all slides
- ✓ No text in bottom 20% (TikTok controls area)
- ✓ Acceptable image quality (not blurry or distorted)
If any slide fails: Regenerate ONLY that specific slide automatically. Use the same input image that was used when originally generating it:
- - Slide 1: no input image (it establishes the style)
- Slides 2-6: always use
slide-1.jpg as --input-image (the original reference)
Re-verify after regenerating. Repeat until all 6 slides pass. Do not ask the user — fix it automatically.
Image Format
- - Resolution: 768x1376 (9:16 vertical ratio)
- Format: JPG (TikTok does NOT accept PNG)
- Text: Large, bold, with shadow for readability
- Background: Scene relevant to the business, not just solid colors
Step 4: Publish to TikTok + Instagram (publish-carousel.sh)
Publishes the carousel directly to the TikTok and Instagram feed using Upload-Post API.
CODEBLOCK2
Endpoint: POST /api/upload_photos
- - Docs: https://docs.upload-post.com/api/upload-photo
Parameters sent:
- -
platform[]=tiktok + INLINECODE17 - INLINECODE18 - Adds music on TikTok automatically
- INLINECODE19 - Short title (max 90 chars) + hashtags
- INLINECODE20 - Full caption for Instagram
- INLINECODE21
- INLINECODE22 - Photo carousel on Instagram
- INLINECODE23 - Process in background
- INLINECODE24 - The 6 slides JPG
⚠️ IMPORTANT Instagram:
After publishing, user must go to Instagram and add viral music manually:
- 1. Open Instagram → Profile → The post
- Edit → Add music
- Search for trending/viral song
Output: Saves request_id in post-info.json for tracking.
Step 5: Analyze Performance (check-analytics.sh)
Gets TikTok and Instagram analytics to see what works.
CODEBLOCK3
Endpoints used:
- 1. Profile analytics:
GET /api/analytics/{user}?platforms=tiktok
→ Followers, likes, comments, shares, impressions
- 2. Total impressions:
GET /api/uploadposts/total-impressions/{user}?platform=tiktok&breakdown=true
→ Total views per day
- 3. Per-post analytics:
GET /api/uploadposts/post-analytics/{request_id}
→ Views, likes, comments for the specific carousel (TikTok + Instagram)
Docs: https://docs.upload-post.com/api/get-analytics
Step 6: Learn and Improve (learn-from-analytics.js)
Analyzes data and saves learnings for future carousels. This must run at the START of every daily loop, not just at the end.
CODEBLOCK7
Generates/updates:
- -
learnings.json - Accumulated knowledge base - Best hooks (those generating most views)
- Optimal posting times and days
- Engagement rate tracking
- Recommendations for the next carousel
The agent must read learnings.json before generating each new carousel and use the insights to pick better hooks, avoid underperforming styles, and schedule at optimal times.
Daily Loop (Complete Flow)
This is the exact sequence the agent runs every day, fully autonomous:
CODEBLOCK8
Files
CODEBLOCK9
Environment Variables
| Variable | Description |
|---|
| INLINECODE31 | Google API key for image generation |
| INLINECODE32 |
Upload-Post token for publishing and analytics |
|
UPLOADPOST_USER | Upload-Post username (required) |
Hook Examples by Niche
| Niche | Hook Example |
|---|
| Social Media Tools | "Still posting to social media ONE BY ONE? 😩" |
| SaaS General |
"Still doing this MANUALLY?" |
| Ecommerce | "The product TikTok won't stop recommending" |
| App | "The app I wish I'd discovered sooner" |
| Developer Tools | "The API that's going to change your code" |
Why Viraloop?
| Viraloop | Other skills |
|---|
| Publishing | Direct to feed | Drafts only |
| Music |
Auto trending music | Manual |
| Platforms | TikTok + Instagram | Single platform |
| Research | Auto URL analysis | Manual description |
| Image coherence | Image-to-image reference | Independent slides |
| Image gen | Gemini (free tier) | Paid providers |
| Posting | upload-post.com (free, no CC) | Paid or self-hosted |
| Text overlay | AI-native (Gemini renders) | External scripts |
| Prompts | Structured templates | Free-form |
| Setup | 3 env vars | Complex multi-tool setup |
Notes
- - Analysis extracts competitors from the website content itself (20+ known SaaS)
- Image-to-image maintains coherence but takes ~20s per slide
- Generated caption includes niche-relevant hashtags
- Always review slide text - sometimes it gets cut off
- INLINECODE34 on TikTok improves engagement
- Check analytics after 24-48h for meaningful data
- Learnings accumulate and improve with each published carousel
- TikTok title max 90 characters (auto-truncated with hashtags)
Viraloop
分析任意网站,生成视觉连贯的6页轮播图,适用于TikTok/Instagram。直接发布到您的信息流(无草稿),并自动添加热门音乐。两个API(Gemini + upload-post.com)都有免费套餐——无需信用卡即可开始。
理念:每日自动化循环
增长的关键在于持续 + 学习。此技能旨在每天全自动运行。代理会执行整个流程,无需请求确认——从研究到发布——最后仅通过已发布的TikTok和Instagram链接通知您。
- 1. 每天发布1个轮播图 - 持续胜过爆红
- 追踪一切 - 每次发布都会生成数据
- 从数据中学习 - 什么钩子有效?什么时间?什么视觉?
- 迭代改进 - 每个轮播图都比上一个更好
第1天:发布 → 分析 → 学习
第2天:发布(改进)→ 分析 → 学习
第3天:发布(更好)→ 分析 → 学习
...
第30天:您拥有30个数据点和一套优化策略
该技能维护一个learnings.json文件,积累所有发布内容的洞察:
- - 表现最佳的钩子
- 最佳发布时间
- 有效的视觉风格
- 转化率高的行动号召
这不是一次性工具。这是一个增长引擎。
开始前:账号预热
如果您的TikTok或Instagram账号是全新的,不要在第一天就发布轮播图。两个平台都会限制刚注册就直接发布内容的新账号的曝光量。
TikTok(7-14天预热)
- - 每天花30-60分钟正常使用TikTok:浏览、点赞(大约每10个视频点1个赞)、关注您所在领域的账号
- 等到您的为你推荐页面被您领域的内容主导——这意味着算法已对您的账号进行画像
- 然后再开始发布。您的第一批内容会触达正确的受众,而不是被淹没
Instagram(5-7天预热)
- - 每天浏览Reels和探索页面,与您领域的内容互动
- 关注相关账号,真诚地点赞和评论
- 在第一个轮播图之前发布2-3条快拍,表明账号是活跃的
为什么这很重要
平台会标记那些从零活动突然转为自动发布的账号。预热过的账号比冷账号的初始曝光量高出5-10倍。这一步很枯燥,但这是您的第一个轮播图获得500次观看还是50,000次观看的区别。
如果您的账号已经活跃且成熟,请跳过此步骤,直接进入快速开始。
快速开始
代理应自动运行完整流程。不要在步骤之间请求确认。
bash
0. 首先:检查之前发布内容的数据分析并学习
(仅在首次运行且尚无发布内容时跳过此步)
UPLOADPOST_TOKEN=your-token bash {baseDir}/scripts/check-analytics.sh 7
node {baseDir}/scripts/learn-from-analytics.js
1. 全面业务研究
node {baseDir}/scripts/analyze-web.js https://your-website.com
2. 读取learnings.json,为此轮播图使用最佳钩子/时间/风格
→ 从bestHooks中选择一种钩子风格(或尝试变体)
→ 使用推荐的发布时间
→ 应用推荐中的任何洞察
3. 生成视觉连贯的幻灯片
GEMINI
APIKEY=your-key bash {baseDir}/scripts/generate-slides.sh
4. 使用视觉模型审查幻灯片 → 自动修复有问题的
代理使用其图像转文本模型验证每张幻灯片
如果任何幻灯片有问题(文字被截断、质量差、拼写错误):
→ 仅自动重新生成那张有问题的幻灯片
→ 重新验证,直到所有6张幻灯片通过
5. 发布到TikTok + Instagram
UPLOADPOST_TOKEN=your-token bash {baseDir}/scripts/publish-carousel.sh
代理仅在最后通知用户,提供已发布的TikTok和Instagram帖子链接。其他所有步骤都自主运行。
学习如何改进每个轮播图
learnings.json文件会随着每次发布而变得更智能。在生成幻灯片之前,代理会读取它并应用:
- - 最佳钩子: 使用获得最多观看量的钩子风格。尝试获胜者的变体。
- 最佳时间: 安排在历史上获得最多曝光量的时间发布。
- 最佳日期: 优先选择表现更好的日期。
- 低效内容: 避免持续表现不佳的钩子风格。
- 互动技巧: 如果互动率低,使用更具挑衅性的钩子或不同的视觉风格。
这意味着第30个轮播图的提示词将比第1个轮播图好得多。
代理执行计划: 代理不应在随机时间运行。它应读取learnings.json,查看bestTimes数组,并自动调整自己的cron/自动化计划,以便明天的执行正好在最佳发布时间进行。
首次运行(尚无数据): 前几次不会有分析数据——这没问题。代理使用analyze-web.js中的默认钩子和通用推荐。在5-10次发布后,learnings.json将有足够的数据开始做出有意义的推荐。您发布得越多,它就越智能。
图像模型
使用gemini-3.1-flash-image-preview生成幻灯片。
- - 本地脚本:{baseDir}/scripts/generate_image.py
- 支持图像到图像,确保幻灯片之间的视觉连贯性
步骤1:全面研究(analyze-web.js)
执行完整的业务调查:
1. 品牌分析
- - 品牌名称(来自域名或标题)
- Logo(URL或SVG)
- CSS颜色(背景、主色、链接、标题)
- 字体(正文字体、标题字体)
- 网站图标
2. 内容分析
- - 标题和标语
- 所有标题(页面结构)
- 功能/优势(标题 + 描述)
- 定价/方案
- 用户评价
- 统计数据/指标
- 行动号召
- 元标签(标题、描述、og:image)
3. 内部页面
- - 导航到定价、功能、关于、用户评价页面
- 从每个页面提取额外内容
4. 竞争对手检测
- - 在内容中搜索已知的竞争对手提及
- 20多个已知SaaS竞争对手列表(Buffer、Hootsuite、Later等)
- 检测vs、alternative、compare部分
- 无需外部搜索——全部来自网站本身
5. 故事叙述
- - 检测业务类型(SaaS、电商、应用)
- 检测领域(社交媒体工具、开发者工具等)
- 基于客户痛点生成钩子
- 从功能定义痛点
- 创建转变叙事(之前 → 之后)
6. 视觉上下文
- - CSS格式的品牌颜色
- 用于提示词的颜色描述
- 幻灯片字体
- 基于领域的图像主题
- 确保连贯性的风格指南
输出: /tmp/carousel/analysis.json
步骤2:生成幻灯片(generate-slides.sh)
使用图像到图像技术生成6张视觉连贯的幻灯片:
| 幻灯片 | 类型 | 内容 |
|---|
| 1 | 钩子 | 吸引人的问题/痛点。建立所有视觉风格。 |
| 2 |
问题 | 加剧痛点。你上传到TikTok...然后Instagram... |
| 3 |
加剧 | 竞争对手在进步。紧迫感。 |
| 4 |
解决方案 | 展示产品及其价值主张。 |
| 5 |
功能 | 主要优势。 |
| 6 |
行动号召 | 个人简介中的链接 👆 + 行动号召。 |
视觉连贯性
- - 幻灯片1生成基础风格(颜色、字体、氛围)
- 幻灯片2-6使用幻灯片1作为参考进行图像到图像生成
- 保持相同的调色板、字体和美学风格
每张幻灯片的提示词
每张幻灯片都有:
- - 文本: 主要信息
- 场景: 背景的详细视觉描述
- 风格: 基于品牌分析
输出:
- - /tmp/carousel/slide-{1-6}.jpg
- /tmp/carousel/caption.txt
步骤3:使用视觉模型审查(自主)
生成后,代理必须使用其视觉/图像转文本模型审查每张幻灯片。此步骤完全自动——不要要求用户审查。
对于每张幻灯片,验证:
- - ✓ 文本完全清晰可读且正确
- ✓ 边缘没有文字被截断
- ✓ 产品名称拼写正确
- ✓ 所有幻灯片之间的视觉连贯性
- ✓ 底部20%区域无文字(TikTok控制区域)
- ✓ 可接受的图像质量(不模糊或变形)
如果任何幻灯片未通过: 仅自动重新生成那张特定的幻灯片