| name | reddit-access |
| description | Access Reddit content via old.reddit.com HTML parsing without authentication. Use when you need to fetch Reddit posts, search subreddits, get post details with comments, or retrieve user posts. Triggers include "get Reddit posts", "search Reddit", "fetch from r/", "Reddit comments", "user posts on Reddit", when the user provides a Reddit URL starting with "https://www.reddit.com/r/" or "https://old.reddit.com/r/", or any task involving reading public Reddit content. |
reddit-access
Access Reddit content by parsing old.reddit.com HTML pages.
Prerequisites
- Python 3
- uv (dependencies are managed inline via script metadata)
Commands
Get subreddit posts
uv run ~/.agents/skills/reddit-access/scripts/reddit.py posts <subreddit> [limit] [sort]
subreddit: Subreddit name (without r/)
limit: Number of posts (default: 25, max: 100)
sort: Sort order - hot, new, top, rising (default: hot)
Example:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py posts python 10 hot
Output:
[
{
"id": "abc123",
"title": "Post title",
"author": "username",
"score": 42,
"num_comments": 15,
"url": "https://old.reddit.com/r/python/comments/abc123/...",
"created_utc": 1234567890
}
]
Get post details with comments
With post ID:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details <post_id> [subreddit]
With URL:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details <url>
post_id: Reddit post ID
subreddit: Optional subreddit name for faster lookup (when using post ID)
url: Full Reddit URL (new or old Reddit format)
Example with post ID:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details abc123 python
Example with new Reddit URL:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details "https://www.reddit.com/r/python/comments/abc123/post_title/"
Output:
{
"post": {
"title": "Post title",
"selftext": "Post content...",
"author": "username",
"score": 42
},
"comments": [
{
"author": "commenter",
"body": "Comment text",
"score": 10
}
]
}
Search within subreddit
uv run ~/.agents/skills/reddit-access/scripts/reddit.py search <subreddit> <query> [limit]
subreddit: Subreddit to search in
query: Search query
limit: Number of results (default: 25)
Example:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py search python "async await" 10
Get user posts
uv run ~/.agents/skills/reddit-access/scripts/reddit.py user <username> [limit]
username: Reddit username (without u/)
limit: Number of posts (default: 25)
Example:
uv run ~/.agents/skills/reddit-access/scripts/reddit.py user rewselab 10
Common Workflows
Read a Reddit post from URL
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details "https://www.reddit.com/r/python/comments/abc123/post_title/"
Read discussion
uv run ~/.agents/skills/reddit-access/scripts/reddit.py details abc123 python
Monitor trending topics
uv run ~/.agents/skills/reddit-access/scripts/reddit.py posts programming 15 hot
uv run ~/.agents/skills/reddit-access/scripts/reddit.py posts python 15 hot
uv run ~/.agents/skills/reddit-access/scripts/reddit.py posts MachineLearning 15 hot
Research a topic
uv run ~/.agents/skills/reddit-access/scripts/reddit.py search python "type hints" 20
uv run ~/.agents/skills/reddit-access/scripts/reddit.py search learnpython "type hints" 20
Track user activity
uv run ~/.agents/skills/reddit-access/scripts/reddit.py user username 25
Notes
- Parses
old.reddit.com HTML pages (no API key or auth required)
- Rate limiting: Be respectful, avoid rapid requests
- User-Agent is set to a browser string to avoid blocks
- All output is JSON format
- Dependencies managed inline via uv script metadata (beautifulsoup4)
- Works with public content only (no private subreddits or user data)
Error Handling
Errors are returned as JSON to stderr:
{
"error": "Error message"
}
Common errors:
- Subreddit not found (404)
- Post not found (404)
- Rate limited (429) - wait and retry
- Network timeout - retry with exponential backoff