SuperAPI AI Directory

viral-post-creator

General & other

View repository

Updated 10-16 08:08

About this skill

Viral Post Generator

AI generates high-engagement social media posts, automatically generates images, with optional auto-publishing to Facebook/Instagram.

Trigger Conditions

This skill is activated when the user says the following:

  • "Generate a viral post"
  • "Help me post to Facebook"
  • "viral post"
  • "Post to social media"
  • "Auto-post"

Required MCP Services

This skill requires the following MCP services:

MCP Purpose Required
jimeng-mcp-server AI-generated images Optional
playwright Auto-publish to social platforms Optional
slack Send notification after successful publishing Optional

If the relevant MCP is not enabled, the skill will only generate content and will not perform publishing. The notification feature uses local file logging by default.

Workflow

┌─────────────────────┐
│   输入主题/目标      │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   AI 生成帖子文案    │
│   (多版本供选择)     │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   jimeng MCP        │
│   生成配图           │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   用户确认内容       │
│   选择发布平台       │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   Playwright MCP    │
│   自动登录并发布     │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   保存记录          │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│   发送通知          │
│ (邮件/Slack/本地)   │
└─────────────────────┘

Execution Steps

Step 1: Get Creation Requirements

Ask the user:

  • Topic: What is the post about?
  • Target Platform: Facebook / Instagram / Twitter / Xiaohongshu
  • Goal: Brand exposure / Traffic generation / Engagement / Sales
  • Style: Humorous / Professional / Inspirational / Emotional
  • Whether images are needed: Yes / No

Step 2: AI Generates Post Copy

Generate prompt:

你是一位社交媒体爆款内容专家,擅长创作高互动帖子。

【创作需求】
- 主题: {topic}
- 平台: {platform}
- 目标: {goal}
- 风格: {style}

【{platform} 帖子特点】
- Facebook: 可长文,故事型表现好,互动问题结尾
- Instagram: 视觉优先,标签重要,简洁有力
- Twitter/X: 简短犀利,话题性强,易于转发
- 小红书: 生活化,种草感,emoji丰富

【爆款公式】
1. 钩子开头(3秒抓住注意力)
2. 价值输出(干货/情感/故事)
3. 互动收尾(提问/投票/挑战)

【输出要求】
生成3个版本供选择:
- 版本A: 偏理性/干货
- 版本B: 偏感性/故事
- 版本C: 偏互动/话题

每个版本包含:
1. 帖子正文
2. 推荐标签 (3-5个)
3. 配图建议 (描述画面)
4. 最佳发布时间

【输出格式】
## 版本 A: [风格标签]
**正文**:
...

**标签**: #tag1 #tag2 #tag3

**配图建议**: 描述适合的图片画面

**发布时间**: 周X 上午/下午 X点

Step 3: Generate Images (using jimeng MCP)

If the user chooses to generate images, use Jimeng MCP:

How to call:

使用 jimeng-mcp-server 的图片生成功能:
- 根据帖子内容生成配图提示词
- 调用文生图接口
- 获取生成的图片 URL

Image prompt conversion:

将"配图建议"转换为即梦AI提示词:
- 原描述: "一个人在咖啡馆专注工作的场景"
- 转换后: "现代简约咖啡馆,年轻人专注使用笔记本电脑,
  柔和自然光,浅景深,温暖色调,写实摄影风格"

Step 4: User Confirmation

Display the generated content for user confirmation:

## 📝 帖子预览

**平台**: Facebook
**文案**:
[帖子内容]

**标签**: #话题1 #话题2

**配图**: [显示生成的图片]

---

请确认:
1. ✅ 确认发布
2. ✏️ 修改文案
3. 🖼️ 重新生成配图
4. ❌ 取消

Step 5: Auto-publish (using Playwright MCP)

After user confirmation, use Playwright to auto-publish:

Facebook publishing process:

// Playwright MCP 操作步骤

1. 打开 Facebook
   browser_navigate({ url: "https://facebook.com" })

2. 检查登录状态(如已登录则跳过)
   - 如未登录,提示用户手动登录
   - 等待登录完成

3. 导航到发帖区域
   browser_click({ element: "创建帖子" 或 "What's on your mind?" })

4. 输入帖子内容
   browser_type({ text: "{post_content}" })

5. 上传配图(如有)
   browser_click({ element: "添加照片" })
   browser_upload_file({ file: "{image_path}" })

6. 发布
   browser_click({ element: "发布" 或 "Post" })

7. 确认发布成功
   browser_snapshot() // 截图确认

Instagram publishing process:

1. 打开 Instagram
   browser_navigate({ url: "https://instagram.com" })

