# Reddit > Search and retrieve content from Reddit. Get posts, comments, subreddit info, and user profiles via the public JSON API. Use when user mentions Reddit, a subreddit, or r/ links. Source: https://skillsagentes.com/skills/resciencelab/opc-skills/reddit Repository: https://github.com/ReScienceLab/opc-skills Author: resciencelab License: Apache-2.0 Updated: hace 6 meses Context cost: 44 tok installed, 516 tok once triggered, 3.8k tok with every bundled file Bundle: 9 files, 15 KB Permissions requested: none declared ## Install ```bash npx -y skills add ReScienceLab/opc-skills --skill reddit --agent claude-code ``` ## What it does - Obtiene posts, comentarios, info de subreddits y perfiles de usuario de Reddit vía la API JSON pública - Busca posts por palabra clave, opcionalmente filtrando por subreddit - Ordena resultados por hot, new, top, rising o controversial con filtros de tiempo ## Use it when - El usuario menciona Reddit, un subreddit o enlaces r/ ## What triggers it - "Busca posts sobre 'MCP server' en r/ClaudeAI" - "Dame los posts top de la semana en r/python" - "Muéstrame el perfil del usuario spez en Reddit" ## Before you install - No requiere API key: usa la API JSON pública de Reddit sin autenticación. - Needs on PATH: python3 ## Files - .claude-plugin/plugin.json — 532 B - SKILL.md — 2 KB - scripts/credential.py — 303 B - scripts/get_post.py — 1 KB - scripts/get_posts.py — 1 KB - scripts/get_subreddit.py — 694 B - scripts/get_user.py — 1 KB - scripts/reddit_api.py — 6 KB - scripts/search_posts.py — 2 KB ## SKILL.md Reproduced verbatim from ReScienceLab/opc-skills under Apache-2.0. This section is the upstream document and is in English. # Reddit Skill Get posts, comments, subreddit info, and user profiles from Reddit via the public JSON API. ## Prerequisites **No API key required!** Reddit's public JSON API works without authentication. **Quick Check**: ```bash cd python3 scripts/get_posts.py python --limit 3 ``` ## Commands All commands run from the skill directory. ### Subreddit Posts ```bash python3 scripts/get_posts.py python --limit 20 # Hot posts (default) python3 scripts/get_posts.py python --sort new --limit 20 python3 scripts/get_posts.py python --sort top --time week python3 scripts/get_posts.py python --sort top --time all --limit 10 ``` ### Search Posts ```bash python3 scripts/search_posts.py "AI agent" --limit 20 python3 scripts/search_posts.py "MCP server" --subreddit ClaudeAI --limit 10 python3 scripts/search_posts.py "async python" --sort top --time year ``` ### Subreddit Info ```bash python3 scripts/get_subreddit.py python python3 scripts/get_subreddit.py ClaudeAI ``` ### Post & Comments ```bash python3 scripts/get_post.py abc123 # Get post by ID python3 scripts/get_post.py abc123 --comments 50 # With more comments ``` ### User Profile ```bash python3 scripts/get_user.py spez python3 scripts/get_user.py spez --posts 10 # Include recent posts ``` ## Sort Options | Sort | Description | Time Options | |------|-------------|--------------| | `hot` | Trending posts (default) | - | | `new` | Latest posts | - | | `top` | Highest voted | hour, day, week, month, year, all | | `rising` | Gaining traction | - | | `controversial` | Mixed votes | hour, day, week, month, year, all | ## API Info - **Method**: Public JSON API (no auth needed) - **Trick**: Append `.json` to any Reddit URL - **Rate Limit**: 100 requests/minute - **Docs**: https://www.reddit.com/dev/api --- Skills Agentes — https://skillsagentes.com/skills/resciencelab/opc-skills/reddit