Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

reddit-fetchReddit 获取

Agent Skill

reddit-fetch 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,108

周安装

252

GitHub Stars

8,003

下载量

1,996
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:reddit-fetch(Reddit 获取)
来源仓库:https://github.com/ykdojo/claude-code-tips
仓库路径:skills/reddit-fetch
安装命令:
npx skills add https://github.com/ykdojo/claude-code-tips --skill reddit-fetch
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/ykdojo/claude-code-tips --skill reddit-fetch

简介

reddit-fetch 用于查找、检索和筛选相关信息,支持基于关键词或场景定位内容。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要快速获取候选结果时使用。
  • 通过 GitHub 安装,结合来源仓库和 README 可进一步核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Reddit Fetch

Method 1: Gemini CLI (Try First)

Use Gemini CLI via tmux. It can browse, summarize, and answer complex questions about Reddit content.

Pick a unique session name (e.g., gemini_abc123) and use it consistently throughout.

Setup

tmux new-session -d -s <session_name> -x 200 -y 50
tmux send-keys -t <session_name> 'gemini -m gemini-3-pro-preview' Enter
sleep 3  # wait for Gemini CLI to load

Send query and capture output

tmux send-keys -t <session_name> 'Your Reddit query here' Enter
sleep 30  # wait for response (adjust as needed, up to 90s for complex searches)
tmux capture-pane -t <session_name> -p -S -500  # capture output

If the captured output shows an API error (e.g., quota exceeded, model unavailable), kill the session and retry without the -m flag (just gemini with no model argument). This falls back to the default model.

How to tell if Enter was sent

Look for YOUR QUERY TEXT specifically. Is it inside or outside the bordered box?

Enter NOT sent - your query is INSIDE the box:

╭─────────────────────────────────────╮
│ > Your actual query text here       │
╰─────────────────────────────────────╯

Enter WAS sent - your query is OUTSIDE the box, followed by activity:

> Your actual query text here

⠋ Our hamsters are working... (processing)

╭────────────────────────────────────────────╮
│ >   Type your message or @path/to/file     │
╰────────────────────────────────────────────╯

Note: The empty prompt Type your message or @path/to/file always appears in the box - that's normal. What matters is whether YOUR query text is inside or outside the box.

If your query is inside the box, run tmux send-keys -t <session_name> Enter to submit.

Cleanup when done

tmux kill-session -t <session_name>

If Gemini fails completely

If retrying without -m also fails, fall back to Method 2 below.


Method 2: curl with Reddit JSON API (Fallback)

Reddit's public JSON API works by appending .json to any Reddit URL. Use this when Gemini is unavailable (quota exhausted, API errors, etc.).

Listing hot/new/top posts

curl -s -L -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
  "https://old.reddit.com/r/SUBREDDIT/hot.json?limit=15"

Replace hot with new, top, or rising as needed. For top, add &t=day (or week, month, year, all).

Fetching a specific post + comments

curl -s -L -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
  "https://old.reddit.com/r/SUBREDDIT/comments/POST_ID.json?limit=20"

The response is a JSON array: [0] is the post, [1] is the comment tree.

Searching within a subreddit

curl -s -L -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
  "https://old.reddit.com/r/SUBREDDIT/search.json?q=QUERY&restrict_sr=on&sort=new&limit=15"

Parsing the JSON

Use jq to extract what you need:

# List posts
curl -s -L -o /tmp/reddit_result.txt -w "%{http_code}" \
  -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
  'https://old.reddit.com/r/SUBREDDIT/hot.json?limit=15'

jq -r '.data.children[] | .data | "\(.title)\n   \(.score) pts | \(.num_comments) comments | u/\(.author) | id: \(.id)\n"' /tmp/reddit_result.txt

# List comments from a specific post (the [1] element has comments)
jq -r '.[1].data.children[] | select(.kind == "t1") | .data | "u/\(.author) (\(.score) pts):\n  \(.body[:300])\n"' /tmp/reddit_thread.txt

Key details:

  • Fetch to temp file first, then parse - avoids pipe-related encoding issues
  • -o /tmp/file and -w "%{http_code}" saves the response and prints the HTTP status (useful for debugging empty responses)
  • -L follows redirects (old.reddit.com sometimes redirects)
  • Single-quoted URL avoids shell interpretation of & in query strings
  • .body[:300] truncates long comment bodies (jq 1.7+)

Rate limiting

Reddit's JSON API rate-limits aggressively:

  • Don't fire parallel requests. Make them sequentially with sleep 2 or sleep 3 between each.
  • If a request returns empty (0 bytes), wait 3-5 seconds and retry.
  • If you get HTTP 429, back off for 10-15 seconds.
  • A good pattern: fetch one search result listing, parse it, then fetch individual threads one at a time with delays.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.04%
按下载量换算540

Antigravity

25.7%
按下载量换算513

Codex

20.61%
按下载量换算411

OpenCode

13.59%
按下载量换算271

Cursor

7.68%
按下载量换算153

Gemini CLI

3.54%
按下载量换算71

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/ykdojo/claude-code-tips --skill reddit-fetch;npx skills add ykdojo/claude-code-tips --skill "reddit-fetch" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills