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.4license: MIT5---67# StoryClaw Auto-Post Skill89Supports full social media post management and analytics across 13 platforms.1011**Supported Platforms:** TikTok, Instagram, Facebook, X/Twitter, YouTube, LinkedIn, Threads, Pinterest, Reddit, Bluesky, Telegram, Snapchat, Google Business Profile1213**API Endpoint:** `POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api`1415---1617## Phase 1: API Key Check & Account Binding Confirmation1819### Step 1: Check API Key2021First, check if `STORYCLAW_API_KEY` is available in the environment variable.2223- **Available** → Use it directly, proceed to Step 224- **Not available** → Ask the user:25 > "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."2627Once the key is obtained (from env or user input), call `get_social_status` to verify:2829```json30{ "storyclaw_api_key": "<STORYCLAW_API_KEY>", "action": "get_social_status" }31```3233- 401 Invalid API key → Tell the user:34 > "Your API Key appears to be invalid. Please go to **https://storyclaw.com/profile** → **StoryClaw API Key** to check and recopy it."35- Success → Record connected platforms, proceed to Step 23637### Step 2: Confirm Social Account Binding3839Show the user their connected platforms returned by `get_social_status`.4041If no platforms are connected, or the user asks how to link social accounts, guide them:42> "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."4344If at least one platform is connected → proceed to Phase 2.4546**Only connected platforms appear as options throughout all operations.**4748---4950## Phase 2: Select Feature5152Ask what the user needs:5354| Feature | Description |55|---------|-------------|56| 📝 Publish Post | Publish immediately or schedule |57| 🔍 Query Post List | View post history for a platform |58| 📄 View Post Details | View full details of a specific post |59| 📊 Post Analytics | Likes, views, comments, shares, reach |60| 👥 Account Analytics | Followers, following, impressions |61| 🗑️ Delete Post | Delete a specific post |6263---6465## Feature 1: Publish Post6667### Collect Content68Ask what the user wants to post. If they provide a draft or idea, enter the content optimization flow.6970### Content Optimization (if needed)71Ask preferences:72- **Platform style**: Adapt per platform (TikTok: energetic short sentences, LinkedIn: professional, X: concise, etc.)73- **Tone**: Professional / Casual & Humorous / Inspirational / Educational74- **Hashtags**: Yes / No / Auto-recommend75- **Language**: Chinese / English / Other7677Show optimized content for user confirmation before proceeding.7879### Select Platforms80Show only connected platforms from `get_social_status` (multi-select):8182```83Your connected platforms:84- TikTok ✅85- Instagram ✅86- Facebook ✅87...88Which platforms would you like to post to?89```9091**Restriction:** If no video content → remove TikTok from options:92> "TikTok requires video content. Since no video is included, TikTok has been removed from the options."9394### Media Attachments (Optional)95Ask if the user has images or videos to attach. `publish_post` only accepts HTTPS URLs — no local files.9697**If user has a local file → must upload first:**9899```bash100curl -X POST https://aipuejhjwmabtobjrqdz.supabase.co/functions/v1/storyclaw-api \101 -F "action=upload_file" \102 -F "storyclaw_api_key=<key>" \103 -F "file=@/path/to/photo.jpg" \104 -F "folder=my-media"105```106107Upload returns an S3 HTTPS URL → use as `mediaUrls`.108109**Flow:** Local file → `upload_file` → S3 URL → `mediaUrls` → `publish_post`110111### ⚠️ Pre-Post Media Validation (MANDATORY)112113Before calling the API, check every target platform against the limits below:114115| Check | Detail |116|-------|--------|117| File format | Must be in platform's supported list |118| File size | Must not exceed platform max |119| Video duration | Must be within min/max range |120| Resolution / aspect ratio | Must meet requirements |121| Media count | Must not exceed platform max per post |122| Video URL | Must end in known extension (.mp4/.mov) |123| Reddit + video | Reddit does NOT support video — block if selected |124| TikTok + PNG | TikTok does NOT support PNG — block if detected |125| HTTPS | All URLs must start with https:// |126127**If any violation found → BLOCK and notify:**128> "⚠️ Cannot post: [Platform] requires [requirement], but your [media] [issue]. Please fix and retry."129130Examples:131- "⚠️ Cannot post: TikTok does not support PNG images. Please convert to JPG or WebP."132- "⚠️ Cannot post: X/Twitter video duration is 145s, exceeding the 140s limit."133- "⚠️ Cannot post: Reddit does not support video. Please remove the video or deselect Reddit."134- "⚠️ Cannot post: Telegram image size is 8MB, exceeding the 5MB limit."135136Files over 50MB → suggest using `scheduleDate` for async processing.137138### Platform Media Limits Reference139140**TikTok**141- Images: JPG/JPEG/WebP only (NO PNG), max 35 images; recommended 1080×1920142- Video: MP4/MOV/WebM, max 1GB, 3s–600s, resolution 360–4096px, 23–60 FPS, max 1 video143144**Instagram**145- Images: JPG/GIF/PNG, max 8MB, width 320–1440px, ratio 4:5~1.91:1, max 10 images, 50 posts/day146- Video (Feed/Reels): MP4/MOV, max 300MB, 3s–15min, 23–60 FPS, max 1 video147- Stories video: max 100MB, 3–60s148149**Facebook Pages**150- Images: JPEG/BMP/PNG/GIF/TIFF, max 10MB, max 2048×2048px, max 10 images151- Video: max 2GB, max 1 video152153**LinkedIn**154- Images: JPG/GIF/PNG, max 5MB, recommended 1200×627px, max 9 images, 150 posts/day155- Documents: PPT/PPTX/DOC/DOCX/PDF, max 100MB, max 300 pages156- Video: MP4, max 500MB, 3s–30min, ratio 1:2.4~2.4:1, max 1 video157158**X / Twitter**159- Images: JPG/PNG/GIF/WebP, max 5MB, max 4 images160- 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 URLs161162**Bluesky**163- Images: JPG/GIF/PNG, max 1MB, max 4 images; animated GIF → treated as 1 video164- Video: MP4, max 1GB, 1s–3min, ratio 1:3~3:1, max 1 video165166**Pinterest**167- Images: BMP/JPEG/PNG/TIFF/GIF/WebP, max 20MB, recommended 1000×1500 (2:3), max 1 image (carousel up to 5, same size)168- Video: MP4/MOV/M4V, max 1GB, 4s–15min, max 1 video169170**Reddit**171- Images: JPG/PNG/GIF/WebP, max 10MB, max 1 image172- Video: ❌ NOT SUPPORTED173174**Snapchat**175- Story/Spotlight images: JPEG/PNG, max 20MB, recommended 1080×1920176- Story/Spotlight video: MP4, max 500MB, 5–60s, recommended 540×960, 9:16, max 1 video177178**Telegram**179- Images: JPG/PNG/GIF/WebP, max 5MB, width+height ≤10,000, ratio ≤20:1, max 1 image; text ≤1,024 chars180- Video: max 20MB, text ≤1,024 chars, max 1 video181182**Threads**183- Up to 20 images/videos mixed; video URL must end in known extension or use isVideo param184- ⚠️ Threads does not support post deletion via API (must delete manually in app)185186**YouTube**187- Video: MP4/MOV, max 4GB, recommended 16:9, H.264+AAC, frame rates: 24/25/30/48/50/60 FPS, max 1 video188189**Google Business Profile**190- Images: max 1 image191192**Universal Rules**193- All media URLs must start with https://194- Video URLs must end in a known extension (.mp4, .mov); otherwise add `isVideo: true`195- Files >50MB: use `scheduleDate` for async processing196- Max 1 video per post per platform (except X which supports 4)197198### Schedule Settings199Ask: publish now or schedule? If scheduling, suggest optimal times:200201| Platform | Recommended Times |202|----------|-------------------|203| TikTok | Weekdays 7–9am, 12–3pm, 7–9pm |204| Instagram | Tue–Fri 9–11am, 1–3pm |205| Facebook | Wed 11am–1pm, Thu 1–3pm |206| LinkedIn | Tue–Thu 8–10am, 12pm |207| X/Twitter | Mon–Fri 8am, 12pm, 5pm |208| YouTube | Fri–Sun 2–4pm |209210Offer 2–3 specific options. User makes final decision. Convert to ISO 8601.211212### Final Confirmation213214**Must show full summary and wait for explicit confirmation before calling API:**215216```217📋 Post Confirmation218─────────────────219Content: [final content]220Platforms: [selected platforms]221Media: [yes/no]222Post time: [now / specific time]223─────────────────224Confirm posting?225```226227Call `publish_post` after confirmation:228229```json230{231 "storyclaw_api_key": "<key>",232 "action": "publish_post",233 "post": "<content>",234 "platforms": ["tiktok", "instagram"],235 "mediaUrls": ["<url>"],236 "scheduleDate": "<ISO8601, omit for immediate>"237}238```239240---241242## Feature 2: Query Post List243244Ask which platform (from connected list):245246```json247{ "storyclaw_api_key": "<key>", "action": "get_posts", "platform": "<platform>" }248```249250Display results:251```252📋 [Platform] Post List:2531. "[content first 40 chars...]" — 2025-01-102542. "[content first 40 chars...]" — 2025-01-08255```256257---258259## Feature 3: View Post Details260261If user doesn't know post_id, show list from `get_posts` first.262263```json264{ "storyclaw_api_key": "<key>", "action": "get_post", "post_id": "<post_id>" }265```266267---268269## Feature 4: Post Analytics270271**Method A — StoryClaw Post ID:**272```json273{ "storyclaw_api_key": "<key>", "action": "get_analytics_post", "post_id": "<id>", "platforms": ["tiktok"] }274```275276**Method B — Platform native ID:**277```json278{ "storyclaw_api_key": "<key>", "action": "get_analytics_post_by_social_id", "social_post_id": "<id>", "platforms": ["instagram"] }279```280281Display grouped by platform with likes, views, comments, shares, impressions, reach.282283---284285## Feature 5: Account Analytics286287```json288{ "storyclaw_api_key": "<key>", "action": "get_analytics_social", "platforms": ["instagram", "tiktok"] }289```290291Display followers, following, post count, impressions per platform.292293---294295## Feature 6: Delete Post296297Show post list first. After user selects, confirm:298```299⚠️ Confirm deletion?300"[post content first 40 chars]" will be permanently deleted from all platforms.301Reply "confirm delete" to proceed.302```303304```json305{ "storyclaw_api_key": "<key>", "action": "delete_post", "post_id": "<post_id>" }306```307308---309310## Error Handling311312| Error | Message |313|-------|---------|314| 401 Invalid API key | "API Key is invalid. Please copy it again from your profile." |315| 400 No social profile | "No social account linked. Please link one at StoryClaw.com." |316| 500 Internal server error | "Service temporarily unavailable. Please try again later." |317318---319320## Key Rules321322- **Never call publish or delete APIs without explicit user confirmation**323- Mask API Key in display (`sk_****...`)324- Always base platform options on live `get_social_status` response325- User can go back and change any setting at any time