agentleFS
abhaylaabhayla/claude-best-practices/.claude/skills/reddit/SKILL.md

reddit

Skill9 starsChanged 7 months agoMITView on GitHub

Manage Reddit interactions: read posts and threads, compose posts and comments, analyze sentiment and consensus, post via API, search and discover, score viral potential, monitor keywords and subreddits, plan content strategy, and moderate communities. Use when interacting with Reddit for reading, posting, analyzing, or monitoring.

  • Sends data out

26 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use TubeScribe, facebook and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AlekseiULSkill

    TubeScribe

    YouTube video summarizer with speaker detection, formatted documents, and audio output. Works out of the box with macOS built-in TTS. Optional recommended tools (pandoc, ffmpeg, mlx-audio) enhance quality. Requires internet for YouTube access. No paid APIs or subscriptions. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.

    Also in 3 projects that use this

  • refly-aiSkill

    facebook

    Integrate with Facebook for social media management. Use when you need to: (1) post updates to Facebook pages, (2) share content and media, or (3) automate Facebook page workflows.

    Also in 3 projects that use this

  • sigcliSkill

    bilibili

    Interact with Bilibili (B站) — browse trending videos, view video details, read comments, search videos and users, view user profiles, like, coin, and favorite videos. Use this skill whenever the user mentions Bilibili, B站, wants to browse Bilibili content, search Bilibili videos, read Bilibili comments, look up Bilibili users, or interact with Bilibili content. Also trigger when the user pastes a Bilibili URL (e.g. bilibili.com/video/BV...) or mentions a BV ID.

    Also in 3 projects that use this

  • GPTtangSkill

    deep-research-pro

    Multi-source deep research agent. Searches the web, synthesizes findings, and delivers cited reports. No API keys required.

    Also in 3 projects that use this

  • G-HunterAiSkill

    tiktok

    TikTok platform integration. Manage videos, view analytics, and track engagement.

    Also in 4 projects that use this

  • vanzan01Skill

    tweet-writer

    Format instructions for writing tweets.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Mode 1 (Read): no credential required — the fetch ladder handles it.

    line 59
  2. Very specific:

    Modes 2/3/4/8/9 (Compose/Analyze/Score/Monitor/Strategy): no OAuth credential required — read-only JSON endpoints suffice.

    line 63
  3. Very specific:

    If a required credential is missing: report every missing item in ONE list and ask the user to supply it now.

    line 65
  4. Distinctive:

    Use when Options A and B both fail with 403/blocked errors:

    line 124
  5. Distinctive:

    Search Reddit for posts, subreddits, and users.

    line 176
  6. Distinctive:

    When sharing content across multiple subreddits:

    line 365
  7. Distinctive:

    When asked to create AutoMod rules, generate valid YAML:

    line 455

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reddit Comprehensive Skill

Request: $ARGUMENTS


Determine which mode to use based on the user's request, then follow that section.


Prerequisites

  • Tools/CLIs: curl (all modes); jq (search/monitor JSON parsing); tmux + gemini CLI (Mode 1 Option C fallback only, when the JSON API and WebFetch both 403)
  • Credentials/env (mode-dependent):
    • Modes 5 (OAuth search), 6 (post/engage), 7 (karma), 10 (moderation) — REDDIT_CLIENT_ID, REDDIT_CLIENT_SECRET, REDDIT_USERNAME, REDDIT_PASSWORD
    • Mode 10 additionally requires the account to hold moderator permissions on the target subreddit
  • Services/network: reachable reddit.com JSON endpoints and oauth.reddit.com
  • User inputs & decisions: which mode to run (see body); explicit approval before any POST/DELETE call (CRITICAL RULE 1)
  • Declared fallback: Mode 1 read ladder — Reddit JSON API → WebFetch → Gemini CLI via tmux — legal, no mid-run user input needed

STEP 0: Preflight