2. 点击创建
   browser_click({ element: "+" 创建按钮 })

3. 选择图片
   browser_upload_file({ file: "{image_path}" })

4. 添加滤镜(可选)
   browser_click({ element: "下一步" })

5. 输入文案
   browser_type({ text: "{post_content}\n\n{hashtags}" })

6. 分享
   browser_click({ element: "分享" })

Step 6: Save Record

Save the record after successful publishing:

{
  "post_id": "fb_20251229_001",
  "platform": "Facebook",
  "content": "帖子内容...",
  "hashtags": ["#tag1", "#tag2"],
  "image_url": "https://...",
  "published_at": "2025-12-29T10:30:00Z",
  "status": "success"
}

Step 7: Send Notification (Optional)

After publishing is complete, you can optionally send a notification:

Method A - Email Notification:

If the user has configured an email service, send a notification email:

主题: ✅ 帖子发布成功 - {platform}

发布详情:
- 平台: {platform}
- 时间: {published_at}
- 帖子链接: {post_url}

内容预览:
{content_preview}...

---
由 viral-post-creator 技能自动发送

Method B - Slack Notification:

If the user has configured Slack MCP, send to the specified channel:

📢 帖子发布成功!

平台: {platform}
时间: {published_at}
链接: {post_url}

内容: {content_preview}...

Method C - Local Notification File:

By default, save the notification record to a local file:

~/.claude/cache/viral-posts/notifications.log

Notification Configuration:

Users can set notification preferences on first use:

  • Enable notifications: Yes/No
  • Notification method: Email/Slack/Local file
  • Email address (if Email is selected)
  • Slack channel (if Slack is selected)

Usage Examples

Example 1: Generate and publish manually

用户: 帮我生成一个关于年终总结的Facebook帖子

Claude:
1. 生成3个版本的帖子
2. 用户选择版本B
3. 使用即梦生成配图
4. 输出完整内容供用户复制发布

Example 2: Fully automatic publishing

用户: 帮我自动发布一条Instagram帖子,主题是新年祝福

Claude:
1. 生成帖子内容
2. 生成配图
3. 用户确认
4. 使用Playwright自动发布
5. 截图确认发布成功

Example 3: Batch generation

用户: 帮我生成下周5天的Facebook帖子

Claude:
1. 规划5天的主题
2. 批量生成帖子
3. 保存到文件
4. 可选择定时发布

Viral Post Template Library

Template 1: Counterintuitive Opinion

90%的人都搞错了:

[常见误区]

真相是:

[反直觉真相]

这就是为什么 [结论]

同意吗?评论区说说你的看法 👇

Template 2: Numbered List

我花了 [时间] 研究 [主题]

这是我学到的 [N] 件事:

1️⃣ [要点1]
2️⃣ [要点2]
3️⃣ [要点3]
4️⃣ [要点4]
5️⃣ [要点5]

保存这条,你会用到的 🔖

Template 3: Before/After

3个月前 vs 现在

Before: [旧状态]
After: [新状态]

改变我的关键:

[关键行动1]
[关键行动2]
[关键行动3]

你的改变是什么?分享一下 ✨

Template 4: Controversial Topic

我知道这很有争议,但是...

[争议观点]

原因:

1. [论点1]
2. [论点2]
3. [论点3]

转发给你的朋友,看看他们怎么想 🔄

Posting Time Suggestions

Platform Best time Second-best time
Facebook Wednesday 11:00 Monday-Friday 9:00-15:00
Instagram Tuesday 11:00 Monday-Friday 11:00-13:00
Twitter Wednesday 9:00 Workdays 8:00-10:00
Xiaohongshu Sunday 21:00 Daily 12:00, 21:00

Data storage

  • Post records:~/.claude/cache/viral-posts/
  • Generated images:~/.claude/cache/viral-posts/images/
  • Publish logs:~/.claude/cache/viral-posts/publish-log.json

Dependencies

  • Claude AI: Generate post copy
  • jimeng-mcp-server: Generate images (optional)
  • playwright MCP: Auto-publish (optional)
  • Slack MCP: Send notifications (optional)
  • Write: Save records

Notes

Auto-publish safety

  • Manual login to social platforms is required on first use
  • Playwright will save the login state
  • It is recommended to manually confirm content before publishing
  • Avoid frequent publishing that triggers platform restrictions

Platform rules

  • Comply with each platform's community guidelines
  • Avoid sensitive/controversial content
  • Images must meet copyright requirements
  • Use a moderate number of tags

Best practices

  • Generate multiple versions and choose the best
  • Images should match the content
  • Pay attention to engagement data after publishing
  • Optimize content strategy based on feedback