算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
tiktok-marketing【设计与创意】Create, optimize, and automate TikTok content for brand awareness, audience growth, and conversions. Use when someone asks to "grow on TikTok", "create TikTok content", "TikTok marketing strategy", "TikTok API integration", "automate TikTok posting", "TikTok analytics", or "TikTok for business". Covers short-form video strategy, trending sounds, TikT…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
This skill helps AI agents create high-performing TikTok content and integrate with TikTok's APIs. It covers short-form video strategy, hook techniques, trending sounds, Content Posting API, analytics, and growth strategies for TikTok's For You Page algorithm.
TikTok's For You Page (FYP) algorithm:
What kills reach:
The first second determines everything. The viewer decides to scroll or stay.
Visual hooks:
Verbal hooks:
Retention hooks (throughout video):
Educational / How-To (highest save rate)
Trending Audio + Niche
Storytelling
Day in the Life / Behind the Scenes
Series Content
[Caption: 1-2 sentences max. Punchy, adds context or CTA]
[Hashtags: 3-5 targeted, mix of niche and broad]
Caption rules:
Hashtag rules:
// TikTok uses OAuth 2.0
const TIKTOK_AUTH_URL = 'https://www.tiktok.com/v2/auth/authorize/';
// Step 1: Redirect to authorization
const authUrl = new URL(TIKTOK_AUTH_URL);
authUrl.searchParams.set('client_key', process.env.TIKTOK_CLIENT_KEY);
authUrl.searchParams.set('response_type', 'code');
authUrl.searchParams.set('scope', 'user.info.basic,video.publish,video.upload,video.list');
authUrl.searchParams.set('redirect_uri', process.env.TIKTOK_REDIRECT_URI);
authUrl.searchParams.set('state', 'random-state');
// Step 2: Exchange code for token
const tokenRes = await fetch('https://open.tiktokapis.com/v2/oauth/token/', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
client_key: process.env.TIKTOK_CLIENT_KEY,
client_secret: process.env.TIKTOK_CLIENT_SECRET,
code: authorizationCode,
grant_type: 'authorization_code',
redirect_uri: process.env.TIKTOK_REDIRECT_URI,
}),
});
const { access_token, refresh_token, expires_in } = await tokenRes.json();
// Step 1: Initialize upload
const initRes = await fetch('https://open.tiktokapis.com/v2/post/publish/video/init/', {
method: 'POST',
headers: {
Authorization: `Bearer ${access_token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
post_info: {
title: 'Video title',
privacy_level: 'PUBLIC_TO_EVERYONE', // or MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
disable_duet: false,
disable_comment: false,
disable_stitch: false,
video_cover_timestamp_ms: 1000, // Cover frame at 1 second
},
source_info: {
source: 'FILE_UPLOAD',
video_size: videoFileSize, // in bytes
chunk_size: videoFileSize, // single chunk for files < 64MB
total_chunk_count: 1,
},
}),
});
const { data: { publish_id, upload_url } } = await initRes.json();
// Step 2: Upload video
await fetch(upload_url, {
method: 'PUT',
headers: {
'Content-Range': `bytes 0-${videoFileSize - 1}/${videoFileSize}`,
'Content-Type': 'video/mp4',
},
body: videoBuffer,
});
// Step 3: Check publish status
const statusRes = await fetch('https://open.tiktokapis.com/v2/post/publish/status/fetch/', {
method: 'POST',
headers: {
Authorization: `Bearer ${access_token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ publish_id }),
});
// Status: PROCESSING_UPLOAD, PROCESSING_DOWNLOAD, PUBLISH_COMPLETE, FAILED
// List user's videos
const videosRes = await fetch('https://open.tiktokapis.com/v2/video/list/?fields=id,title,create_time,share_url,duration,cover_image_url,like_count,comment_count,share_count,view_count', {
method: 'POST',
headers: {
Authorization: `Bearer ${access_token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ max_count: 20 }),
});
// Get user info
const userRes = await fetch('https://open.tiktokapis.com/v2/user/info/?fields=display_name,avatar_url,follower_count,following_count,likes_count,video_count', {
headers: { Authorization: `Bearer ${access_token}` },
});
Posting schedule: 1-3 videos/day (consistency > quality for growth phase)
Content mix:
Best posting times: 7-9 AM, 12-1 PM, 7-10 PM (target timezone). Test and check your Analytics for YOUR audience's active times.
Growth tactics:
TikTok SEO (2025-2026):
User prompt: "I run a specialty coffee roastery called Northside Beans in Portland. Create a 1-week TikTok content plan to grow my following from 400 to 2,000."
The agent will create a 7-day content calendar with specific video concepts tailored to a coffee roastery. Day 1: "POV: you just discovered single-origin Ethiopian Yirgacheffe" (trending audio + close-up pour, 15s). Day 2: "3 mistakes you're making with your morning coffee" (educational, text overlays, 30s). Day 3: "Watch us roast a batch from green to brown" (time-lapse behind-the-scenes, 20s). Day 4-7 continue with a mix of series content ("Coffee basics Part 1"), storytime ("How I quit my tech job to roast coffee"), and duet/stitch ideas. Each entry includes the hook line, suggested duration, content type, 3-5 hashtags like #SpecialtyCoffee #CoffeeTok #PortlandFood, and optimal posting time (7 AM and 7 PM PST).
User prompt: "Build a Node.js script that uploads a pre-recorded MP4 to TikTok using their Content Posting API. The video file is at ./videos/latte-art-tutorial.mp4."
The agent will create a Node.js script that authenticates via TikTok OAuth 2.0 using environment variables TIKTOK_CLIENT_KEY and TIKTOK_CLIENT_SECRET, reads the video file size, initializes the upload via POST /v2/post/publish/video/init/ with the title "Latte Art Tutorial — 3 Steps to a Perfect Rosetta", sets privacy_level to PUBLIC_TO_EVERYONE, uploads the binary to the returned upload_url with the correct Content-Range header, then polls /v2/post/publish/status/fetch/ every 5 seconds until the status is PUBLISH_COMPLETE or FAILED, logging the result.