Determine the mode from the request, then verify only what it needs:

  • Mode 1 (Read): no credential required — the fetch ladder handles it.
  • Modes 5/6/7/10 (OAuth-backed): confirm REDDIT_CLIENT_ID/REDDIT_CLIENT_SECRET/ REDDIT_USERNAME/REDDIT_PASSWORD are set and non-empty; Mode 10 also needs mod permissions on the target subreddit (check via the account-info endpoint).
  • Modes 2/3/4/8/9 (Compose/Analyze/Score/Monitor/Strategy): no OAuth credential required — read-only JSON endpoints suffice.
  • If a required credential is missing: report every missing item in ONE list and ask the user to supply it now. Modes 6/7/10 HARD-STOP without OAuth credentials — write/moderation actions cannot proceed on guesses.

MODE 1: READ POST / THREAD

Fetch any Reddit post, comment thread, or user profile as structured data.

Option A: Reddit JSON API (no auth required)

Append .json to any Reddit URL:

# Read a post + comments
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/comments/POST_ID/SLUG.json"

# Read a subreddit feed (hot/new/rising/top)
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/hot.json?limit=25"

# Read user profile
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/user/USERNAME/about.json"

# Read user's posts or comments
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/user/USERNAME/submitted.json?limit=25"

Response schema (post):

{
  "data": {
    "title": "Post title",
    "selftext": "Post body (markdown)",
    "author": "username",
    "subreddit": "subreddit_name",
    "score": 1234,
    "upvote_ratio": 0.95,
    "num_comments": 56,
    "created_utc": 1709856000,
    "url": "link or self URL",
    "link_flair_text": "Discussion",
    "is_self": true
  }
}

Option B: WebFetch (may get 403 — use Option A or C as fallback)

WebFetch: https://www.reddit.com/r/SUBREDDIT/comments/POST_ID/SLUG

Option C: Gemini CLI Fallback (when Reddit blocks requests)

Use when Options A and B both fail with 403/blocked errors:

# Pick a unique session name
SESSION="gemini_reddit_$(date +%s)"
tmux new-session -d -s $SESSION -x 200 -y 50
tmux send-keys -t $SESSION 'gemini -m gemini-3-pro-preview' Enter
sleep 3

# Send the Reddit query
tmux send-keys -t $SESSION 'Fetch and summarize this Reddit thread: URL_HERE' Enter
sleep 30
tmux capture-pane -t $SESSION -p -S -500

# Cleanup
tmux kill-session -t $SESSION

MODE 2: COMPOSE POST / COMMENT

Craft an optimized Reddit post or comment. Reddit has very different norms from Twitter — longer form, community-specific, anti-self-promotion.

Read: references/mode-2-compose-post-comment.md for detailed mode 2: compose post / comment reference material.

MODE 3: THREAD ANALYSIS

Analyze a Reddit thread for sentiment, consensus, key arguments, and discussion quality.

Read: references/mode-3-thread-analysis.md for detailed mode 3: thread analysis reference material.

Thread Analysis: "[Post Title]"

Subreddit: r/[name] | Comments: X | Score: X | Upvote Ratio: X%

Read: references/thread-analysis-post-title.md for detailed thread analysis: "[post title]" reference material.

MODE 4: VIRAL POTENTIAL SCORING

Score a Reddit post's viral potential using a 15-element system based on Reddit's ranking algorithm and community dynamics.

Read: references/mode-4-viral-potential-scoring.md for detailed mode 4: viral potential scoring reference material.

Score: XX/100 (Grade: X)

Read: references/score-xx100-grade-x.md for detailed score: xx/100 (grade: x) reference material.

MODE 5: SEARCH & DISCOVER

Search Reddit for posts, subreddits, and users.

Reddit JSON Search (no auth required)

# Search within a subreddit
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/search.json?q=QUERY&restrict_sr=on&sort=relevance&t=all&limit=25"

# Search all of Reddit
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/search.json?q=QUERY&sort=relevance&t=all&limit=25"

# Sort options: relevance, hot, top, new, comments
# Time filters (t=): hour, day, week, month, year, all

OAuth API Search (authenticated — more results, higher rate limits)

# Get OAuth token
TOKEN=$(curl -s -X POST "https://www.reddit.com/api/v1/access_token" \
  -u "$REDDIT_CLIENT_ID:$REDDIT_CLIENT_SECRET" \
  -d "grant_type=password&username=$REDDIT_USERNAME&password=$REDDIT_PASSWORD" \
  -H "User-Agent: ClaudeCode/1.0" | jq -r '.access_token')

