Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
artwist-polyakov avatar

Reddit Skill

  • 11 installs
  • 177 repo stars
  • Updated May 10, 2026
  • artwist-polyakov/polyakov-claude-skills

reddit-skill is a Claude skill that gives direct Reddit API access over OAuth2 via shell scripts to read users, subreddits, posts, comments, and search, with optional gated write operations.

About

This skill provides direct Reddit API access over OAuth2 using shell scripts instead of PRAW, covering users, subreddits, posts, comments, and search. A developer uses it to read Reddit data (profiles, subreddit stats, top posts, search) and optionally to post or comment under a double safety gate. It is cache-first, auto-detects app-only versus user auth mode, and requires both REDDIT_ENABLE_WRITE=1 and --confirm before any write reaches Reddit. Documentation is primarily in Russian.

  • Direct Reddit API access via OAuth2 without PRAW
  • Read users, subreddits, posts, comments, and search; optional gated write operations
  • Cache-first with a double safety gate (REDDIT_ENABLE_WRITE=1 plus --confirm) on writes

Reddit Skill by the numbers

  • 11 all-time installs (skills.sh)
  • Ranked #1,469 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

reddit-skill capabilities & compatibility

Requires Reddit client id/secret and user agent; the Reddit API itself is free for this usage

Use cases
research · marketing · web search
Pricing
Bring your own API key
From the docs

What reddit-skill says it does

Прямой доступ к Reddit API через OAuth2 без PRAW.
SKILL.md
Без `REDDIT_ENABLE_WRITE=1` в `.env` write-скрипты **отказывают сразу** с понятной ошибкой
SKILL.md
npx skills add https://github.com/artwist-polyakov/polyakov-claude-skills --skill reddit-skill

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs11
repo stars177
Last updatedMay 10, 2026
Repositoryartwist-polyakov/polyakov-claude-skills

What it does

Access the Reddit API over OAuth2 to read users, subreddits, posts, and search, with optional double-gated writes.

Who is it for?

Developers who need to read Reddit data or post/comment programmatically with safety gates

When should I use this skill?

The user says 'reddit', 'reddit api', 'reddit subreddit', 'reddit search', or wants to parse Reddit posts and comments

What you get

Reddit user, subreddit, post, comment, and search data retrieved, with writes only after a double confirmation.

  • reddit read data (users, subreddits, posts, search)
  • optional gated posts and comments

By the numbers

  • 3-level write safety (env gate, dry-run, --confirm)
  • one retry on 429 if wait is under 60s

Files

SKILL.mdMarkdownGitHub ↗

reddit-skill

Прямой доступ к Reddit API через OAuth2 без PRAW. Порт MCP-сервера Arindam200/reddit-mcp на shell-скрипты по образцу yandex-metrika / yandex-search-api.

Config

Нужно зарегистрировать script-app на https://www.reddit.com/prefs/apps и заполнить config/.env. Подробная инструкция: config/README.md.

Минимум для read-only:

  • REDDIT_CLIENT_ID, REDDIT_CLIENT_SECRET
  • REDDIT_USER_AGENT (обязателен по правилам Reddit)

Для write/me дополнительно:

  • REDDIT_USERNAME, REDDIT_PASSWORD — владелец script-app (без 2FA)
  • REDDIT_ENABLE_WRITE=1 + --confirm на каждой write-команде

Philosophy

1. Cache-first — токен, юзеры, сабреддиты, листинги кешируются по детерминированному ключу. 2. Context window hygiene — stdout ≤ 30 строк, полный JSON в cache/listings/<hash>.json. 3. Auth auto-detect — если в .env есть REDDIT_USERNAME+REDDIT_PASSWORD, скилл идёт в user mode (grant_type=password); иначе — app-only (grant_type=client_credentials). 4. Двойная защита write — два уровня:

  • Без REDDIT_ENABLE_WRITE=1 в .env write-скрипты отказывают сразу с понятной ошибкой (никакого dry-run — это «ворота» уровня окружения).
  • С REDDIT_ENABLE_WRITE=1, но без --confirmdry-run: печатают что бы сделали, но не отправляют запрос.
  • Только при REDDIT_ENABLE_WRITE=1 и --confirm команда реально идёт на Reddit.

5. Rate-limit от заголовков — читаем x-ratelimit-remaining, x-ratelimit-reset, Retry-After. На 429 один retry если ожидание ≤ 60s.

Workflow

STOP! Перед любым запросом

1. Проверь, что credentials настроены:

   sh scripts/auth_check.sh

Должен вывести OK: app-only token works (или OK: user token works).

2. Если нужна write-операция:

  • Убедись, что в .env есть REDDIT_USERNAME+REDDIT_PASSWORD+REDDIT_ENABLE_WRITE=1

(без REDDIT_ENABLE_WRITE=1 команда сразу падает с ошибкой — это намеренно)

  • Сначала запусти команду без --confirm — увидишь dry-run
  • Только после ревью пользователя — добавляй --confirm

3. Имя сабреддита/юзера можно передавать с префиксом или без: r/pythonpython, u/spezspez.

