Skip to content

heddaaibot-ops/reddit-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Reddit Skill for Claude Code

Browse, search, post, and moderate Reddit directly from your terminal or Claude Code agent.

๐ŸŒŸ Features

  • โœ… Browse subreddits - View posts from any subreddit
  • โœ… Search Reddit - Search across all Reddit or within specific subreddits
  • โœ… Hot/New/Top posts - Get trending and recent content
  • โœ… User profiles - View user info and recent posts
  • โœ… Comments - Read post comments
  • โœ… Trending subreddits - Discover what's popular
  • โœ… No auth required - Read-only features work out of the box
  • ๐Ÿ” OAuth support - Optional authentication for posting/moderation (future)

๐Ÿ“ฆ Installation

Quick Install

# Clone or download this skill
cd ~/.openclaw/skills  # or your skills directory
git clone https://github.com/YOUR_USERNAME/reddit-skill.git

# Or download directly
curl -o reddit.sh https://raw.githubusercontent.com/YOUR_USERNAME/reddit-skill/main/reddit.sh
chmod +x reddit.sh

Dependencies

  • curl - Required for API requests
  • jq - Required for JSON parsing

Install dependencies:

# macOS
brew install jq

# Ubuntu/Debian
sudo apt-get install jq curl

# Arch Linux
sudo pacman -S jq curl

๐Ÿš€ Usage

Basic Commands

Browse a subreddit:

./reddit.sh browse cryptocurrency 10
./reddit.sh browse wallstreetbets 5

Search Reddit:

./reddit.sh search "bitcoin prediction"
./reddit.sh search "AI agents" technology

Get hot posts:

./reddit.sh hot cryptocurrency
./reddit.sh hot  # Front page

Get new posts:

./reddit.sh new cryptocurrency

Get top posts:

./reddit.sh top cryptocurrency week
./reddit.sh top technology month
# Time periods: hour, day, week, month, year, all

View user profile:

./reddit.sh user deepfuckingvalue
./reddit.sh user spez

Read comments:

./reddit.sh comments "https://www.reddit.com/r/cryptocurrency/comments/xxxxx/post_title/"

Get trending subreddits:

./reddit.sh trending

Command Reference

Command Description Example
browse <subreddit> [limit] Browse posts from subreddit browse bitcoin 10
search <query> [subreddit] Search Reddit search "web3" technology
hot [subreddit] Get hot posts hot wallstreetbets
new [subreddit] Get new posts new cryptocurrency
top [subreddit] [time] Get top posts top bitcoin week
user <username> View user profile user vitalik
comments <post_url> Read post comments comments https://reddit.com/...
trending Get trending subreddits trending

๐Ÿ” Authentication (Optional)

For read-only access, no authentication is needed. The skill works out of the box!

For posting and moderation (future feature), you'll need Reddit OAuth credentials:

Setup OAuth App

  1. Go to https://www.reddit.com/prefs/apps
  2. Click "Create App" or "Create Another App"
  3. Fill in:
    • Name: Your app name (e.g., "My Reddit Skill")
    • App type: Select "script"
    • Description: Optional
    • About URL: Optional
    • Redirect URI: http://localhost:8080 (required but not used for script apps)
  4. Click "Create app"
  5. Note your client ID (under the app name) and secret

Set Environment Variables

export REDDIT_CLIENT_ID="your_client_id_here"
export REDDIT_CLIENT_SECRET="your_client_secret_here"
export REDDIT_USERNAME="your_reddit_username"
export REDDIT_PASSWORD="your_reddit_password"

Or add to your ~/.zshrc or ~/.bashrc:

echo 'export REDDIT_CLIENT_ID="your_client_id"' >> ~/.zshrc
echo 'export REDDIT_CLIENT_SECRET="your_secret"' >> ~/.zshrc
echo 'export REDDIT_USERNAME="your_username"' >> ~/.zshrc
echo 'export REDDIT_PASSWORD="your_password"' >> ~/.zshrc
source ~/.zshrc

๐Ÿ“ Examples

Monitor cryptocurrency discussions

./reddit.sh hot cryptocurrency

Research a topic across Reddit

./reddit.sh search "Polymarket predictions"

Track a specific user

./reddit.sh user VitalikButerin

Get top AI content this week

./reddit.sh top artificial week

Read discussion on a post

./reddit.sh comments "https://www.reddit.com/r/CryptoCurrency/comments/xyz123/bitcoin_reaches_new_ath/"

๐Ÿค– Use with Claude Code

This skill is designed to work seamlessly with Claude Code agents. You can:

  1. Direct execution: Claude can run commands directly
  2. Data extraction: Parse Reddit data for analysis
  3. Monitoring: Track subreddits for specific topics
  4. Research: Gather community sentiment and discussions

Example prompt to Claude:

"Use the reddit skill to browse r/cryptocurrency and summarize the top 5 posts about Bitcoin this week"

๐Ÿ› ๏ธ Advanced Usage

Create an alias for convenience

# Add to ~/.zshrc or ~/.bashrc
alias reddit='/path/to/reddit-skill/reddit.sh'

# Now you can use:
reddit hot bitcoin
reddit search "AI agents" technology

Pipe output to files

./reddit.sh top cryptocurrency week > crypto_top_posts.txt
./reddit.sh search "Polymarket" > polymarket_discussions.txt

Combine with other tools

# Search and count mentions
./reddit.sh search "Claude AI" | grep -c "Claude"

# Get hot posts and save as JSON
./reddit.sh hot technology | jq '.' > tech_posts.json

๐Ÿ“Š Output Format

Posts are displayed with:

  • ๐Ÿ“Œ Title
  • ๐Ÿ‘ค Author and karma
  • ๐Ÿ”บ Upvotes
  • ๐Ÿ’ฌ Comment count
  • ๐Ÿท๏ธ Subreddit
  • ๐Ÿ”— Link to post
  • ๐Ÿ“ Post text (truncated preview)

๐Ÿ” Use Cases

  • Market Research: Monitor cryptocurrency/trading discussions
  • Trend Analysis: Track emerging topics and sentiment
  • Community Monitoring: Follow specific subreddits for updates
  • User Research: Analyze user posting patterns
  • Content Discovery: Find trending content in your niche
  • Sentiment Analysis: Gather community opinions on topics

โš ๏ธ Rate Limits

Reddit API has rate limits:

  • Without auth: ~60 requests per minute
  • With OAuth: ~600 requests per minute

The skill respects Reddit's API guidelines and uses proper user agent strings.

๐Ÿค Contributing

Contributions welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Improve documentation

๐Ÿ“„ License

MIT License - See LICENSE file for details

๐Ÿ™ Credits

Created by Piggyx ๐Ÿฉต

Built for the Claude Code and OpenClaw community.

๐Ÿ“ฎ Support

Having issues? Open an issue on GitHub or reach out to the community!


Happy Redditing! ๐ŸŽ‰

About

Browse, search, and interact with Reddit from Claude Code. No auth required for read-only features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages