reddit について
redditは、Redditの公開JSON APIから投稿、コメント、サブレディット情報、ユーザープロフィールを取得するスキルです。APIキー認証なしでRedditのデータを調査する用途に向いています。
主な機能
- 01並べ替えや期間を指定した投稿取得
- 02サブレディットを指定した投稿検索
- 03投稿の詳細とコメントの取得
- 04サブレディット情報の表示
- 05ユーザープロフィールと最近の投稿取得
活用シーン
- 01特定テーマの議論を調査
- 02特定サブレディットの投稿を追跡
- 03投稿とコメントを確認
- 04Redditユーザーの最近の活動を確認
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ resciencelab/ opc-skills --skill redditインストール後、Claude Code で/redditを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
.claude-plugin/plugin.jsonscripts/credential.pyget_post.pyget_posts.pyget_subreddit.pyget_user.pyreddit_api.pysearch_posts.py詳細
Reddit スキル
公開 JSON API を使用して、Reddit の投稿、コメント、サブレディット情報、ユーザープロフィールを取得します。
前提条件
API キーは不要です! Reddit の公開 JSON API は認証なしで利用できます。
クイックチェック:
cd <skill_directory>
python3 scripts/get_posts.py python --limit 3
コマンド
すべてのコマンドはスキルディレクトリから実行します。
サブレディットの投稿
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
サブレディット情報
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を追加します - レート制限:1 分あたり 100 リクエスト
- ドキュメント:https://www.reddit.com/dev/api
コメント
Markdown 対応