Social Search & Content Creator
Find → Create → Post pipeline for X/Twitter and Instagram content.
Prerequisites
- - X/Twitter:
bird CLI installed and authenticated via browser cookies - Instagram Search: Brave Search API key (set
BRAVE_API_KEY or configure in OpenClaw) - Image Generation: OpenAI API key (set
OPENAI_API_KEY) — uses gpt-image-1 - Instagram Posting:
pip3 install instagrapi pillow + IGUSERNAME/IGPASSWORD env vars
1. FIND — Research Trending Topics
X/Twitter (bird CLI)
CODEBLOCK0
Instagram (Brave-powered scraper)
CODEBLOCK1
Types: posts (inurl:/p/), profiles (user pages), reels (inurl:/reel/), all (default)
Viral/Trending Search (recommended starting point)
CODEBLOCK2
Examples:
CODEBLOCK3
How engagement scoring works:
- - Score = likes × 1 + retweets × 3 + replies × 2
- Retweets weighted highest (distribution signal)
- Replies weighted over likes (conversation signal)
- Results sorted by score descending
2. CREATE — Generate Editorial Graphics
The System: Photographic Background + Dark Gradient + Bold Typography
This is what makes the images look professional, not just text on a background.
The approach:
- - Top 60%: Cinematic photographic scene (real subjects, dramatic lighting)
- Bottom 40%: Heavy dark gradient overlay (95% black → transparent)
- Text: Bold condensed typography (Anton-style) sitting on the gradient
- Result: Looks like Bloomberg/Kalshi editorial cards
Generate Images
CODEBLOCK4
Sizes: 1024x1024 (square), 1024x1536 (portrait/Instagram), 1536x1024 (landscape/Twitter)
⚠️ CRITICAL IMAGE RULES (learned the hard way)
- 1. NEVER just put text on a solid dark background — it looks flat and amateur
- ALWAYS use a photographic/cinematic background — real scenes, real subjects
- ALWAYS use dark gradient overlay on the lower 40% for text readability
- Keep subject visible in the top 60% — face, setting, context
- Text lives in the bottom 40% only — never cover the subject
- Use bold condensed typography (Anton-style) — not regular weight fonts
- Include branded elements — badge, branding URL, slide counter
- Cinematic lighting — moody, dramatic, not flat studio lighting
Master Prompt Template
Copy this template exactly. Only change the parts in [BRACKETS].
CODEBLOCK5
Badge Color System
- - 🔵 Cyan (#00D4FF): "EXPLAINED", "GUIDE", educational content
- 🟠 Orange (#FF6B00): "HOW IT WORKS", "DEEP DIVE", breakdowns
- 🟢 Green (#22c55e): "THE SHIFT", "SOLUTION", "REAL CASE", positive takes
- 🔴 Red (#e63946): "WARNING", "UNFAIR", "MYTH", negative/urgent
- ⚫ Black (#000000): "TRENDING", "BREAKING", news
Background Scene Ideas by Topic
Crypto/Trading: Trader at multiple monitors, trading floor, candlestick charts on screens
Tech/AI: Neural network visualizations, server rooms, holographic displays
Finance: City skyline at night, office with Bloomberg terminals, stock exchange
Startup: Founder at whiteboard, team in modern office, product on screen
Education: Person studying, lecture hall, books with highlighted text
Carousel Structure (3 slides)
- - Slide 1 — The Hook: Sets the scene, asks the question (e.g., "What is X?")
- Slide 2 — The Breakdown: How it works, the layers, the details
- Slide 3 — The Shift: Why it matters, the bigger picture, call to action
Example: Crypto Educational Carousel
Slide 1 prompt background: "A young male trader in a dark room lit by multiple monitors showing crypto charts. Blue and green screen glow on his face. Hoodie, leaning forward, focused."
Slide 2 prompt background: "Close-up of an AI neural network visualization on a large curved monitor in a dark trading room. Neon blue data streams flowing across the screen."
Slide 3 prompt background: "Aerial view of a massive trading floor with hundreds of screens running autonomously, seats empty. No humans present. Dramatic overhead shot, neon blue glow."
3. POST — Publish Content
X/Twitter (bird CLI)
CODEBLOCK6
Instagram (instagrapi)
CODEBLOCK7
Instagram auth: Set IG_USERNAME and IG_PASSWORD env vars. Google sign-in won't work — need a password set on the account.
Full Workflow Example
CODEBLOCK8
社交搜索与内容创作者
X/Twitter和Instagram内容的发现→创作→发布流程。
前置条件
- - X/Twitter:已安装bird命令行工具并通过浏览器cookies完成身份验证
- Instagram搜索:Brave搜索API密钥(设置BRAVEAPIKEY或在OpenClaw中配置)
- 图片生成:OpenAI API密钥(设置OPENAIAPIKEY)—— 使用gpt-image-1
- Instagram发布:pip3 install instagrapi pillow + 设置IGUSERNAME/IGPASSWORD环境变量
1. 发现 — 研究热门话题
X/Twitter(bird命令行工具)
bash
bird search 搜索词 -n 10 # 搜索推文
bird read <链接或ID> # 阅读特定推文
bird thread <链接或ID> # 完整讨论串
bird mentions # 查看提及
bird user-tweets <用户名> # 用户的推文
Instagram(Brave驱动爬虫)
bash
node {baseDir}/scripts/instagram-search.js 搜索词 [--limit 10] [--type posts|profiles|reels|all]
类型:posts(inurl:/p/)、profiles(用户页面)、reels(inurl:/reel/)、all(默认)
病毒式/热门搜索(推荐起点)
bash
查找关于某个话题的病毒式内容(按互动排序)
node {baseDir}/scripts/viral-search.js 搜索词 [选项]
选项:
--platform x|instagram|both (默认:both)
--min-likes N 最低点赞数(默认:50)
--min-retweets N 最低转发数(默认:10)
--sort engagement|recent (默认:engagement)
--limit N 每平台结果数(默认:10)
--trending 查看X上当前正在爆火的内容
--days N 仅最近N天(默认:7)
示例:
bash
本周关于AI交易的病毒式内容
node {baseDir}/scripts/viral-search.js AI交易 --min-likes 100 --days 7
当前加密货币领域的趋势(无需搜索词)
node {baseDir}/scripts/viral-search.js --trending
仅Instagram病毒式搜索
node {baseDir}/scripts/viral-search.js DeFi --platform instagram --limit 10
降低小众话题的门槛
node {baseDir}/scripts/viral-search.js delta neutral farming --min-likes 10 --min-retweets 3
互动评分机制:
- - 评分 = 点赞数 × 1 + 转发数 × 3 + 回复数 × 2
- 转发权重最高(传播信号)
- 回复权重大于点赞(对话信号)
- 结果按评分降序排列
2. 创作 — 生成编辑风格图片
系统:摄影背景 + 深色渐变 + 粗体排版
这就是让图片看起来专业的关键,而不仅仅是背景上的文字。
方法:
- - 顶部60%:电影级摄影场景(真实主体、戏剧性光线)
- 底部40%:厚重深色渐变叠加(95%黑色 → 透明)
- 文字:位于渐变上的粗体紧凑排版(Anton风格)
- 效果:看起来像Bloomberg/Kalshi编辑卡片
生成图片
bash
OPENAI
APIKEY=你的密钥 python3 {baseDir}/scripts/gen_image.py 提示词 output.png [1024x1536]
尺寸:1024x1024(方形)、1024x1536(竖版/Instagram)、1536x1024(横版/Twitter)
⚠️ 关键图片规则(经验教训)
- 1. 绝不要只在纯色深色背景上放文字——看起来扁平业余
- 始终使用摄影/电影级背景——真实场景、真实主体
- 始终在底部40%区域使用深色渐变叠加,确保文字可读性
- 保持主体可见在顶部60%区域——面部、环境、背景
- 文字仅位于底部40%区域——绝不覆盖主体
- 使用粗体紧凑排版(Anton风格)——不要使用常规字重字体
- 包含品牌元素——徽章、品牌网址、幻灯片编号
- 电影级光线——氛围感、戏剧性,不要扁平影棚光
主提示词模板
完全复制此模板。仅更改[括号]中的部分。
Instagram轮播帖子设计。精确1080像素宽×1350像素高(4:5竖版比例)。
背景:[描述场景——展示谁/什么、环境、光线、氛围]。主体在图片顶部60%区域清晰可见。电影级光线,戏剧性。
叠加:仅在图片底部40%区域使用厚重深色渐变——最底部纯黑色(95%不透明度),在60%高度处渐变为透明。顶部区域保持清晰。
文字定位(底部区域):
- - 距顶部65%:带有[颜色]背景和[文字颜色]粗体文字的小矩形徽章:[徽章文字]
- 距顶部70-90%:使用Anton字体的巨大白色粗体文字,大写,居中:
[主标题
跨2-3行
分行显示]
- - [可选:标题下方较小的白色文字,任何补充细节]
- 右下角(距顶部95%):白色[X/Y],小号
- 左下角(距顶部95%):白色[brand.url],Montserrat Bold字体,小号,小写
字体:标题使用Anton。品牌使用Montserrat Bold。
风格:干净的Instagram轮播幻灯片,竖版格式,底部文字类似Kalshi/Bloomberg编辑风格。电影级,高对比度,专业。
徽章颜色系统
- - 🔵 青色(#00D4FF):解释、指南、教育内容
- 🟠 橙色(#FF6B00):工作原理、深度解析、拆解分析
- 🟢 绿色(#22c55e):转变、解决方案、真实案例、正面观点
- 🔴 红色(#e63946):警告、不公平、迷思、负面/紧急
- ⚫ 黑色(#000000):热门、突发、新闻
按主题分类的背景场景创意
加密货币/交易:多屏交易员、交易大厅、屏幕上的K线图
科技/AI:神经网络可视化、服务器机房、全息显示屏
金融:夜间城市天际线、带Bloomberg终端的办公室、证券交易所
创业:白板前的创始人、现代办公室团队、屏幕上的产品
教育:学习的人、阶梯教室、带高亮文字的书籍
轮播结构(3张幻灯片)
- - 第1张 — 钩子:设定场景,提出问题(例如:什么是X?)
- 第2张 — 拆解:工作原理、层次、细节
- 第3张 — 转变:为什么重要、更大格局、行动号召
示例:加密货币教育轮播
第1张提示词背景:一位年轻男性交易员在黑暗房间里,被多个显示加密货币图表的显示器照亮。蓝绿色屏幕光映在脸上。穿着卫衣,身体前倾,专注。
第2张提示词背景:黑暗交易室中大型曲面显示器上AI神经网络可视化的特写。霓虹蓝色数据流在屏幕上流动。
第3张提示词背景:拥有数百个自主运行屏幕的巨大交易大厅的鸟瞰图,座位空无一人。没有人类存在。戏剧性俯拍,霓虹蓝光。
3. 发布 — 发布内容
X/Twitter(bird命令行工具)
bash
bird tweet 你的推文文字 # 仅文字
bird tweet 文字 --media image.jpg # 带图片
bird tweet 文字 --media img1.jpg --media img2.jpg # 多张图片
bird reply <推文ID或链接> 回复文字 # 回复
Instagram(instagrapi)
bash
照片发布
node {baseDir}/scripts/instagram-post.js --action photo --caption 说明 image.jpg
Reels
node {baseDir}/scripts/instagram-post.js --action reel --caption 说明 video.mp4
快拍
node {baseDir}/scripts/instagram-post.js --action story --caption 说明 image.jpg
轮播
node {baseDir}/scripts/instagram-post.js --action carousel --caption 说明 img1.jpg img2.jpg img3.jpg
Instagram认证:设置IGUSERNAME和IGPASSWORD环境变量。Google登录不可用——需要在账户上设置密码。
完整工作流程示例
bash