storyclaw-autoposter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStoryClaw Auto-Post Skill
StoryClaw 自动发帖技能
Supports full social media post management and analytics across 13 platforms.
Supported Platforms: TikTok, Instagram, Facebook, X/Twitter, YouTube, LinkedIn, Threads, Pinterest, Reddit, Bluesky, Telegram, Snapchat, Google Business Profile
API Endpoint:
POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api支持在13个平台上完成完整的社交媒体帖子管理与分析。
支持的平台: TikTok, Instagram, Facebook, X/Twitter, YouTube, LinkedIn, Threads, Pinterest, Reddit, Bluesky, Telegram, Snapchat, Google Business Profile
API端点:
POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-apiPhase 1: API Key Check & Account Binding Confirmation
第一阶段:API密钥检查与账号绑定确认
Step 1: Check API Key
步骤1:检查API密钥
First, check if is available in the environment variable.
STORYCLAW_API_KEY- Available → Use it directly, proceed to Step 2
- Not available → Ask the user:
"To get started, I need your StoryClaw API Key. Please go to https://storyclaw.com/profile → StoryClaw API Key, copy it and paste it here."
Once the key is obtained (from env or user input), call to verify:
get_social_statusjson
{ "storyclaw_api_key": "<STORYCLAW_API_KEY>", "action": "get_social_status" }- 401 Invalid API key → Tell the user:
"Your API Key appears to be invalid. Please go to https://storyclaw.com/profile → StoryClaw API Key to check and recopy it."
- Success → Record connected platforms, proceed to Step 2
首先,检查环境变量中是否存在。
STORYCLAW_API_KEY- 已存在 → 直接使用,进入步骤2
- 不存在 → 询问用户:
"开始使用前,我需要您的StoryClaw API密钥。请前往https://storyclaw.com/profile → StoryClaw API Key,复制后粘贴到此处。"
获取密钥后(从环境变量或用户输入),调用进行验证:
get_social_statusjson
{ "storyclaw_api_key": "<STORYCLAW_API_KEY>", "action": "get_social_status" }- 返回401无效API密钥 → 告知用户:
"您的API密钥无效,请前往https://storyclaw.com/profile → StoryClaw API Key检查并重新复制。"
- 验证成功 → 记录已连接的平台,进入步骤2
Step 2: Confirm Social Account Binding
步骤2:确认社交账号绑定
Show the user their connected platforms returned by .
get_social_statusIf no platforms are connected, or the user asks how to link social accounts, guide them:
"Please go to https://storyclaw.com/profile → Social Account Binding, and follow the instructions to link your TikTok, Instagram, or other accounts. Come back once done."
If at least one platform is connected → proceed to Phase 2.
Only connected platforms appear as options throughout all operations.
向用户展示返回的已连接平台。
get_social_status如果没有连接任何平台,或用户询问如何关联社交账号,引导用户:
"请前往https://storyclaw.com/profile → Social Account Binding,按照提示关联您的TikTok、Instagram或其他账号。完成后返回即可。"
如果至少连接了一个平台 → 进入第二阶段。
所有操作过程中仅显示已连接的平台作为可选选项。
Phase 2: Select Feature
第二阶段:选择功能
Ask what the user needs:
| Feature | Description |
|---|---|
| 📝 Publish Post | Publish immediately or schedule |
| 🔍 Query Post List | View post history for a platform |
| 📄 View Post Details | View full details of a specific post |
| 📊 Post Analytics | Likes, views, comments, shares, reach |
| 👥 Account Analytics | Followers, following, impressions |
| 🗑️ Delete Post | Delete a specific post |
询问用户需求:
| 功能 | 描述 |
|---|---|
| 📝 发布帖子 | 立即发布或排期发布 |
| 🔍 查询帖子列表 | 查看某平台的帖子历史 |
| 📄 查看帖子详情 | 查看特定帖子的完整信息 |
| 📊 帖子数据分析 | 点赞、浏览量、评论、分享、触达量 |
| 👥 账号数据分析 | 粉丝数、关注数、曝光量 |
| 🗑️ 删除帖子 | 删除特定帖子 |
Feature 1: Publish Post
功能1:发布帖子
Collect Content
收集内容
Ask what the user wants to post. If they provide a draft or idea, enter the content optimization flow.
询问用户要发布的内容。如果用户提供草稿或想法,进入内容优化流程。
Content Optimization (if needed)
内容优化(可选)
Ask preferences:
- Platform style: Adapt per platform (TikTok: energetic short sentences, LinkedIn: professional, X: concise, etc.)
- Tone: Professional / Casual & Humorous / Inspirational / Educational
- Hashtags: Yes / No / Auto-recommend
- Language: Chinese / English / Other
Show optimized content for user confirmation before proceeding.
询问偏好:
- 平台风格:适配不同平台(TikTok:活力短句,LinkedIn:专业正式,X:简洁凝练等)
- 语气:专业正式 / 轻松幽默 / 励志鼓舞 / 科普教育
- 话题标签:是 / 否 / 自动推荐
- 语言:中文 / 英文 / 其他
在继续操作前,向用户展示优化后的内容并确认。
Select Platforms
选择平台
Show only connected platforms from (multi-select):
get_social_statusYour connected platforms:
- TikTok ✅
- Instagram ✅
- Facebook ✅
...
Which platforms would you like to post to?Restriction: If no video content → remove TikTok from options:
"TikTok requires video content. Since no video is included, TikTok has been removed from the options."
仅展示返回的已连接平台(可多选):
get_social_status您已连接的平台:
- TikTok ✅
- Instagram ✅
- Facebook ✅
...
您想在哪些平台发布帖子?限制: 如果没有视频内容 → 从选项中移除TikTok:
"TikTok需要视频内容。由于未包含视频,已将TikTok从选项中移除。"
Media Attachments (Optional)
媒体附件(可选)
Ask if the user has images or videos to attach. only accepts HTTPS URLs — no local files.
publish_postIf user has a local file → must upload first:
bash
curl -X POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api \
-F "action=upload_file" \
-F "storyclaw_api_key=<key>" \
-F "file=@/path/to/photo.jpg" \
-F "folder=my-media"Upload returns an S3 HTTPS URL → use as .
mediaUrlsFlow: Local file → → S3 URL → →
upload_filemediaUrlspublish_post询问用户是否需要附加图片或视频。仅支持HTTPS链接 — 不支持本地文件。
publish_post如果用户有本地文件 → 必须先上传:
bash
curl -X POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api \
-F "action=upload_file" \
-F "storyclaw_api_key=<key>" \
-F "file=@/path/to/photo.jpg" \
-F "folder=my-media"上传后会返回一个S3 HTTPS链接 → 作为使用。
mediaUrls流程: 本地文件 → → S3链接 → →
upload_filemediaUrlspublish_post⚠️ Pre-Post Media Validation (MANDATORY)
⚠️ 发帖前媒体验证(必填)
Before calling the API, check every target platform against the limits below:
| Check | Detail |
|---|---|
| File format | Must be in platform's supported list |
| File size | Must not exceed platform max |
| Video duration | Must be within min/max range |
| Resolution / aspect ratio | Must meet requirements |
| Media count | Must not exceed platform max per post |
| Video URL | Must end in known extension (.mp4/.mov) |
| Reddit + video | Reddit does NOT support video — block if selected |
| TikTok + PNG | TikTok does NOT support PNG — block if detected |
| HTTPS | All URLs must start with https:// |
If any violation found → BLOCK and notify:
"⚠️ Cannot post: [Platform] requires [requirement], but your [media] [issue]. Please fix and retry."
Examples:
- "⚠️ Cannot post: TikTok does not support PNG images. Please convert to JPG or WebP."
- "⚠️ Cannot post: X/Twitter video duration is 145s, exceeding the 140s limit."
- "⚠️ Cannot post: Reddit does not support video. Please remove the video or deselect Reddit."
- "⚠️ Cannot post: Telegram image size is 8MB, exceeding the 5MB limit."
Files over 50MB → suggest using for async processing.
scheduleDate调用API前,需针对每个目标平台检查以下限制:
| 检查项 | 详情 |
|---|---|
| 文件格式 | 必须符合平台支持的格式列表 |
| 文件大小 | 不得超过平台上限 |
| 视频时长 | 必须在最小-最大范围内 |
| 分辨率/宽高比 | 必须满足要求 |
| 媒体数量 | 不得超过单帖平台上限 |
| 视频链接 | 必须以已知扩展名结尾(.mp4/.mov) |
| Reddit + 视频 | Reddit不支持视频 — 若选中则阻止 |
| TikTok + PNG | TikTok不支持PNG — 若检测到则阻止 |
| HTTPS | 所有链接必须以https://开头 |
如果发现任何违规 → 阻止操作并通知用户:
"⚠️ 无法发布:[平台]要求[具体要求],但您的[媒体]存在[问题]。请修复后重试。"
示例:
- "⚠️ 无法发布:TikTok不支持PNG图片,请转换为JPG或WebP格式。"
- "⚠️ 无法发布:X/Twitter视频时长为145秒,超过了140秒的限制。"
- "⚠️ 无法发布:Reddit不支持视频,请移除视频或取消选择Reddit。"
- "⚠️ 无法发布:Telegram图片大小为8MB,超过了5MB的限制。"
超过50MB的文件 → 建议使用进行异步处理。
scheduleDatePlatform Media Limits Reference
平台媒体限制参考
TikTok
- Images: JPG/JPEG/WebP only (NO PNG), max 35 images; recommended 1080×1920
- Video: MP4/MOV/WebM, max 1GB, 3s–600s, resolution 360–4096px, 23–60 FPS, max 1 video
Instagram
- Images: JPG/GIF/PNG, max 8MB, width 320–1440px, ratio 4:5~1.91:1, max 10 images, 50 posts/day
- Video (Feed/Reels): MP4/MOV, max 300MB, 3s–15min, 23–60 FPS, max 1 video
- Stories video: max 100MB, 3–60s
Facebook Pages
- Images: JPEG/BMP/PNG/GIF/TIFF, max 10MB, max 2048×2048px, max 10 images
- Video: max 2GB, max 1 video
LinkedIn
- Images: JPG/GIF/PNG, max 5MB, recommended 1200×627px, max 9 images, 150 posts/day
- Documents: PPT/PPTX/DOC/DOCX/PDF, max 100MB, max 300 pages
- Video: MP4, max 500MB, 3s–30min, ratio 1:2.4~2.4:1, max 1 video
X / Twitter
- Images: JPG/PNG/GIF/WebP, max 5MB, max 4 images
- Video: MP4/MOV, max 1280×1024px, 0.5s–140s (longVideo for 10+ min), ≤60FPS, ratio 1:3~3:1, audio mono/stereo, max 4 videos; avoid Dropbox/S3 signed URLs
Bluesky
- Images: JPG/GIF/PNG, max 1MB, max 4 images; animated GIF → treated as 1 video
- Video: MP4, max 1GB, 1s–3min, ratio 1:3~3:1, max 1 video
Pinterest
- Images: BMP/JPEG/PNG/TIFF/GIF/WebP, max 20MB, recommended 1000×1500 (2:3), max 1 image (carousel up to 5, same size)
- Video: MP4/MOV/M4V, max 1GB, 4s–15min, max 1 video
Reddit
- Images: JPG/PNG/GIF/WebP, max 10MB, max 1 image
- Video: ❌ NOT SUPPORTED
Snapchat
- Story/Spotlight images: JPEG/PNG, max 20MB, recommended 1080×1920
- Story/Spotlight video: MP4, max 500MB, 5–60s, recommended 540×960, 9:16, max 1 video
Telegram
- Images: JPG/PNG/GIF/WebP, max 5MB, width+height ≤10,000, ratio ≤20:1, max 1 image; text ≤1,024 chars
- Video: max 20MB, text ≤1,024 chars, max 1 video
Threads
- Up to 20 images/videos mixed; video URL must end in known extension or use isVideo param
- ⚠️ Threads does not support post deletion via API (must delete manually in app)
YouTube
- Video: MP4/MOV, max 4GB, recommended 16:9, H.264+AAC, frame rates: 24/25/30/48/50/60 FPS, max 1 video
Google Business Profile
- Images: max 1 image
Universal Rules
- All media URLs must start with https://
- Video URLs must end in a known extension (.mp4, .mov); otherwise add
isVideo: true - Files >50MB: use for async processing
scheduleDate - Max 1 video per post per platform (except X which supports 4)
TikTok
- 图片:仅支持JPG/JPEG/WebP(不支持PNG),最多35张;推荐尺寸1080×1920
- 视频:MP4/MOV/WebM,最大1GB,时长3秒–600秒,分辨率360–4096px,帧率23–60 FPS,最多1个视频
Instagram
- 图片:JPG/GIF/PNG,最大8MB,宽度320–1440px,宽高比4:5~1.91:1,最多10张,每日最多50帖
- 视频(动态/Reels):MP4/MOV,最大300MB,时长3秒–15分钟,帧率23–60 FPS,最多1个视频
- 快拍视频:最大100MB,时长3–60秒
Facebook Pages
- 图片:JPEG/BMP/PNG/GIF/TIFF,最大10MB,最大分辨率2048×2048px,最多10张
- 视频:最大2GB,最多1个视频
LinkedIn
- 图片:JPG/GIF/PNG,最大5MB,推荐尺寸1200×627px,最多9张,每日最多150帖
- 文档:PPT/PPTX/DOC/DOCX/PDF,最大100MB,最多300页
- 视频:MP4,最大500MB,时长3秒–30分钟,宽高比1:2.4~2.4:1,最多1个视频
X / Twitter
- 图片:JPG/PNG/GIF/WebP,最大5MB,最多4张
- 视频:MP4/MOV,最大分辨率1280×1024px,时长0.5秒–140秒(longVideo支持10分钟以上),帧率≤60,宽高比1:3~3:1,音频单声道/立体声,最多4个视频;避免使用Dropbox/S3签名链接
Bluesky
- 图片:JPG/GIF/PNG,最大1MB,最多4张;动图会被视为1个视频
- 视频:MP4,最大1GB,时长1秒–3分钟,宽高比1:3~3:1,最多1个视频
Pinterest
- 图片:BMP/JPEG/PNG/TIFF/GIF/WebP,最大20MB,推荐尺寸1000×1500(2:3),最多1张(轮播帖最多5张,尺寸需一致)
- 视频:MP4/MOV/M4V,最大1GB,时长4秒–15分钟,最多1个视频
Reddit
- 图片:JPG/PNG/GIF/WebP,最大10MB,最多1张
- 视频:❌ 不支持
Snapchat
- 快拍/Spotlight图片:JPEG/PNG,最大20MB,推荐尺寸1080×1920
- 快拍/Spotlight视频:MP4,最大500MB,时长5–60秒,推荐尺寸540×960,宽高比9:16,最多1个视频
Telegram
- 图片:JPG/PNG/GIF/WebP,最大5MB,宽高之和≤10000,宽高比≤20:1,最多1张;文字≤1024字符
- 视频:最大20MB,文字≤1024字符,最多1个视频
Threads
- 最多混合20张图片/视频;视频链接必须以已知扩展名结尾或添加参数
isVideo - ⚠️ Threads不支持通过API删除帖子(必须在应用内手动删除)
YouTube
- 视频:MP4/MOV,最大4GB,推荐宽高比16:9,编码H.264+AAC,帧率:24/25/30/48/50/60 FPS,最多1个视频
Google Business Profile
- 图片:最多1张
通用规则
- 所有媒体链接必须以https://开头
- 视频链接必须以已知扩展名结尾(.mp4, .mov);否则添加
isVideo: true - 超过50MB的文件:使用进行异步处理
scheduleDate - 每个平台单帖最多1个视频(X平台支持4个)
Schedule Settings
排期设置
Ask: publish now or schedule? If scheduling, suggest optimal times:
| Platform | Recommended Times |
|---|---|
| TikTok | Weekdays 7–9am, 12–3pm, 7–9pm |
| Tue–Fri 9–11am, 1–3pm | |
| Wed 11am–1pm, Thu 1–3pm | |
| Tue–Thu 8–10am, 12pm | |
| X/Twitter | Mon–Fri 8am, 12pm, 5pm |
| YouTube | Fri–Sun 2–4pm |
Offer 2–3 specific options. User makes final decision. Convert to ISO 8601.
询问用户:立即发布还是排期发布?如果选择排期,推荐最佳发布时间:
| 平台 | 推荐时间 |
|---|---|
| TikTok | 工作日7–9点、12–15点、19–21点 |
| 周二至周五9–11点、13–15点 | |
| 周三11–13点、周四13–15点 | |
| 周二至周四8–10点、12点 | |
| X/Twitter | 周一至周五8点、12点、17点 |
| YouTube | 周五至周日14–16点 |
提供2–3个具体选项,由用户最终决定。转换为ISO 8601格式。
Final Confirmation
最终确认
Must show full summary and wait for explicit confirmation before calling API:
📋 Post Confirmation
─────────────────
Content: [final content]
Platforms: [selected platforms]
Media: [yes/no]
Post time: [now / specific time]
─────────────────
Confirm posting?Call after confirmation:
publish_postjson
{
"storyclaw_api_key": "<key>",
"action": "publish_post",
"post": "<content>",
"platforms": ["tiktok", "instagram"],
"mediaUrls": ["<url>"],
"scheduleDate": "<ISO8601, omit for immediate>"
}必须展示完整摘要并等待用户明确确认后再调用API:
📋 发帖确认
─────────────────
内容:[最终内容]
平台:[选中的平台]
媒体:[是/否]
发布时间:[立即 / 特定时间]
─────────────────
确认发布吗?确认后调用:
publish_postjson
{
"storyclaw_api_key": "<key>",
"action": "publish_post",
"post": "<content>",
"platforms": ["tiktok", "instagram"],
"mediaUrls": ["<url>"],
"scheduleDate": "<ISO8601, 立即发布则省略>"
}Feature 2: Query Post List
功能2:查询帖子列表
Ask which platform (from connected list):
json
{ "storyclaw_api_key": "<key>", "action": "get_posts", "platform": "<platform>" }Display results:
📋 [Platform] Post List:
1. "[content first 40 chars...]" — 2025-01-10
2. "[content first 40 chars...]" — 2025-01-08询问用户要查询的平台(从已连接列表中选择):
json
{ "storyclaw_api_key": "<key>", "action": "get_posts", "platform": "<platform>" }展示结果:
📋 [平台] 帖子列表:
1. "[内容前40个字符...]" — 2025-01-10
2. "[内容前40个字符...]" — 2025-01-08Feature 3: View Post Details
功能3:查看帖子详情
If user doesn't know post_id, show list from first.
get_postsjson
{ "storyclaw_api_key": "<key>", "action": "get_post", "post_id": "<post_id>" }如果用户不知道post_id,先展示返回的列表。
get_postsjson
{ "storyclaw_api_key": "<key>", "action": "get_post", "post_id": "<post_id>" }Feature 4: Post Analytics
功能4:帖子数据分析
Method A — StoryClaw Post ID:
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_post", "post_id": "<id>", "platforms": ["tiktok"] }Method B — Platform native ID:
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_post_by_social_id", "social_post_id": "<id>", "platforms": ["instagram"] }Display grouped by platform with likes, views, comments, shares, impressions, reach.
方法A — StoryClaw帖子ID:
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_post", "post_id": "<id>", "platforms": ["tiktok"] }方法B — 平台原生ID:
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_post_by_social_id", "social_post_id": "<id>", "platforms": ["instagram"] }按平台分组展示点赞、浏览量、评论、分享、曝光量、触达量。
Feature 5: Account Analytics
功能5:账号数据分析
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_social", "platforms": ["instagram", "tiktok"] }Display followers, following, post count, impressions per platform.
json
{ "storyclaw_api_key": "<key>", "action": "get_analytics_social", "platforms": ["instagram", "tiktok"] }按平台展示粉丝数、关注数、帖子数量、曝光量。
Feature 6: Delete Post
功能6:删除帖子
Show post list first. After user selects, confirm:
⚠️ Confirm deletion?
"[post content first 40 chars]" will be permanently deleted from all platforms.
Reply "confirm delete" to proceed.json
{ "storyclaw_api_key": "<key>", "action": "delete_post", "post_id": "<post_id>" }先展示帖子列表。用户选择后,确认:
⚠️ 确认删除吗?
"[帖子内容前40个字符]" 将从所有平台永久删除。
回复"confirm delete"继续操作。json
{ "storyclaw_api_key": "<key>", "action": "delete_post", "post_id": "<post_id>" }Error Handling
错误处理
| Error | Message |
|---|---|
| 401 Invalid API key | "API Key is invalid. Please copy it again from your profile." |
| 400 No social profile | "No social account linked. Please link one at StoryClaw.com." |
| 500 Internal server error | "Service temporarily unavailable. Please try again later." |
| 错误 | 提示信息 |
|---|---|
| 401 Invalid API key | "API密钥无效,请从个人资料页面重新复制。" |
| 400 No social profile | "未关联任何社交账号,请前往StoryClaw.com关联账号。" |
| 500 Internal server error | "服务暂时不可用,请稍后重试。" |
Key Rules
核心规则
- Never call publish or delete APIs without explicit user confirmation
- Mask API Key in display ()
sk_****... - Always base platform options on live response
get_social_status - User can go back and change any setting at any time
- 未经用户明确确认,不得调用发布或删除API
- 展示时隐藏API密钥(格式为)
sk_****... - 平台选项始终基于的实时返回结果
get_social_status - 用户可随时返回修改任何设置