본문으로 건너뛰기
cccskills
무료GitHub에 공개

reddit-researcher

Search and read public Reddit posts, subreddits, and comments via the unauthenticated JSON API. Safe read-only access with SSRF-prevention hostname allowlist.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Reddit
설치 방법 보기

포함된 파일(10)

  • SKILL.md8.6 KB
  • commands/reddit-researcher.md2.1 KB
  • hooks/post-execute.cjs1.1 KB
  • hooks/pre-execute.cjs4.3 KB
  • references/research-requirements.md1.3 KB
  • rules/reddit-researcher.md1.0 KB
  • schemas/input.schema.json1.1 KB
  • schemas/output.schema.json1.7 KB
  • scripts/main.cjs6.2 KB
  • templates/implementation-template.md336 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- Agent: nodejs-pro | Task: #7 | Session: 2026-03-09 -->

Reddit Researcher Skill

Purpose

Fetch and analyze public Reddit content without authentication using the Reddit public JSON API. Enables research agents to read subreddit posts, search Reddit globally or within a subreddit, and fetch individual post comments — all through the stable .json endpoint pattern.

No API key. No OAuth. No registration. Reddit's public JSON API is accessible anonymously for read-only operations.


When to Use

  • Researching community sentiment on a topic
  • Finding relevant discussions in a specific subreddit
  • Gathering examples, opinions, or use cases from Reddit
  • Monitoring a subreddit for recent posts
  • Fetching comments on a specific post for analysis

Iron Laws

  1. ALWAYS validate Reddit URLs against the allowlist before WebFetch — only reddit.com, www.reddit.com, and old.reddit.com are permitted; reject anything else to prevent SSRF attacks.
  2. ALWAYS append .json to Reddit URLs before fetching — never fetch HTML pages; the .json suffix returns structured data that can be parsed reliably.
  3. ALWAYS include a User-Agent header — Reddit blocks requests without a proper User-Agent; use agent-studio-reddit-researcher/1.0.
  4. NEVER make more than 10 WebFetch calls per minute — unauthenticated rate limit is 10 req/min; add 1-2 second delays for multi-call workflows; search endpoints are more restrictive (~3-5 req/min).
  5. NEVER write to Reddit — this skill is strictly read-only; no POST requests, no upvoting, no commenting, no authentication flows.

API Reference

EndpointDescriptionNotes
https://www.reddit.com/r/{sub}.jsonHot posts in subredditDefault sort: hot
https://www.reddit.com/r/{sub}/hot.jsonHot posts (explicit)
https://www.reddit.com/r/{sub}/new.jsonNew posts
https://www.reddit.com/r/{sub}/top.json?t=weekTop posts by timet=hour/day/week/month/year/all
https://www.reddit.com/r/{sub}/about.jsonSubreddit metadatasubscriber count, description
https://www.reddit.com/search.json?q={query}Global search
https://www.reddit.com/r/{sub}/search.json?q={query}&restrict_sr=1Subreddit-scoped search
https://www.reddit.com/r/{sub}/comments/{id}.jsonPost with commentsReturns array[2]: post + comments

Query Parameters:

  • limit — number of results (max 100, default 25; keep at 25 or less to stay within rate limits)
  • after / before — pagination cursors (t3_postid format)
  • t — time filter for /top: hour, day, week, month, year, all
  • restrict_sr=1 — restrict search to current subreddit

Required Headers:

User-Agent: agent-studio-reddit-researcher/1.0

SSRF Guard Pattern

Always validate URLs using new URL().hostname before passing to WebFetch. Do not use regex or string-contains matching — those fail on encoded URLs and normalization tricks.

const ALLOWED_REDDIT_HOSTS = new Set(['reddit.com', 'www.reddit.com', 'old.reddit.com']);

function validateRedditUrl(href) {
  let parsed;
  try {
    parsed = new URL(href);
  } catch {
    throw new Error('Invalid URL');
  }
  if (!['http:', 'https:'].includes(parsed.protocol)) {
    throw new Error('Only http/https allowed');
  }
  if (!ALLOWED_REDDIT_HOSTS.has(parsed.hostname)) {
    throw new Error(`Hostname ${parsed.hostname} not in allowlist`);
  }
  return parsed.href;
}

Additional blocks (OWASP-recommended):

  • Block file://, gopher://, dict:// schemes
  • Block 127.0.0.1, localhost, 0.0.0.0
  • Block 169.254.169.254 (AWS/cloud metadata endpoint)

Rate Limit Guidance

Endpoint TypeLimitNotes
General listing endpoints10 req/minRolling window
Search endpoints~3-5 req/minMore restrictive
WebFetch built-in cache15-min TTLRepeated calls to same URL are free

Safe multi-call pattern: Add 1-2 second delays between calls. Use limit=25 to get enough results per call without needing rapid pagination.


Response Structure

Post listing (data.children[].data):

{
  "id": "abc123",
  "title": "Post title here",
  "selftext": "Post body text",
  "url": "https://www.reddit.com/r/sub/comments/abc123/...",
  "author": "username",
  "score": 42,
  "num_comments": 10,
  "created_utc": 1234567890,
  "subreddit": "subredditname"
}

Comments response: Array of two elements — [0] is the post, [1] is the comment tree.


Usage Examples

Search a subreddit for a topic

Invoke: WebFetch
URL: https://www.reddit.com/r/MachineLearning/search.json?q=transformer+architecture&restrict_sr=1&limit=10
Headers: User-Agent: agent-studio-reddit-researcher/1.0

Get hot posts from a subreddit

Invoke: WebFetch
URL: https://www.reddit.com/r/programming/hot.json?limit=25
Headers: User-Agent: agent-studio-reddit-researcher/1.0

Fetch a specific post with comments

Invoke: WebFetch
URL: https://www.reddit.com/r/programming/comments/abc123.json
Headers: User-Agent: agent-studio-reddit-researcher/1.0

Global Reddit search

Invoke: WebFetch
URL: https://www.reddit.com/search.json?q=claude+code+agent&limit=25
Headers: User-Agent: agent-studio-reddit-researcher/1.0

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Fetching reddit.com without .json suffixReturns HTML, not structured dataAlways append .json to the URL path
Using regex to validate URLsFails on encoded/normalized URLs; SSRF bypass possibleUse new URL(href).hostname and check against allowlist Set
No User-Agent headerReddit blocks anonymous requests; returns 429 or HTMLAlways include User-Agent: agent-studio-reddit-researcher/1.0
Rapid successive requests (>10/min)Rate limit triggers 429 responsesAdd 1-2s delays; use limit=100 to reduce call count
Attempting write operationsReddit's public JSON API is read-only without OAuthUse only GET endpoints; never attempt POST/PUT/DELETE

Enforcement Hooks

  • Pre-execute (hooks/pre-execute.cjs): Validates input schema (AJV) and checks SSRF allowlist on any url field. Exits with code 2 on violation (fail-closed).
  • Post-execute (hooks/post-execute.cjs): Emits observability event via send-event.cjs. Fails open (exit 0) on error to avoid blocking skill execution.

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing:

  • New Reddit API pattern -> .claude/context/memory/learnings.md
  • Issue found (rate limit, API change) -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

ASSUME INTERRUPTION: If it is not in memory, it did not happen.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio432026년 7월 14일 업데이트

oimiragieo의 스킬 모두 보기

이 스킬의 문제 신고