skills$openclaw/reddit
theglove442.0k

by theglove44

reddit – OpenClaw Skill

reddit is an OpenClaw Skills integration for security workflows. Browse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup.

2.0k stars5.4k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026security

Skill Snapshot

namereddit
descriptionBrowse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup. OpenClaw Skills integration.
ownertheglove44
repositorytheglove44/reddit
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @theglove44/reddit
last updatedFeb 7, 2026

Maintainer

theglove44

theglove44

Maintains reddit in the OpenClaw Skills directory.

View GitHub profile
File Explorer
5 files
.
scripts
reddit.mjs
16.1 KB
_meta.json
268 B
README.md
4.1 KB
SKILL.md
2.8 KB
SKILL.md

name: reddit description: Browse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup. metadata: {"clawdbot":{"emoji":"📣","requires":{"bins":["node"]}}}

Reddit

Browse, search, post to, and moderate subreddits. Read-only actions work without auth; posting/moderation requires OAuth setup.

Setup (for posting/moderation)

  1. Go to https://www.reddit.com/prefs/apps
  2. Click "create another app..."
  3. Select "script" type
  4. Set redirect URI to http://localhost:8080
  5. Note your client ID (under app name) and client secret
  6. Set environment variables:
    export REDDIT_CLIENT_ID="your_client_id"
    export REDDIT_CLIENT_SECRET="your_client_secret"
    export REDDIT_USERNAME="your_username"
    export REDDIT_PASSWORD="your_password"
    

Read Posts (no auth required)

# Hot posts from a subreddit
node {baseDir}/scripts/reddit.mjs posts wallstreetbets

# New posts
node {baseDir}/scripts/reddit.mjs posts wallstreetbets --sort new

# Top posts (day/week/month/year/all)
node {baseDir}/scripts/reddit.mjs posts wallstreetbets --sort top --time week

# Limit results
node {baseDir}/scripts/reddit.mjs posts wallstreetbets --limit 5

Search Posts

# Search within a subreddit
node {baseDir}/scripts/reddit.mjs search wallstreetbets "YOLO"

# Search all of Reddit
node {baseDir}/scripts/reddit.mjs search all "stock picks"

Get Comments on a Post

# By post ID or full URL
node {baseDir}/scripts/reddit.mjs comments POST_ID
node {baseDir}/scripts/reddit.mjs comments "https://reddit.com/r/subreddit/comments/abc123/..."

Submit a Post (requires auth)

# Text post
node {baseDir}/scripts/reddit.mjs submit yoursubreddit --title "Weekly Discussion" --text "What's on your mind?"

# Link post
node {baseDir}/scripts/reddit.mjs submit yoursubreddit --title "Great article" --url "https://example.com/article"

Reply to a Post/Comment (requires auth)

node {baseDir}/scripts/reddit.mjs reply THING_ID "Your reply text here"

Moderation (requires auth + mod permissions)

# Remove a post/comment
node {baseDir}/scripts/reddit.mjs mod remove THING_ID

# Approve a post/comment
node {baseDir}/scripts/reddit.mjs mod approve THING_ID

# Sticky a post
node {baseDir}/scripts/reddit.mjs mod sticky POST_ID

# Unsticky
node {baseDir}/scripts/reddit.mjs mod unsticky POST_ID

# Lock comments
node {baseDir}/scripts/reddit.mjs mod lock POST_ID

# View modqueue
node {baseDir}/scripts/reddit.mjs mod queue yoursubreddit

Notes

  • Read actions use Reddit's public JSON API (no auth needed)
  • Post/mod actions require OAuth - run login command once to authorize
  • Token stored at ~/.reddit-token.json (auto-refreshes)
  • Rate limits: ~60 requests/minute for OAuth, ~10/minute for unauthenticated
README.md

Reddit Skill for Clawdbot

Browse, search, post to, and moderate any subreddit from your agent.

Quick Start

Read-only (no setup needed):

