home / skills / openclaw / skills / reddit-read-only

This skill lets you browse Reddit in read-only mode, search posts, fetch comment threads, and generate a shortlist of permalinks.

npx playbooks add skill openclaw/skills --skill reddit-read-only

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.3 KB
---
name: reddit-readonly
description: >-
  Browse and search Reddit in read-only mode using public JSON endpoints.
  Use when the user asks to browse subreddits, search for posts by topic,
  inspect comment threads, or build a shortlist of links to review and reply to manually.
metadata: {"clawdbot":{"emoji":"๐Ÿ”Ž","requires":{"bins":["node"]}}}
---

# Reddit Readonly

Read-only Reddit browsing for Clawdbot.

## What this skill is for

- Finding posts in one or more subreddits (hot/new/top/controversial/rising)
- Searching for posts by query (within a subreddit or across all)
- Pulling a comment thread for context
- Producing a *shortlist of permalinks* so the user can open Reddit and reply manually

## Hard rules

- **Read-only only.** This skill never posts, replies, votes, or moderates.
- Be polite with requests:
  - Prefer small limits (5โ€“10) first.
  - Expand only if needed.
- When returning results to the user, always include **permalinks**.

## Output format

All commands print JSON to stdout.

- Success: `{ "ok": true, "data": ... }`
- Failure: `{ "ok": false, "error": { "message": "...", "details": "..." } }`

## Commands

### 1) List posts in a subreddit

```bash
node {baseDir}/scripts/reddit-readonly.mjs posts <subreddit> \
  --sort hot|new|top|controversial|rising \
  --time day|week|month|year|all \
  --limit 10 \
  --after <token>
```

### 2) Search posts

```bash
# Search within a subreddit
node {baseDir}/scripts/reddit-readonly.mjs search <subreddit> "<query>" --limit 10

# Search all of Reddit
node {baseDir}/scripts/reddit-readonly.mjs search all "<query>" --limit 10
```

### 3) Get comments for a post

```bash
# By post id or URL
node {baseDir}/scripts/reddit-readonly.mjs comments <post_id|url> --limit 50 --depth 6
```

### 4) Recent comments across a subreddit

```bash
node {baseDir}/scripts/reddit-readonly.mjs recent-comments <subreddit> --limit 25
```

### 5) Thread bundle (post + comments)

```bash
node {baseDir}/scripts/reddit-readonly.mjs thread <post_id|url> --commentLimit 50 --depth 6
```

### 6) Find opportunities (multi-subreddit helper)

Use this when the user describes criteria like:
"Find posts about X in r/a, r/b, and r/c posted in the last 48 hours, excluding Y".

```bash
node {baseDir}/scripts/reddit-readonly.mjs find \
  --subreddits "python,learnpython" \
  --query "fastapi deployment" \
  --include "docker,uvicorn,nginx" \
  --exclude "homework,beginner" \
  --minScore 2 \
  --maxAgeHours 48 \
  --perSubredditLimit 25 \
  --maxResults 10 \
  --rank new
```

## Suggested agent workflow

1. **Clarify scope** if needed: subreddits + topic keywords + timeframe.
2. Start with `find` (or `posts`/`search`) using small limits.
3. For 1โ€“3 promising items, fetch context via `thread`.
4. Present the user a shortlist:
   - title, subreddit, score, created time
   - permalink
   - a brief reason why it matched
5. If asked, propose *draft reply ideas* in natural language, but remind the user to post manually.

## Troubleshooting

- If Reddit returns HTML, re-run the command (the script detects this and returns an error).
- If requests fail repeatedly, reduce `--limit` and/or set slower pacing via env vars:

```bash
export REDDIT_RO_MIN_DELAY_MS=800
export REDDIT_RO_MAX_DELAY_MS=1800
export REDDIT_RO_TIMEOUT_MS=25000
export REDDIT_RO_USER_AGENT='script:clawdbot-reddit-readonly:v1.0.0 (personal)'
```

Overview

This skill provides read-only browsing and search of Reddit using public JSON endpoints. It helps find posts, inspect comment threads, and build shortlists of permalinks for manual review and reply. It never posts, votes, or performs any write actions.

How this skill works

The skill queries Redditโ€™s public JSON endpoints to list subreddit posts, run searches, and retrieve comment threads. Commands return structured JSON with success or error envelopes and always include permalinks for every result. Limits, sort, time ranges, depth, and pacing controls are available to keep requests polite and reliable.

When to use it

  • You want to find recent or top posts in one or more subreddits without logging in.
  • You need to search Reddit by keyword across a subreddit or all of Reddit.
  • You want full comment threads or a thread bundle (post + comments) for context before replying manually.
  • You need a shortlist of permalinks to review, curate, or manually respond to later.
  • You want to scan recent comments or find opportunities across multiple subreddits by filters.

Best practices

  • Start with small limits (5โ€“10) and expand only when necessary to reduce load and false positives.
  • Always include permalinks when presenting results so users can open Reddit and act manually.
  • Clarify scope up front: which subreddits, keywords, timeframe, and any excludes to apply.
  • Use the find helper for multi-subreddit discovery and rank by recency or score as appropriate.
  • If requests fail or return HTML, retry with smaller limits and longer pacing (adjust delay/timeouts via env vars).

Example use cases

  • List the top 10 posts in r/learnpython from the past week to collect resources and discussion links.
  • Search all of Reddit for mention of a product name and produce a shortlist of permalinks for monitoring sentiment.
  • Fetch a post plus its comment thread to gather context before drafting a manual reply.
  • Scan recent comments in a niche subreddit to identify conversational opportunities or unanswered questions.
  • Run a multi-subreddit find to locate posts matching include/exclude keywords within the last 48 hours and return the best 10 matches.

FAQ

Does this skill post or interact with Reddit accounts?

No. It is strictly read-only and will never post, reply, vote, or moderate.

What format do results use?

All commands output JSON: { "ok": true, "data": ... } on success, or { "ok": false, "error": { "message", "details" } } on failure.