# Search with OAuth
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/r/SUBREDDIT/search?q=QUERY&restrict_sr=on&sort=top&t=month&limit=100"

Subreddit Discovery

# Find related subreddits
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/subreddits/search.json?q=TOPIC&limit=25"

# Get subreddit info
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/about.json"

# Subreddit rules
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/about/rules.json"

Analysis After Search

  • Sort results by engagement metrics (score, num_comments, upvote_ratio)
  • Identify top-performing content patterns in the subreddit
  • Extract common title formats, post lengths, and flair usage
  • Generate a content opportunity report

MODE 6: POST & ENGAGE

Post, comment, reply, and interact on Reddit. Requires OAuth credentials.

Read: references/mode-6-post-engage.md for detailed mode 6: post & engage reference material.

Comment on a post (thing_id = t3_POST_ID)

Reply to a comment (thing_id = t1_COMMENT_ID)

curl -s -X POST "https://oauth.reddit.com/api/comment"
-H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0"
-d "thing_id=THING_ID&text=COMMENT_MARKDOWN"


### Set Post Flair

```bash
# Get available flairs
curl -s "https://oauth.reddit.com/r/SUBREDDIT/api/link_flair_v2" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0"

# Apply flair
curl -s -X POST "https://oauth.reddit.com/r/SUBREDDIT/api/selectflair" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "link=t3_POST_ID&flair_template_id=FLAIR_ID"

Send Private Message

curl -s -X POST "https://oauth.reddit.com/api/compose" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "to=USERNAME&subject=SUBJECT&text=MESSAGE_MARKDOWN"

MODE 7: KARMA & ACCOUNT HEALTH

Analyze and grow Reddit account health.

Account Stats

# Get account info
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/api/v1/me"

# Get karma breakdown by subreddit
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/api/v1/me/karma"

Shadowban Detection

# Check if posts appear publicly
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/user/USERNAME/about.json"
# If 404 → account may be shadowbanned

# Check a specific post's visibility
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/new.json?limit=100" | jq '.data.children[].data.author' | grep USERNAME
# If your post doesn't appear → it may be filtered

MODE 8: KEYWORD & SUBREDDIT MONITORING

Track keywords, brand mentions, competitors, or topics across subreddits.

Real-Time Monitoring

# Monitor new posts mentioning a keyword
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/search.json?q=KEYWORD&sort=new&t=hour&limit=25"

# Monitor a subreddit's new posts
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/r/SUBREDDIT/new.json?limit=25"

# Monitor comments mentioning a keyword (via Pushshift alternative / search)
curl -s -H "User-Agent: ClaudeCode/1.0" \
  "https://www.reddit.com/search.json?q=KEYWORD&type=comment&sort=new&t=day&limit=50"

Monitoring Report Format

## Reddit Monitor: "KEYWORD"
Period: [date range]
Subreddits tracked: [list]
Total mentions: X (Posts: X, Comments: X)


**Read:** `references/reddit-monitor-keyword.md` for detailed reddit monitor: "keyword" reference material.

# Compare mention volume
for TERM in "my-product" "competitor-a" "competitor-b"; do
  echo "$TERM:"
  curl -s -H "User-Agent: ClaudeCode/1.0" \
    "https://www.reddit.com/search.json?q=$TERM&sort=new&t=month&limit=100" \
    | jq '.data.children | length'
  sleep 2
done

MODE 9: CONTENT STRATEGY & PLANNING

Generate a content plan optimized for Reddit's unique dynamics.

Read: references/mode-9-content-strategy-planning.md for detailed mode 9: content strategy & planning reference material.

Top posts of all time — understand what succeeds

curl -s -H "User-Agent: ClaudeCode/1.0"
"https://www.reddit.com/r/SUBREDDIT/top.json?t=all&limit=25"

Current hot posts — understand what's trending now

curl -s -H "User-Agent: ClaudeCode/1.0"
"https://www.reddit.com/r/SUBREDDIT/hot.json?limit=25"


Extract patterns for:
- Average title length and format
- Post type distribution (text vs. link vs. image)
- Common flairs and topics
- Posting frequency of top contributors
- Comment depth and discussion style

### Cross-Subreddit Strategy

When sharing content across multiple subreddits:
- **Stagger posts** by 24-48 hours — never post the same thing to 5 subreddits at once
- **Customize title and body** for each subreddit's norms
- **Avoid identical cross-posts** — Reddit's spam filter flags this
- **Prioritize** the most relevant subreddit first, then expand

## MODE 10: MODERATION

Manage subreddit moderation tasks. **Requires moderator permissions.**

### Moderation Actions

```bash
# Remove a post or comment
curl -s -X POST "https://oauth.reddit.com/api/remove" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=THING_ID&spam=false"

