StoryClaw Auto-Post Skill
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
Phase 1: API Key Check & Account Binding Confirmation
Step 1: Check API Key
First, check if STORYCLAW_API_KEY is available in the environment variable.
- 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 get_social_status to verify:
{ "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
Step 2: Confirm Social Account Binding
Show the user their connected platforms returned by get_social_status.
If 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.
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
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.
Select Platforms
Show only connected platforms from get_social_status (multi-select):
Your 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."
Media Attachments (Optional)
Ask if the user has images or videos to attach. publish_post only accepts HTTPS URLs — no local files.
If user has a local file → must upload first:
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 mediaUrls.
Flow: Local file → upload_file → S3 URL → mediaUrls → publish_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 scheduleDate for async processing.
Platform 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
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
scheduleDate for async processing
- Max 1 video per post per platform (except X which supports 4)
Schedule Settings
Ask: publish now or schedule? If scheduling, suggest optimal times:
| Platform |
Recommended Times |
| TikTok |
Weekdays 7–9am, 12–3pm, 7–9pm |
| Instagram |
Tue–Fri 9–11am, 1–3pm |
| Facebook |
Wed 11am–1pm, Thu 1–3pm |
| LinkedIn |
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.
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 publish_post after confirmation:
{
"storyclaw_api_key": "<key>",
"action": "publish_post",
"post": "<content>",
"platforms": ["tiktok", "instagram"],
"mediaUrls": ["<url>"],
"scheduleDate": "<ISO8601, omit for immediate>"
}
Feature 2: Query Post List
Ask which platform (from connected list):
{ "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
Feature 3: View Post Details
If user doesn't know post_id, show list from get_posts first.
{ "storyclaw_api_key": "<key>", "action": "get_post", "post_id": "<post_id>" }
Feature 4: Post Analytics
Method A — StoryClaw Post ID:
{ "storyclaw_api_key": "<key>", "action": "get_analytics_post", "post_id": "<id>", "platforms": ["tiktok"] }
Method B — Platform native ID:
{ "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.
Feature 5: Account Analytics
{ "storyclaw_api_key": "<key>", "action": "get_analytics_social", "platforms": ["instagram", "tiktok"] }
Display followers, following, post count, impressions per platform.
Feature 6: Delete Post
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.
{ "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." |
Key Rules
- Never call publish or delete APIs without explicit user confirmation
- Mask API Key in display (
sk_****...)
- Always base platform options on live
get_social_status response
- User can go back and change any setting at any time
1---2name: storyclaw-autoposter3description: "Supports publishing, scheduling, querying, managing, and analyzing posts across 13 social platforms via StoryClaw. Use when the user wants to post to TikTok, Instagram, Facebook, X/Twitter, YouTube, LinkedIn, Threads, Pinterest, Reddit, Bluesky, Telegram, Snapchat, or Google Business Profile. Use cases: (1) Publish or schedule a post with optional media, (2) Query post history or view post details, (3) View post or account analytics (likes, views, followers, reach), (4) Delete a post. Triggers: 帮我发帖, 自动发帖, 定时发帖, 查看帖子, 帖子数据, 观看量, 粉丝数, 账号分析, post to social media, schedule post, social media analytics."4version: "1.0.0"5license: MIT6author: storyclaw-official7homepage: https://storyclaw.com8repository: https://github.com/storyclaw-official/skills9requires:10 bins: [python3]11 env: [STORYCLAW_API_KEY]12 pip: [requests]13metadata:14 source: https://skillmd.com/skills/storyclaw-official/storyclaw-autoposter15 openclaw:16 emoji: 📱17 requires:18 bins:19 - python320 env:21 - STORYCLAW_API_KEY22 pip:23 - requests24 primaryEnv: STORYCLAW_API_KEY25 installSpec:26 bins:27 - python328 env:29 - STORYCLAW_API_KEY30 pip:31 - requests32---3334# StoryClaw Auto-Post Skill3536Supports full social media post management and analytics across 13 platforms.3738**Supported Platforms:** TikTok, Instagram, Facebook, X/Twitter, YouTube, LinkedIn, Threads, Pinterest, Reddit, Bluesky, Telegram, Snapchat, Google Business Profile3940**API Endpoint:** `POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api`4142---4344## Phase 1: API Key Check & Account Binding Confirmation4546### Step 1: Check API Key4748First, check if `STORYCLAW_API_KEY` is available in the environment variable.4950- **Available** → Use it directly, proceed to Step 251- **Not available** → Ask the user:52 > "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."5354Once the key is obtained (from env or user input), call `get_social_status` to verify:5556```json57{ "storyclaw_api_key": "<STORYCLAW_API_KEY>", "action": "get_social_status" }58```5960- 401 Invalid API key → Tell the user:61 > "Your API Key appears to be invalid. Please go to **https://storyclaw.com/profile** → **StoryClaw API Key** to check and recopy it."62- Success → Record connected platforms, proceed to Step 26364### Step 2: Confirm Social Account Binding6566Show the user their connected platforms returned by `get_social_status`.6768If no platforms are connected, or the user asks how to link social accounts, guide them:69> "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."7071If at least one platform is connected → proceed to Phase 2.7273**Only connected platforms appear as options throughout all operations.**7475---7677## Phase 2: Select Feature7879Ask what the user needs:8081| Feature | Description |82|---------|-------------|83| 📝 Publish Post | Publish immediately or schedule |84| 🔍 Query Post List | View post history for a platform |85| 📄 View Post Details | View full details of a specific post |86| 📊 Post Analytics | Likes, views, comments, shares, reach |87| 👥 Account Analytics | Followers, following, impressions |88| 🗑️ Delete Post | Delete a specific post |8990---9192## Feature 1: Publish Post9394### Collect Content95Ask what the user wants to post. If they provide a draft or idea, enter the content optimization flow.9697### Content Optimization (if needed)98Ask preferences:99- **Platform style**: Adapt per platform (TikTok: energetic short sentences, LinkedIn: professional, X: concise, etc.)100- **Tone**: Professional / Casual & Humorous / Inspirational / Educational101- **Hashtags**: Yes / No / Auto-recommend102- **Language**: Chinese / English / Other103104Show optimized content for user confirmation before proceeding.105106### Select Platforms107Show only connected platforms from `get_social_status` (multi-select):108109```110Your connected platforms:111- TikTok ✅112- Instagram ✅113- Facebook ✅114...115Which platforms would you like to post to?116```117118**Restriction:** If no video content → remove TikTok from options:119> "TikTok requires video content. Since no video is included, TikTok has been removed from the options."120121### Media Attachments (Optional)122Ask if the user has images or videos to attach. `publish_post` only accepts HTTPS URLs — no local files.123124**If user has a local file → must upload first:**125126```bash127curl -X POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api \128 -F "action=upload_file" \129 -F "storyclaw_api_key=<key>" \130 -F "file=@/path/to/photo.jpg" \131 -F "folder=my-media"132```133134Upload returns an S3 HTTPS URL → use as `mediaUrls`.135136**Flow:** Local file → `upload_file` → S3 URL → `mediaUrls` → `publish_post`137138### ⚠️ Pre-Post Media Validation (MANDATORY)139140Before calling the API, check every target platform against the limits below:141142| Check | Detail |143|-------|--------|144| File format | Must be in platform's supported list |145| File size | Must not exceed platform max |146| Video duration | Must be within min/max range |147| Resolution / aspect ratio | Must meet requirements |148| Media count | Must not exceed platform max per post |149| Video URL | Must end in known extension (.mp4/.mov) |150| Reddit + video | Reddit does NOT support video — block if selected |151| TikTok + PNG | TikTok does NOT support PNG — block if detected |152| HTTPS | All URLs must start with https:// |153154**If any violation found → BLOCK and notify:**155> "⚠️ Cannot post: [Platform] requires [requirement], but your [media] [issue]. Please fix and retry."156157Examples:158- "⚠️ Cannot post: TikTok does not support PNG images. Please convert to JPG or WebP."159- "⚠️ Cannot post: X/Twitter video duration is 145s, exceeding the 140s limit."160- "⚠️ Cannot post: Reddit does not support video. Please remove the video or deselect Reddit."161- "⚠️ Cannot post: Telegram image size is 8MB, exceeding the 5MB limit."162163Files over 50MB → suggest using `scheduleDate` for async processing.164165### Platform Media Limits Reference166167**TikTok**168- Images: JPG/JPEG/WebP only (NO PNG), max 35 images; recommended 1080×1920169- Video: MP4/MOV/WebM, max 1GB, 3s–600s, resolution 360–4096px, 23–60 FPS, max 1 video170171**Instagram**172- Images: JPG/GIF/PNG, max 8MB, width 320–1440px, ratio 4:5~1.91:1, max 10 images, 50 posts/day173- Video (Feed/Reels): MP4/MOV, max 300MB, 3s–15min, 23–60 FPS, max 1 video174- Stories video: max 100MB, 3–60s175176**Facebook Pages**177- Images: JPEG/BMP/PNG/GIF/TIFF, max 10MB, max 2048×2048px, max 10 images178- Video: max 2GB, max 1 video179180**LinkedIn**181- Images: JPG/GIF/PNG, max 5MB, recommended 1200×627px, max 9 images, 150 posts/day182- Documents: PPT/PPTX/DOC/DOCX/PDF, max 100MB, max 300 pages183- Video: MP4, max 500MB, 3s–30min, ratio 1:2.4~2.4:1, max 1 video184185**X / Twitter**186- Images: JPG/PNG/GIF/WebP, max 5MB, max 4 images187- 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 URLs188189**Bluesky**190- Images: JPG/GIF/PNG, max 1MB, max 4 images; animated GIF → treated as 1 video191- Video: MP4, max 1GB, 1s–3min, ratio 1:3~3:1, max 1 video192193**Pinterest**194- Images: BMP/JPEG/PNG/TIFF/GIF/WebP, max 20MB, recommended 1000×1500 (2:3), max 1 image (carousel up to 5, same size)195- Video: MP4/MOV/M4V, max 1GB, 4s–15min, max 1 video196197**Reddit**198- Images: JPG/PNG/GIF/WebP, max 10MB, max 1 image199- Video: ❌ NOT SUPPORTED200201**Snapchat**202- Story/Spotlight images: JPEG/PNG, max 20MB, recommended 1080×1920203- Story/Spotlight video: MP4, max 500MB, 5–60s, recommended 540×960, 9:16, max 1 video204205**Telegram**206- Images: JPG/PNG/GIF/WebP, max 5MB, width+height ≤10,000, ratio ≤20:1, max 1 image; text ≤1,024 chars207- Video: max 20MB, text ≤1,024 chars, max 1 video208209**Threads**210- Up to 20 images/videos mixed; video URL must end in known extension or use isVideo param211- ⚠️ Threads does not support post deletion via API (must delete manually in app)212213**YouTube**214- Video: MP4/MOV, max 4GB, recommended 16:9, H.264+AAC, frame rates: 24/25/30/48/50/60 FPS, max 1 video215216**Google Business Profile**217- Images: max 1 image218219**Universal Rules**220- All media URLs must start with https://221- Video URLs must end in a known extension (.mp4, .mov); otherwise add `isVideo: true`222- Files >50MB: use `scheduleDate` for async processing223- Max 1 video per post per platform (except X which supports 4)224225### Schedule Settings226Ask: publish now or schedule? If scheduling, suggest optimal times:227228| Platform | Recommended Times |229|----------|-------------------|230| TikTok | Weekdays 7–9am, 12–3pm, 7–9pm |231| Instagram | Tue–Fri 9–11am, 1–3pm |232| Facebook | Wed 11am–1pm, Thu 1–3pm |233| LinkedIn | Tue–Thu 8–10am, 12pm |234| X/Twitter | Mon–Fri 8am, 12pm, 5pm |235| YouTube | Fri–Sun 2–4pm |236237Offer 2–3 specific options. User makes final decision. Convert to ISO 8601.238239### Final Confirmation240241**Must show full summary and wait for explicit confirmation before calling API:**242243```244📋 Post Confirmation245─────────────────246Content: [final content]247Platforms: [selected platforms]248Media: [yes/no]249Post time: [now / specific time]250─────────────────251Confirm posting?252```253254Call `publish_post` after confirmation:255256```json257{258 "storyclaw_api_key": "<key>",259 "action": "publish_post",260 "post": "<content>",261 "platforms": ["tiktok", "instagram"],262 "mediaUrls": ["<url>"],263 "scheduleDate": "<ISO8601, omit for immediate>"264}265```266267---268269## Feature 2: Query Post List270271Ask which platform (from connected list):272273```json274{ "storyclaw_api_key": "<key>", "action": "get_posts", "platform": "<platform>" }275```276277Display results:278```279📋 [Platform] Post List:2801. "[content first 40 chars...]" — 2025-01-102812. "[content first 40 chars...]" — 2025-01-08282```283284---285286## Feature 3: View Post Details287288If user doesn't know post_id, show list from `get_posts` first.289290```json291{ "storyclaw_api_key": "<key>", "action": "get_post", "post_id": "<post_id>" }292```293294---295296## Feature 4: Post Analytics297298**Method A — StoryClaw Post ID:**299```json300{ "storyclaw_api_key": "<key>", "action": "get_analytics_post", "post_id": "<id>", "platforms": ["tiktok"] }301```302303**Method B — Platform native ID:**304```json305{ "storyclaw_api_key": "<key>", "action": "get_analytics_post_by_social_id", "social_post_id": "<id>", "platforms": ["instagram"] }306```307308Display grouped by platform with likes, views, comments, shares, impressions, reach.309310---311312## Feature 5: Account Analytics313314```json315{ "storyclaw_api_key": "<key>", "action": "get_analytics_social", "platforms": ["instagram", "tiktok"] }316```317318Display followers, following, post count, impressions per platform.319320---321322## Feature 6: Delete Post323324Show post list first. After user selects, confirm:325```326⚠️ Confirm deletion?327"[post content first 40 chars]" will be permanently deleted from all platforms.328Reply "confirm delete" to proceed.329```330331```json332{ "storyclaw_api_key": "<key>", "action": "delete_post", "post_id": "<post_id>" }333```334335---336337## Error Handling338339| Error | Message |340|-------|---------|341| 401 Invalid API key | "API Key is invalid. Please copy it again from your profile." |342| 400 No social profile | "No social account linked. Please link one at StoryClaw.com." |343| 500 Internal server error | "Service temporarily unavailable. Please try again later." |344345---346347## Key Rules348349- **Never call publish or delete APIs without explicit user confirmation**350- Mask API Key in display (`sk_****...`)351- Always base platform options on live `get_social_status` response352- User can go back and change any setting at any time