自动管理并发布多样化、平台优化的社交媒体内容,覆盖 X、Instagram、YouTube、Meta,采用智能排程和数据驱动的洞察。
You are a social media automation agent. You manage the user's social media presence across X (Twitter), Instagram, YouTube, and Meta (Facebook/Threads) — completely autonomously.
All credentials are read from environment variables. No keys are hardcoded.
text
X_API_KEY=<your X/Twitter API key>
X_API_SECRET=<your X/Twitter API secret>
X_ACCESS_TOKEN=<your X/Twitter access token>
X_ACCESS_TOKEN_SECRET=<your X/Twitter access token secret>
text
INSTAGRAM_USER_ID=<your Instagram user ID>
INSTAGRAM_ACCESS_TOKEN=<your Instagram Graph API access token>
INSTAGRAM_APP_SECRET=<your Instagram app secret for webhook verification>
text
META_PAGE_ACCESS_TOKEN=<your Meta page access token>
META_PAGE_ID=<your Meta page ID>
YouTube posting uses OAuth2 credentials stored in a client_secrets.json file. Authentication is handled via browser OAuth flow on first run.
Instagram requires a public URL for reel uploads. R2 is used as the video host.
text
R2_ENDPOINT=<your Cloudflare R2 endpoint>
R2_ACCESS_KEY=<your R2 access key>
R2_SECRET_KEY=<your R2 secret key>
R2_BUCKET=<your R2 bucket name>
R2_PUBLIC_URL=<your R2 public URL>
text
CI=true # Set automatically by GitHub Actions
GITHUB_ACTIONS=true # Set automatically by GitHub Actions
data/questions.csv — Your content database (CSV with columns: question, option1, option2, option3, option4, correctIndex, explanation, subject, year)text
tweepy
requests
moviepy
numpy
Pillow
html2image
boto3
google-api-python-client
google-auth-oauthlib
ScriptPurposeformatter.pyContent generation — post pools, hashtags, platform formattingx_poster.pyX/Twitter posting + thread posting via tweepyx_thread_generator.pyData-driven thread generation from CSV analysisinstagram_main.pyInstagram reel posting orchestratorig_reel_poster.pyInstagram Graph API reel upload + answer commentsig_config.pyInstagram captions, hashtags, output pathsyoutube_main.pyYouTube Shorts posting orchestratoryt_shorts_poster.pyYouTube Data API uploadyt_config.pyYouTube titles, descriptions, tagsmeta_poster.pyMeta/Facebook/Threads postinghtml_video_generator.pyHTML→PNG→MP4 video generation (8 color themes)video_generator.pyPIL-based fallback video generatorimage_generator.pyStatic image generation for postscsv_manager.pyContent database reader + trackingr2_uploader.pyCloudflare R2 video upload (for Instagram reel hosting)yt_auth.pyYouTube OAuth2 authentication handler
Before using this skill, customize these files for your niche:
{BRAND_URL} and {BRAND_NAME} in all scripts with your own brand name and website URL. These appear as watermarks and CTAs in generated videos and captions.formatter.py contains pre-written post templates for an education/exam niche (UPSC). Replace the text in INSIGHT_POSTS, HOT_TAKE_POSTS, QUESTION_POSTS, MYTH_BUST_POSTS, STRUGGLE_POSTS, and QUIZ_HOOKS lists with content relevant to YOUR niche.data/questions.csv with your own content database.