$npx -y skills add ReScienceLab/opc-skills --skill redditSearch 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.
| 1 | # Reddit Skill |
| 2 | |
| 3 | Get posts, comments, subreddit info, and user profiles from Reddit via the public JSON API. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | **No API key required!** Reddit's public JSON API works without authentication. |
| 8 | |
| 9 | **Quick Check**: |
| 10 | ```bash |
| 11 | cd <skill_directory> |
| 12 | python3 scripts/get_posts.py python --limit 3 |
| 13 | ``` |
| 14 | |
| 15 | ## Commands |
| 16 | |
| 17 | All commands run from the skill directory. |
| 18 | |
| 19 | ### Subreddit Posts |
| 20 | ```bash |
| 21 | python3 scripts/get_posts.py python --limit 20 # Hot posts (default) |
| 22 | python3 scripts/get_posts.py python --sort new --limit 20 |
| 23 | python3 scripts/get_posts.py python --sort top --time week |
| 24 | python3 scripts/get_posts.py python --sort top --time all --limit 10 |
| 25 | ``` |
| 26 | |
| 27 | ### Search Posts |
| 28 | ```bash |
| 29 | python3 scripts/search_posts.py "AI agent" --limit 20 |
| 30 | python3 scripts/search_posts.py "MCP server" --subreddit ClaudeAI --limit 10 |
| 31 | python3 scripts/search_posts.py "async python" --sort top --time year |
| 32 | ``` |
| 33 | |
| 34 | ### Subreddit Info |
| 35 | ```bash |
| 36 | python3 scripts/get_subreddit.py python |
| 37 | python3 scripts/get_subreddit.py ClaudeAI |
| 38 | ``` |
| 39 | |
| 40 | ### Post & Comments |
| 41 | ```bash |
| 42 | python3 scripts/get_post.py abc123 # Get post by ID |
| 43 | python3 scripts/get_post.py abc123 --comments 50 # With more comments |
| 44 | ``` |
| 45 | |
| 46 | ### User Profile |
| 47 | ```bash |
| 48 | python3 scripts/get_user.py spez |
| 49 | python3 scripts/get_user.py spez --posts 10 # Include recent posts |
| 50 | ``` |
| 51 | |
| 52 | ## Sort Options |
| 53 | |
| 54 | | Sort | Description | Time Options | |
| 55 | |------|-------------|--------------| |
| 56 | | `hot` | Trending posts (default) | - | |
| 57 | | `new` | Latest posts | - | |
| 58 | | `top` | Highest voted | hour, day, week, month, year, all | |
| 59 | | `rising` | Gaining traction | - | |
| 60 | | `controversial` | Mixed votes | hour, day, week, month, year, all | |
| 61 | |
| 62 | ## API Info |
| 63 | - **Method**: Public JSON API (no auth needed) |
| 64 | - **Trick**: Append `.json` to any Reddit URL |
| 65 | - **Rate Limit**: 100 requests/minute |
| 66 | - **Docs**: https://www.reddit.com/dev/api |