Get the FREE Ultimate OpenClaw Setup Guide →

reddit-automation

npx machina-cli add skill davepoon/buildwithclaude/reddit-automation --openclaw
Files (1)
SKILL.md
7.8 KB

Reddit Automation via Rube MCP

Automate Reddit operations through Composio's Reddit toolkit via Rube MCP.

Toolkit docs: composio.dev/toolkits/reddit

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](url) format
  • Mention users with u/username, subreddits with r/subreddit

Quick Reference

TaskTool SlugKey Params
Search RedditREDDIT_SEARCH_ACROSS_SUBREDDITSquery, subreddit, sort, time_filter
Create postREDDIT_CREATE_REDDIT_POSTsubreddit, title, text/url
Get post commentsREDDIT_RETRIEVE_POST_COMMENTSpost_id
Add commentREDDIT_POST_REDDIT_COMMENTparent_id, body
Edit comment/postREDDIT_EDIT_REDDIT_COMMENT_OR_POSTthing_id, body
Delete commentREDDIT_DELETE_REDDIT_COMMENTthing_id
Delete postREDDIT_DELETE_REDDIT_POSTthing_id
Get top postsREDDIT_GET_R_TOPsubreddit, time_filter, limit
Browse subredditREDDIT_GETsubreddit
Get post detailsREDDIT_RETRIEVE_REDDIT_POSTpost_id
Get specific commentREDDIT_RETRIEVE_SPECIFIC_COMMENTcomment_id
List post flairsREDDIT_LIST_SUBREDDIT_POST_FLAIRSsubreddit
Get user flairREDDIT_GET_USER_FLAIRsubreddit

Powered by Composio

Source

git clone https://github.com/davepoon/buildwithclaude/blob/main/plugins/all-skills/skills/reddit-automation/SKILL.mdView on GitHub

Overview

Automate Reddit tasks—search across subreddits, create posts, manage comments, and browse top content using Composio's Reddit toolkit via Rube MCP. Always fetch current schemas with RUBE_SEARCH_TOOLS before running workflows.

How This Skill Works

Connect to Rube MCP and verify tool schemas by calling RUBE_SEARCH_TOOLS, then establish an active Reddit connection with RUBE_MANAGE_CONNECTIONS. Core workflows run through specific tool sequences: search via REDDIT_SEARCH_ACROSS_SUBREDDITS, optionally list flairs with REDDIT_LIST_SUBREDDIT_POST_FLAIRS, create posts via REDDIT_CREATE_REDDIT_POST, manage comments with REDDIT_RETRIEVE_POST_COMMENTS / REDDIT_POST_REDDIT_COMMENT / REDDIT_EDIT_REDDIT_COMMENT_OR_POST / REDDIT_DELETE_REDDIT_COMMENT, and browse content via REDDIT_GET_R_TOP or REDDIT_GET.

When to Use It

  • You want to find posts across subreddits using a query.
  • You want to submit a new post to a subreddit.
  • You want to retrieve or manage comments on a post.
  • You want to view top or trending content from a subreddit.
  • You need to verify connectivity and fetch current tool schemas before workflows.

Quick Start

  1. Step 1: Verify RUBE_SEARCH_TOOLS responds to confirm tool schemas.
  2. Step 2: Call RUBE_MANAGE_CONNECTIONS with toolkit reddit and complete OAuth if required; ensure status is ACTIVE.
  3. Step 3: Run a workflow such as REDDIT_SEARCH_ACROSS_SUBREDDITS or REDDIT_CREATE_REDDIT_POST using the required parameters.

Best Practices

  • Always call RUBE_SEARCH_TOOLS first to fetch current tool schemas.
  • Verify RUBE_MANAGE_CONNECTIONS shows ACTIVE before running workflows.
  • If a subreddit requires flair, fetch flairs with REDDIT_LIST_SUBREDDIT_POST_FLAIRS before posting.
  • Be mindful of subreddit rules and rate limits; post times and limits vary.
  • Use after/before tokens for pagination and handle NSFW content per account settings.

Example Use Cases

  • Search Reddit across subreddits for 'AI startup' sorted by top in the past week.
  • Create a new text post in r/marketing with a specific flair.
  • Retrieve comments on a post and reply with a follow-up comment.
  • Browse top posts in a subreddit for the day with a limit to review trends.
  • Connect the Rube MCP, confirm RUBE_SEARCH_TOOLS returns schemas, then run a search to seed content ideas.

Frequently Asked Questions

Add this skill to your agents

Related Skills

Sponsor this space

Reach thousands of developers