mcpField
R
reddit

reddit

github.com/resciencelab生产力1.9k3.4k 次安装今天更新
代码仓库

关于 reddit

reddit 是通过 Reddit 公共 JSON API 获取帖子、评论、版块信息和用户资料的技能,适用于无需 API 密钥认证的 Reddit 数据检索与研究。

主要功能

  1. 01按排序和时间获取版块帖子
  2. 02搜索帖子并按版块筛选
  3. 03获取帖子详情和评论
  4. 04查看版块信息
  5. 05获取用户资料及近期帖子

适用场景

  1. 01研究某个主题的讨论
  2. 02跟踪特定版块中的帖子
  3. 03查看帖子及其评论
  4. 04检查 Reddit 用户近期动态

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/resciencelab/opc-skills --skill reddit

安装后在 Claude Code 中输入/reddit确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.claude-plugin/
plugin.json
scripts/
credential.py
get_post.py
get_posts.py
get_subreddit.py
get_user.py
reddit_api.py
search_posts.py

详细介绍

Reddit 技能

通过公共 JSON API 获取 Reddit 帖子、评论、subreddit 信息和用户资料。

前提条件

无需 API 密钥! Reddit 公共 JSON API 无需身份验证即可使用。

快速检查:

cd <skill_directory>
python3 scripts/get_posts.py python --limit 3

命令

所有命令均在技能目录中运行。

Subreddit 帖子
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
搜索帖子
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 信息
python3 scripts/get_subreddit.py python
python3 scripts/get_subreddit.py ClaudeAI
帖子与评论
python3 scripts/get_post.py abc123                       # Get post by ID
python3 scripts/get_post.py abc123 --comments 50         # With more comments
用户资料
python3 scripts/get_user.py spez
python3 scripts/get_user.py spez --posts 10              # Include recent posts

排序选项

排序方式说明时间选项
hot热门帖子(默认)-
new最新帖子-
top得票最高hour、day、week、month、year、all
rising热度上升中-
controversial票数分歧较大hour、day、week、month、year、all

API 信息

  • 方法:公共 JSON API(无需身份验证)
  • 技巧:在任意 Reddit URL 后追加 .json
  • 速率限制:每分钟 100 次请求
  • 文档:https://www.reddit.com/dev/api

评论

支持 Markdown