From bcef8d937ec7a0fc72a608f9d853b0d4a6f96072 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Apr 2026 13:11:12 +0000 Subject: [PATCH] feat(skills): Add Reddit and YouTube to social-automation collection - Reddit: Subreddit posts, comments, search, flair management - YouTube: Video uploads, playlists, analytics, comments - Updated README with Firefrost use cases - Reddit especially relevant for r/feedthebeast community - Updated SKILLS-INDEX.md Chronicler #73 --- docs/skills/SKILLS-INDEX.md | 9 +- docs/skills/social-automation/README.md | 14 ++ .../social-automation/reddit-automation.md | 216 +++++++++++++++++ .../social-automation/youtube-automation.md | 222 ++++++++++++++++++ 4 files changed, 459 insertions(+), 2 deletions(-) create mode 100644 docs/skills/social-automation/reddit-automation.md create mode 100644 docs/skills/social-automation/youtube-automation.md diff --git a/docs/skills/SKILLS-INDEX.md b/docs/skills/SKILLS-INDEX.md index 543e671..889f8a1 100644 --- a/docs/skills/SKILLS-INDEX.md +++ b/docs/skills/SKILLS-INDEX.md @@ -193,13 +193,15 @@ ### social-automation (collection) **Location:** `docs/skills/social-automation/` **Source:** skill.fish (ComposioHQ) -**Triggers:** Facebook automation, Twitch automation, Rube MCP, Composio, social media API +**Triggers:** Facebook, Reddit, Twitch, YouTube automation, Rube MCP, Composio, social media API **Purpose:** Platform automation via Rube MCP (Composio framework) **What It Covers:** - **facebook-automation.md** — Page management, posts, videos, Messenger +- **reddit-automation.md** — Subreddit posts, comments, search, flair - **twitch-automation.md** — Stream/channel operations +- **youtube-automation.md** — Video uploads, playlists, analytics, comments **Prerequisites:** - Requires Rube MCP server at `https://rube.app/mcp` @@ -209,6 +211,7 @@ - Exploring social platform automation options - Considering Composio integration - Building automated cross-posting workflows +- Reddit community engagement (r/feedthebeast, r/minecraft) --- @@ -399,7 +402,9 @@ docs/skills/ ├── social-automation/ │ ├── README.md │ ├── facebook-automation.md -│ └── twitch-automation.md +│ ├── reddit-automation.md +│ ├── twitch-automation.md +│ └── youtube-automation.md ├── stripe-best-practices/ │ └── SKILL.md └── discord-automation/ (skill collection) diff --git a/docs/skills/social-automation/README.md b/docs/skills/social-automation/README.md index c003e92..229b0d8 100644 --- a/docs/skills/social-automation/README.md +++ b/docs/skills/social-automation/README.md @@ -11,7 +11,9 @@ Platform automation skills using Rube MCP (Composio framework). | Platform | File | Purpose | |----------|------|---------| | Facebook | `facebook-automation.md` | Page management, posts, videos, Messenger | +| Reddit | `reddit-automation.md` | Subreddit posts, comments, search | | Twitch | `twitch-automation.md` | Stream/channel automation | +| YouTube | `youtube-automation.md` | Video uploads, playlists, analytics | --- @@ -31,11 +33,23 @@ Platform automation skills using Rube MCP (Composio framework). - Schedule launch posts - Manage community Messenger conversations +### Reddit +- Post to r/feedthebeast, r/minecraft, r/admincraft +- Engage with modded Minecraft community +- Share server updates and modpack releases +- Monitor community discussions + ### Twitch - Potential future streaming integration - Announce streams in Discord - Automated clip sharing +### YouTube +- Upload server showcase videos +- Manage tutorial playlists +- Track video performance +- Cross-promote content + --- **Note:** These are reference materials. Firefrost doesn't currently use Rube MCP, but these skills document how platform automation could work if we add Composio integration. diff --git a/docs/skills/social-automation/reddit-automation.md b/docs/skills/social-automation/reddit-automation.md new file mode 100644 index 0000000..13b99be --- /dev/null +++ b/docs/skills/social-automation/reddit-automation.md @@ -0,0 +1,216 @@ +--- +name: reddit-automation +description: "Automate Reddit tasks via Rube MCP (Composio): search subreddits, create posts, manage comments, and browse top content. Always search tools first for current schemas." +risk: critical +source: community +date_added: "2026-02-27" +--- + +# Reddit Automation via Rube MCP + +Automate Reddit operations through Composio's Reddit toolkit via Rube MCP. + +## Prerequisites + +- Rube MCP must be connected (RUBE_SEARCH_TOOLS available) +- Active Reddit connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `reddit` +- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas + +## Setup + +**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works. + + +1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds +2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `reddit` +3. If connection is not ACTIVE, follow the returned auth link to complete Reddit OAuth +4. Confirm connection status shows ACTIVE before running any workflows + +## Core Workflows + +### 1. Search Reddit + +**When to use**: User wants to find posts across subreddits + +**Tool sequence**: +1. `REDDIT_SEARCH_ACROSS_SUBREDDITS` - Search for posts matching a query [Required] + +**Key parameters**: +- `query`: Search terms +- `subreddit`: Limit search to a specific subreddit (optional) +- `sort`: Sort results by 'relevance', 'hot', 'top', 'new', 'comments' +- `time_filter`: Time range ('hour', 'day', 'week', 'month', 'year', 'all') +- `limit`: Number of results to return + +**Pitfalls**: +- Search results may not include very recent posts due to indexing delay +- The `time_filter` parameter only works with certain sort options +- Results are paginated; use after/before tokens for additional pages +- NSFW content may be filtered based on account settings + +### 2. Create Posts + +**When to use**: User wants to submit a new post to a subreddit + +**Tool sequence**: +1. `REDDIT_LIST_SUBREDDIT_POST_FLAIRS` - Get available post flairs [Optional] +2. `REDDIT_CREATE_REDDIT_POST` - Submit the post [Required] + +**Key parameters**: +- `subreddit`: Target subreddit name (without 'r/' prefix) +- `title`: Post title +- `text`: Post body text (for text posts) +- `url`: Link URL (for link posts) +- `flair_id`: Flair ID from the subreddit's flair list + +**Pitfalls**: +- Some subreddits require flair; use LIST_SUBREDDIT_POST_FLAIRS first +- Subreddit posting rules vary widely; karma/age restrictions may apply +- Text and URL are mutually exclusive; a post is either text or link +- Rate limits apply; avoid rapid successive post creation +- The subreddit name should not include 'r/' prefix + +### 3. Manage Comments + +**When to use**: User wants to comment on posts or manage existing comments + +**Tool sequence**: +1. `REDDIT_RETRIEVE_POST_COMMENTS` - Get comments on a post [Optional] +2. `REDDIT_POST_REDDIT_COMMENT` - Add a comment to a post or reply to a comment [Required] +3. `REDDIT_EDIT_REDDIT_COMMENT_OR_POST` - Edit an existing comment [Optional] +4. `REDDIT_DELETE_REDDIT_COMMENT` - Delete a comment [Optional] + +**Key parameters**: +- `post_id`: ID of the post (for retrieving or commenting on) +- `parent_id`: Full name of the parent (e.g., 't3_abc123' for post, 't1_xyz789' for comment) +- `body`: Comment text content +- `thing_id`: Full name of the item to edit or delete + +**Pitfalls**: +- Reddit uses 'fullname' format: 't1_' prefix for comments, 't3_' for posts +- Editing replaces the entire comment body; include all desired content +- Deleted comments show as '[deleted]' but the tree structure remains +- Comment depth limits may apply in some subreddits + +### 4. Browse Subreddit Content + +**When to use**: User wants to view top or trending content from a subreddit + +**Tool sequence**: +1. `REDDIT_GET_R_TOP` - Get top posts from a subreddit [Required] +2. `REDDIT_GET` - Get posts from a subreddit endpoint [Alternative] +3. `REDDIT_RETRIEVE_REDDIT_POST` - Get full details for a specific post [Optional] + +**Key parameters**: +- `subreddit`: Subreddit name +- `time_filter`: Time range for top posts ('hour', 'day', 'week', 'month', 'year', 'all') +- `limit`: Number of posts to retrieve +- `post_id`: Specific post ID for full details + +**Pitfalls**: +- Top posts with time_filter='all' returns all-time top content +- Post details include the body text but comments require a separate call +- Some posts may be removed or hidden based on subreddit rules +- NSFW posts are included unless filtered at the account level + +### 5. Manage Posts + +**When to use**: User wants to edit or delete their own posts + +**Tool sequence**: +1. `REDDIT_EDIT_REDDIT_COMMENT_OR_POST` - Edit a post's text content [Optional] +2. `REDDIT_DELETE_REDDIT_POST` - Delete a post [Optional] +3. `REDDIT_GET_USER_FLAIR` - Get user's flair in a subreddit [Optional] + +**Key parameters**: +- `thing_id`: Full name of the post (e.g., 't3_abc123') +- `body`: New text content (for editing) +- `subreddit`: Subreddit name (for flair) + +**Pitfalls**: +- Only text posts can have their body edited; link posts cannot be modified +- Post titles cannot be edited after submission +- Deletion is permanent; deleted posts show as '[deleted]' +- User flair is per-subreddit and may be restricted + +## Common Patterns + +### Reddit Fullname Format + +**Prefixes**: +``` +t1_ = Comment (e.g., 't1_abc123') +t2_ = Account (e.g., 't2_xyz789') +t3_ = Post/Link (e.g., 't3_def456') +t4_ = Message +t5_ = Subreddit +``` + +**Usage**: +``` +1. Retrieve a post to get its fullname (t3_XXXXX) +2. Use fullname as parent_id when commenting +3. Use fullname as thing_id when editing/deleting +``` + +### Pagination + +- Reddit uses cursor-based pagination with 'after' and 'before' tokens +- Set `limit` for items per page (max 100) +- Check response for `after` token +- Pass `after` value in subsequent requests to get next page + +### Flair Resolution + +``` +1. Call REDDIT_LIST_SUBREDDIT_POST_FLAIRS with subreddit name +2. Find matching flair by text or category +3. Extract flair_id +4. Include flair_id when creating the post +``` + +## Known Pitfalls + +**Rate Limits**: +- Reddit enforces rate limits per account and per OAuth app +- Posting is limited to approximately 1 post per 10 minutes for new accounts +- Commenting has similar but less restrictive limits +- 429 errors should trigger exponential backoff + +**Content Rules**: +- Each subreddit has its own posting rules and requirements +- Some subreddits are restricted or private +- Karma requirements may prevent posting in certain subreddits +- Auto-moderator rules may remove posts that match certain patterns + +**ID Formats**: +- Always use fullname format (with prefix) for parent_id and thing_id +- Raw IDs without prefix will cause 'Invalid ID' errors +- Post IDs from search results may need 't3_' prefix added + +**Text Formatting**: +- Reddit uses Markdown for post and comment formatting +- Code blocks, tables, and headers are supported +- Links use `text` format +- Mention users with `u/username`, subreddits with `r/subreddit` + +## Quick Reference + +| Task | Tool Slug | Key Params | +|------|-----------|------------| +| Search Reddit | REDDIT_SEARCH_ACROSS_SUBREDDITS | query, subreddit, sort, time_filter | +| Create post | REDDIT_CREATE_REDDIT_POST | subreddit, title, text/url | +| Get post comments | REDDIT_RETRIEVE_POST_COMMENTS | post_id | +| Add comment | REDDIT_POST_REDDIT_COMMENT | parent_id, body | +| Edit comment/post | REDDIT_EDIT_REDDIT_COMMENT_OR_POST | thing_id, body | +| Delete comment | REDDIT_DELETE_REDDIT_COMMENT | thing_id | +| Delete post | REDDIT_DELETE_REDDIT_POST | thing_id | +| Get top posts | REDDIT_GET_R_TOP | subreddit, time_filter, limit | +| Browse subreddit | REDDIT_GET | subreddit | +| Get post details | REDDIT_RETRIEVE_REDDIT_POST | post_id | +| Get specific comment | REDDIT_RETRIEVE_SPECIFIC_COMMENT | comment_id | +| List post flairs | REDDIT_LIST_SUBREDDIT_POST_FLAIRS | subreddit | +| Get user flair | REDDIT_GET_USER_FLAIR | subreddit | + +## When to Use +This skill is applicable to execute the workflow or actions described in the overview. diff --git a/docs/skills/social-automation/youtube-automation.md b/docs/skills/social-automation/youtube-automation.md new file mode 100644 index 0000000..bdf131e --- /dev/null +++ b/docs/skills/social-automation/youtube-automation.md @@ -0,0 +1,222 @@ +--- +name: youtube-automation +description: "Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas." +risk: unknown +source: community +date_added: "2026-02-27" +--- + +# YouTube Automation via Rube MCP + +Automate YouTube operations through Composio's YouTube toolkit via Rube MCP. + +## Prerequisites + +- Rube MCP must be connected (RUBE_SEARCH_TOOLS available) +- Active YouTube connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube` +- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas + +## Setup + +**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works. + + +1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds +2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube` +3. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth +4. Confirm connection status shows ACTIVE before running any workflows + +## Core Workflows + +### 1. Upload and Manage Videos + +**When to use**: User wants to upload a video or update video metadata + +**Tool sequence**: +1. `YOUTUBE_UPLOAD_VIDEO` - Upload a new video [Required] +2. `YOUTUBE_UPDATE_VIDEO` - Update title, description, tags, privacy [Optional] +3. `YOUTUBE_UPDATE_THUMBNAIL` - Set a custom thumbnail [Optional] + +**Key parameters**: +- `title`: Video title (max 100 characters) +- `description`: Video description (max 5000 bytes) +- `tags`: Array of keyword tags +- `categoryId`: YouTube category ID (e.g., '22' for People & Blogs) +- `privacyStatus`: 'public', 'private', or 'unlisted' +- `videoFilePath`: Object with `{name, mimetype, s3key}` for the video file + +**Pitfalls**: +- UPLOAD_VIDEO consumes high quota; prefer UPDATE_VIDEO for metadata-only changes +- videoFilePath must be an object with s3key, not a raw file path or URL +- Tags total must not exceed 500 characters including separators +- Angle brackets `< >` in tags are automatically stripped +- Description limit is 5000 bytes, not characters (multibyte chars count more) + +### 2. Search YouTube Content + +**When to use**: User wants to find videos, channels, or playlists + +**Tool sequence**: +1. `YOUTUBE_SEARCH_YOU_TUBE` - Search for content [Required] +2. `YOUTUBE_VIDEO_DETAILS` - Get full details for a specific video [Optional] +3. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get details for multiple videos [Optional] + +**Key parameters**: +- `q`: Search query (supports exact phrases, exclusions, channel handles) +- `type`: 'video', 'channel', or 'playlist' +- `maxResults`: Results per page (1-50) +- `pageToken`: For pagination + +**Pitfalls**: +- Search endpoint only returns 'snippet' part; use VIDEO_DETAILS for statistics +- Search results are capped at 500 total items +- Search has higher quota cost (100 units) vs list endpoints (1 unit) +- BATCH video details practical limit is ~50 IDs per call; chunk larger sets + +### 3. Manage Playlists + +**When to use**: User wants to create playlists or manage playlist contents + +**Tool sequence**: +1. `YOUTUBE_LIST_USER_PLAYLISTS` - List user's existing playlists [Optional] +2. `YOUTUBE_CREATE_PLAYLIST` - Create a new playlist [Optional] +3. `YOUTUBE_ADD_VIDEO_TO_PLAYLIST` - Add a video to a playlist [Optional] +4. `YOUTUBE_LIST_PLAYLIST_ITEMS` - List videos in a playlist [Optional] + +**Key parameters**: +- `playlistId`: Playlist ID ('PL...' for user-created, 'UU...' for uploads) +- `part`: Resource parts to include (e.g., 'snippet,contentDetails') +- `maxResults`: Items per page (1-50) +- `pageToken`: Pagination token from previous response + +**Pitfalls**: +- Do NOT pass channel IDs ('UC...') as playlist IDs; convert 'UC' to 'UU' for uploads +- Large playlists require pagination via pageToken; follow nextPageToken until absent +- items[].id is not the videoId; use items[].snippet.resourceId.videoId +- Creating duplicate playlist names is allowed; check existing playlists first + +### 4. Get Channel and Video Analytics + +**When to use**: User wants to analyze channel performance or video metrics + +**Tool sequence**: +1. `YOUTUBE_GET_CHANNEL_ID_BY_HANDLE` - Resolve a handle to channel ID [Prerequisite] +2. `YOUTUBE_GET_CHANNEL_STATISTICS` - Get channel subscriber/view/video counts [Required] +3. `YOUTUBE_LIST_CHANNEL_VIDEOS` - List all videos from a channel [Optional] +4. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get per-video statistics [Optional] +5. `YOUTUBE_GET_CHANNEL_ACTIVITIES` - Get recent channel activities [Optional] + +**Key parameters**: +- `channelId`: Channel ID ('UC...'), handle ('@handle'), or 'me' +- `forHandle`: Channel handle (e.g., '@Google') +- `id`: Comma-separated video IDs for batch details +- `parts`: Resource parts to include (e.g., 'snippet,statistics') + +**Pitfalls**: +- Channel statistics are lifetime totals, not per-period +- BATCH video details may return fewer items than requested for private/deleted videos +- Response data may be nested under `data` or `data_preview`; parse defensively +- contentDetails.duration uses ISO 8601 format (e.g., 'PT4M13S') + +### 5. Manage Subscriptions and Comments + +**When to use**: User wants to subscribe to channels or view video comments + +**Tool sequence**: +1. `YOUTUBE_SUBSCRIBE_CHANNEL` - Subscribe to a channel [Optional] +2. `YOUTUBE_UNSUBSCRIBE_CHANNEL` - Unsubscribe from a channel [Optional] +3. `YOUTUBE_LIST_USER_SUBSCRIPTIONS` - List subscriptions [Optional] +4. `YOUTUBE_LIST_COMMENT_THREADS` - List comments on a video [Optional] + +**Key parameters**: +- `channelId`: Channel to subscribe/unsubscribe +- `videoId`: Video ID for comment threads +- `maxResults`: Results per page +- `pageToken`: Pagination token + +**Pitfalls**: +- Subscribing to an already-subscribed channel may return an error +- Comment threads return top-level comments with up to 5 replies each +- Comments may be disabled on some videos +- Unsubscribe requires the subscription ID, not the channel ID + +## Common Patterns + +### Channel ID Resolution + +**Handle to Channel ID**: +``` +1. Call YOUTUBE_GET_CHANNEL_ID_BY_HANDLE with '@handle' +2. Extract channelId from response +3. Use in subsequent channel operations +``` + +**Uploads Playlist**: +``` +1. Get channel ID (starts with 'UC') +2. Replace 'UC' prefix with 'UU' to get uploads playlist ID +3. Use with LIST_PLAYLIST_ITEMS to enumerate all videos +``` + +### Pagination + +- Set `maxResults` (max 50 per page) +- Check response for `nextPageToken` +- Pass token as `pageToken` in next request +- Continue until `nextPageToken` is absent + +### Batch Video Details + +- Collect video IDs from search or playlist listings +- Chunk into groups of ~50 IDs +- Call GET_VIDEO_DETAILS_BATCH per chunk +- Merge results across chunks + +## Known Pitfalls + +**Quota Management**: +- YouTube API has a daily quota limit (default 10,000 units) +- Upload = 1600 units; search = 100 units; list = 1 unit +- Prefer list endpoints over search when possible +- Monitor quota usage to avoid hitting daily limits + +**ID Formats**: +- Video IDs: 11-character alphanumeric strings +- Channel IDs: Start with 'UC' followed by 22 characters +- Playlist IDs: Start with 'PL' (user) or 'UU' (uploads) +- Do not confuse channel IDs with playlist IDs + +**Thumbnails**: +- Custom thumbnails require channel phone verification +- Must be JPG, PNG, or GIF; under 2MB +- Recommended: 1280x720 resolution (16:9 aspect ratio) + +**Response Parsing**: +- Statistics values are returned as strings, not integers; cast before math +- Duration uses ISO 8601 format (PT#H#M#S) +- Batch responses may wrap data under different keys + +## Quick Reference + +| Task | Tool Slug | Key Params | +|------|-----------|------------| +| Upload video | YOUTUBE_UPLOAD_VIDEO | title, description, tags, categoryId, privacyStatus, videoFilePath | +| Update video | YOUTUBE_UPDATE_VIDEO | video_id, title, description, tags | +| Set thumbnail | YOUTUBE_UPDATE_THUMBNAIL | videoId, thumbnailUrl | +| Search YouTube | YOUTUBE_SEARCH_YOU_TUBE | q, type, maxResults | +| Video details | YOUTUBE_VIDEO_DETAILS | id, part | +| Batch video details | YOUTUBE_GET_VIDEO_DETAILS_BATCH | id, parts | +| List playlists | YOUTUBE_LIST_USER_PLAYLISTS | maxResults, pageToken | +| Create playlist | YOUTUBE_CREATE_PLAYLIST | (check schema) | +| Add to playlist | YOUTUBE_ADD_VIDEO_TO_PLAYLIST | (check schema) | +| List playlist items | YOUTUBE_LIST_PLAYLIST_ITEMS | playlistId, maxResults | +| Channel statistics | YOUTUBE_GET_CHANNEL_STATISTICS | id/forHandle/mine | +| List channel videos | YOUTUBE_LIST_CHANNEL_VIDEOS | channelId, maxResults | +| Channel ID by handle | YOUTUBE_GET_CHANNEL_ID_BY_HANDLE | channel_handle | +| Subscribe | YOUTUBE_SUBSCRIBE_CHANNEL | channelId | +| List subscriptions | YOUTUBE_LIST_USER_SUBSCRIPTIONS | (check schema) | +| List comments | YOUTUBE_LIST_COMMENT_THREADS | videoId | +| Channel activities | YOUTUBE_GET_CHANNEL_ACTIVITIES | (check schema) | + +## When to Use +This skill is applicable to execute the workflow or actions described in the overview.