Scripts

Auth & identity

ScriptEndpointModeDescription
auth_check.shGET /r/all/new?limit=1anySanity-check токена
me.shGET /api/v1/meuser onlyЛичный профиль (карма, имя)

Read

ScriptEndpointDescription
user_info.sh --username U/user/{u}/aboutПрофиль юзера
user_posts.sh --username U/user/{u}/submittedПосты юзера
user_comments.sh --username U/user/{u}/commentsКомментарии юзера
subreddit_info.sh --subreddit S/r/{s}/aboutМетаданные сабреддита
subreddit_stats.sh --subreddit S/r/{s}/about + /about/rules + /about/moderatorsРасширенные метрики + правила + модераторы
subreddit_popular.sh/subreddits/popularПопулярные сабреддиты (Reddit «trending»)
subreddit_top.sh --subreddit S/r/{s}/top (+ /comments/{id} per-post при --include-comments)Топ-посты сабреддита; опционально с комментариями к каждому
search.sh --query "..."/search или /r/{s}/searchПоиск по Reddit (опц. --subreddit)
submission.sh --id I или --url U/comments/{id}Пост + топ-комментарии

Общие read-флаги: --limit N, --no-cache, --time T (где применимо), --sort S (где применимо).

Write (опасные — двойной предохранитель)

ScriptEndpointDescription
`post_create.sh --subreddit S --title T (--content C \--url U)`POST /api/submit
comment_reply.sh --parent-id ID --content CPOST /api/commentОтветить на пост (t3_*) или комментарий (t1_*)
subreddit_subscribe.sh --subreddit S [--unsubscribe]POST /api/subscribeПодписка / отписка

Все write-команды требуют --confirm и REDDIT_ENABLE_WRITE=1 в .env. Поведение:

  • REDDIT_ENABLE_WRITE не установлен → отказ с ошибкой (envelope-уровень).
  • REDDIT_ENABLE_WRITE=1, но без --confirmdry-run (печать, без сети).
  • Оба условия выполнены → реальный POST.

Cache layout

cache/
├── token.json                  # OAuth access token + expires_at
├── users/<username>.json       # /user/{u}/about
├── subreddits/<sub>.json       # /r/{sub}/about
├── subreddits/<sub>.rules.json
├── subreddits/<sub>.moderators.json
├── listings/<hash>.json        # листинги (search, top, posts, comments, popular)
└── me.json                     # /api/v1/me

Поиск по кешу: grep -r "term" cache/ или rg "term" cache/.

Examples

# 1) Profile of a user
sh scripts/user_info.sh --username spez

# 2) Top posts in r/Python this week
sh scripts/subreddit_top.sh --subreddit python --time week --limit 25

# 3) Search "machine learning" in r/learnprogramming, sorted by new
sh scripts/search.sh --query "machine learning" --subreddit learnprogramming \
    --sort new --time month --limit 20

# 4) Open a submission by URL (with comments)
sh scripts/submission.sh \
    --url "https://www.reddit.com/r/Python/comments/abc123/some_title/" \
    --limit-comments 50

# 5) DRY-RUN of a comment reply (requires REDDIT_ENABLE_WRITE=1; without --confirm only prints)
REDDIT_ENABLE_WRITE=1 sh scripts/comment_reply.sh \
    --parent-id t3_abc123 --content "Looks great!"

# 6) Real reply (after dry-run review)
REDDIT_ENABLE_WRITE=1 sh scripts/comment_reply.sh \
    --parent-id t3_abc123 --content "Looks great!" --confirm

# 7) Top posts WITH comments per post (1 API call per post — use sparingly)
sh scripts/subreddit_top.sh --subreddit Python --time week --limit 5 \
    --include-comments --comments-per-post 25

Rate limits

Reddit OAuth: ~60 req/min для app-only, ~600/10min для user-mode (зависит от истории аккаунта). Скилл читает Reddit-специфичные заголовки x-ratelimit-* и стандартный Retry-After. На 429 делает один retry если ожидание ≤ 60s, иначе fail с понятной ошибкой.

Tests

sh scripts/tests/run.sh

No-network, проверяют:

  • парсинг submission URL → id
  • детерминированность cache_key
  • корректность авто-выбора режима auth
  • что write-команды без REDDIT_ENABLE_WRITE или без --confirm ничего не отправляют

Differences from upstream

Оригинальный reddit-mcp использует PRAW + Python и зашит как MCP-сервер. Здесь — shell-скрипты, прямые curl-запросы, кеш в директории скилла. AI-driven анализ (engagement insights, optimal posting time) намеренно перенесён на сторону Claude — он сам интерпретирует JSON в cache/.

Документация

Related skills

FAQ

How are Reddit writes protected?

By a double safety gate: writes fail without REDDIT_ENABLE_WRITE=1, run as a dry-run with the flag but no --confirm, and only reach Reddit with both the flag and --confirm.

Does reddit-skill use PRAW?

No. It accesses the Reddit API directly over OAuth2 using shell scripts, ported from the Arindam200/reddit-mcp server.

Automation & Workflowscontentdistribution

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.