node scripts/reddit.mjs posts news --limit 5
node scripts/reddit.mjs search all "breaking news"

Posting & Moderation (requires OAuth):

  1. Create a Reddit app at https://www.reddit.com/prefs/apps
  2. Set environment variables (see Setup below)
  3. Run node scripts/reddit.mjs login once to authorize

Setup for Posting/Moderation

1. Create a Reddit App

  1. Go to https://www.reddit.com/prefs/apps
  2. Scroll down and click "create another app..."
  3. Fill in:
    • name: anything (e.g., "clawdbot")
    • type: select script
    • redirect uri: http://localhost:8080/callback
  4. Click Create app
  5. Note your:
    • Client ID — the string under your app name
    • Client Secret — labeled "secret"

2. Set Environment Variables

Add these to your shell profile or Clawdbot's environment:

export REDDIT_CLIENT_ID="your_client_id"
export REDDIT_CLIENT_SECRET="your_client_secret"
export REDDIT_USERNAME="your_reddit_username"
export REDDIT_PASSWORD="your_reddit_password"

3. Authorize (One Time)

node scripts/reddit.mjs login

This opens a browser for OAuth. After authorizing, a token is saved to ~/.reddit-token.json and auto-refreshes.


Personalizing the Skill

The SKILL.md file tells your agent how to use this skill. You'll want to customize it for your setup:

Update the Examples

Replace the generic subreddit names (wallstreetbets, yoursubreddit) with the ones you actually use:

# Before
node {baseDir}/scripts/reddit.mjs posts wallstreetbets

# After
node {baseDir}/scripts/reddit.mjs posts mysubreddit

Add Your Subreddits to the Notes

At the bottom of SKILL.md, add a section listing your subreddits:

## My Subreddits

- **r/mysubreddit** — I'm a mod here (full access)
- **r/interestingtopic** — I follow this one
- **r/anotherone** — Read-only

This helps your agent know what it can do where.

Customize the User-Agent (Optional)

In scripts/reddit.mjs, you can personalize the User-Agent string:

// Find this line near the top:
const USER_AGENT = 'script:clawdbot-reddit:v1.0.0';

// Change to something like:
const USER_AGENT = 'script:my-reddit-bot:v1.0.0 (by /u/your_username)';

Reddit recommends including your username so they can contact you if needed.


Commands Reference

CommandAuth RequiredDescription
posts <subreddit>NoGet hot/new/top posts
search <subreddit|all> <query>NoSearch posts
comments <post_id>NoGet comments on a post
submit <subreddit> --title "..." --text "..."YesCreate a text post
submit <subreddit> --title "..." --url "..."YesCreate a link post
reply <thing_id> "text"YesReply to a post or comment
mod remove <thing_id>Yes + ModRemove post/comment
mod approve <thing_id>Yes + ModApprove post/comment
mod sticky <post_id>Yes + ModSticky a post
mod queue <subreddit>Yes + ModView mod queue
loginStart OAuth flow
whoamiYesCheck logged-in user

Options

  • --sort hot|new|top|controversial — Sort order for posts
  • --time day|week|month|year|all — Time filter for top/controversial
  • --limit N — Number of results (default: 25)

Rate Limits

  • With OAuth: ~60 requests/minute
  • Without OAuth: ~10 requests/minute

The skill handles token refresh automatically.


Troubleshooting

"Missing REDDIT_CLIENT_ID or REDDIT_CLIENT_SECRET"
→ Environment variables aren't set. Check your shell profile or Clawdbot config.

"Not logged in. Run: node reddit.mjs login"
→ You need to authorize first. Run the login command.

"Reddit returned HTML instead of JSON"
→ Reddit sometimes does this under load. Wait a moment and try again.

Token file location: ~/.reddit-token.json
→ Delete this file to force re-authorization.


License

MIT — do whatever you want with it.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

```bash

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install reddit?

Run openclaw add @theglove44/reddit in your terminal. This installs reddit into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/theglove44/reddit. Review commits and README documentation before installing.