reddit-api

reddit-api is a skill for Claude Code from alinaqi/maggy. It costs 20 tokens per session (3,512 once invoked), scanned B, original, MIT.

A guide for using Reddit’s API with PRAW for Python or Snoowrap for Node.js. Reddit’s API lets applications read and work with posts, comments, communities, and user data.

In plain words
What is it for?
It helps fetch Reddit posts and comments, access subreddit data, and build applications or bots that interact with Reddit.
Why use it?
It explains authentication, credentials, and request limits so applications can connect to Reddit more reliably.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit It helps fetch Reddit posts and comments, access subreddit data, and build applications or bots that interact with Reddit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/reddit-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alinaqi/maggy --skill reddit-api
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reddit-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/reddit-api.svg)](https://agentmods.dev/skills/alinaqi/maggy/reddit-api)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/reddit-api"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/reddit-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,512 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 85
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 36
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 504
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 380
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.03512
Opus 5 $0.00010 $0.01756
Sonnet 5 $0.00004 $0.00702
Haiku 4.5 $0.00002 $0.00351

Measured 4d ago against content hash 799411567a5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

reddit-api scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const response = await fetch("https://www.reddit.com/api/v1/access_token", { method: "POST",
skills/reddit-api/SKILL.md · 592 lines

How it starts

The opening of the file, as written. The whole thing — 592 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reddit API Skill

For integrating Reddit data into applications - fetching posts, comments, subreddits, and user data.

Sources: Reddit API Docs | OAuth2 Wiki | PRAW Docs


Setup

1. Create Reddit 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
    • App type:
      • script - For personal use / bots you control
      • web app - For server-side apps with user auth
      • installed app - For mobile/desktop apps
    • Redirect URI: http://localhost:8000/callback (for dev)
  4. Note your client_id (under app name) and client_secret

2. Environment Variables

# .env
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USER_AGENT=YourApp/1.0 by YourUsername
REDDIT_USERNAME=your_username        # For script apps only
REDDIT_PASSWORD=your_password        # For script apps only

User-Agent Format: <platform>:<app_id>:<version> (by /u/<username>)


Rate Limits

Tier Limit Notes
OAuth authenticated 100 QPM Per OAuth client ID
Non-authenticated Blocked Must use OAuth
  • Limits averaged over 10-minute window
  • Include User-Agent header to avoid blocks
  • Respect X-Ratelimit-* response headers

Installation

pip install praw
# or
uv add praw

Script App (Personal Use / Bots)

import praw
from pydantic_settings import BaseSettings

class RedditSettings(BaseSettings):
    reddit_client_id: str
    reddit_client_secret: str
    reddit_user_agent: str
    reddit_username: str
    reddit_password: str

    class Config:
        env_file = ".env"

settings = RedditSettings()

reddit = praw.Reddit(
    client_id=settings.reddit_client_id,
    client_secret=settings.reddit_client_secret,
    user_agent=settings.reddit_user_agent,
    username=settings.reddit_username,
    password=settings.reddit_password,
)

# Verify authentication
print(f"Logged in as: {reddit.user.me()}")

Read the full file on GitHub · 592 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 592 lines · 20 tokens per session scan B 799411567a5a

Subscribe to this mod's changes

reddit-api is a skill published in the GitHub repository alinaqi/maggy (705 stars, last pushed 21d ago), licensed MIT. It adds 20 tokens to every session and 3,512 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

frappe-backend

Frappe backend guidance for Python and backend-adjacent JavaScript surfaces such as client interaction patterns, hooks, APIs, patches, scheduler logic, reports, and server-side review. Use when implementing or reviewing Frappe backend behavior.

Dkm0315/frappe-agent · 53 tokens

cross-sdk-parity

Keep TypeScript and Python SDK behavior, generated client usage, public API naming, and docs examples aligned. Use when a change affects both SDKs, when generated client pins move, when comparing TS/Python behavior, or when a backend API contract changed. Do not use for single-language internal-only changes.

ComposioHQ/composio · 66 tokens

backend-development

A general guide for building backend services, which are the server-side programs that handle data, business rules, and APIs. It switches between Python, Node.js, Go, and Java guidance based on the requested technology.

aAAaqwq/AGI-Super-Team · 151 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

django

Use when building, reviewing, securing, testing or shipping a Django app — models, migrations, QuerySets/managers, FBV/CBV views, forms, the admin, settings split, and Django REST Framework (serializers, ModelViewSet, permissions). NOT async FastAPI/Pydantic services (that is fastapi), NOT Postgres schema/index work…

ericrisco/rsc-harness · 84 tokens

python-programming-expert

Expert-level skill for Python programming (Python 3.13/3.14+). Covers type safety, generic syntax (PEP 695), async/await TaskGroups, FastAPI 0.115+, Pydantic v2, uv package manager, Ruff, and pytest in English and Indonesian.

roedyrustam/vibes-plug · 68 tokens