# Approve a post or comment
curl -s -X POST "https://oauth.reddit.com/api/approve" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=THING_ID"

# Distinguish a comment as moderator
curl -s -X POST "https://oauth.reddit.com/api/distinguish" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=THING_ID&how=yes&sticky=false"

# Sticky a post
curl -s -X POST "https://oauth.reddit.com/api/set_subreddit_sticky" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=t3_POST_ID&state=true&num=1"

# Lock a post or comment
curl -s -X POST "https://oauth.reddit.com/api/lock" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=THING_ID"

# Set suggested sort
curl -s -X POST "https://oauth.reddit.com/api/set_suggested_sort" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "id=t3_POST_ID&sort=new"

User Management

# Ban a user
curl -s -X POST "https://oauth.reddit.com/r/SUBREDDIT/api/friend" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "name=USERNAME&type=banned&ban_reason=REASON&duration=DAYS&note=MOD_NOTE&ban_message=MESSAGE_TO_USER"

# Unban a user
curl -s -X POST "https://oauth.reddit.com/r/SUBREDDIT/api/unfriend" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "name=USERNAME&type=banned"

# Mute a user (from modmail)
curl -s -X POST "https://oauth.reddit.com/r/SUBREDDIT/api/friend" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "name=USERNAME&type=muted"

# Set user flair
curl -s -X POST "https://oauth.reddit.com/r/SUBREDDIT/api/selectflair" \
  -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  -d "name=USERNAME&flair_template_id=FLAIR_ID"

Moderation Queue

# Get modqueue (reported/flagged items)
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/r/SUBREDDIT/about/modqueue.json?limit=100"

# Get unmoderated items
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/r/SUBREDDIT/about/unmoderated.json?limit=100"

# Get mod log
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/r/SUBREDDIT/about/log.json?limit=100"

# Get reports
curl -s -H "Authorization: Bearer $TOKEN" -H "User-Agent: ClaudeCode/1.0" \
  "https://oauth.reddit.com/r/SUBREDDIT/about/reports.json?limit=100"

AutoModerator Rule Generation

When asked to create AutoMod rules, generate valid YAML:

# Example: Auto-remove posts with banned words
type: submission
title (includes, regex): ["spam_word", "banned_phrase"]
action: remove
action_reason: "Contains banned word: {{match}}"
comment: |
  Your post was removed because it contains a banned word.
  Please review the subreddit rules and resubmit.

Common AutoMod patterns:

  • Minimum account age / karma requirements
  • Flair enforcement (auto-remove unflaired posts)
  • Domain blacklisting
  • Keyword filtering with escalation (remove vs. flag for review)
  • Welcome messages for first-time posters
  • Scheduled recurring threads

CRITICAL RULES

  1. Confirm before posting — Always show the user what will be posted and get explicit approval before any POST/DELETE API call.
  2. Rate limit awareness — Add 2-4 second delays between write operations. Track API usage and warn before hitting limits.
  3. No credential exposure — Never log or display API keys, tokens, client secrets, or passwords.
  4. Respect subreddit rules — Always check subreddit rules before composing or posting. Flag potential violations.
  5. No vote manipulation — Never automate mass upvoting/downvoting. This violates Reddit's Content Policy and results in bans.
  6. No spam — Never post identical content to multiple subreddits simultaneously. Stagger and customize.
  7. Disclose AI assistance — If asked or if the subreddit requires it, note the content was AI-assisted.
  8. Score before posting — When composing, always run the viral scoring (Mode 4) and suggest improvements before posting.
  9. Humanize content — Always run AI-tell detection from Mode 2 before finalizing any post or comment.
  10. Thing ID prefixes matter — Always use the correct prefix (t1_ for comments, t3_ for posts) or API calls will silently fail.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.