Reddit to PR
Scan Reddit for pain points, choose the most actionable issue, and prepare a fix proposal. Default to analysis-only. Only modify code, commit, push, or open a PR after explicit user approval.
Mode Detection
Use {baseDir} as the skill directory. Check whether {baseDir}/config.json exists.
- - If it does not exist, run Setup Mode.
- If it exists, run Execution Mode.
- If the user says setup or reconfigure, run Setup Mode even if config already exists.
Setup Mode
Ask setup questions one at a time, waiting for the answer before asking the next one.
Question 1: Target subreddits
Ask:
What subreddits should I monitor for user feedback? These should be communities where your users or potential users hang out.
Examples: INLINECODE2
Store as subreddits — array of strings without the r/ prefix.
Question 2: Product context
Ask:
Describe your product in 1–2 sentences. What does it do and who is it for? This helps me identify which complaints are relevant.
Store as productDescription.
Question 3: Repository
Ask:
What’s the path to your code repository? This is where I’ll create branches and PRs.
Examples: INLINECODE6
Store as repoPath.
Question 4: Search keywords
Ask:
What keywords should I look for in Reddit posts? These help filter for relevant complaints.
Examples: INLINECODE8
Store as keywords — array of strings.
Question 5: Execution mode
Ask:
Which mode should this use by default? Options: analyze, patch, pr. analyze only researches and proposes a fix. patch may edit locally after approval. pr may edit, commit, push, and open a PR after approval.
Store as mode.
Question 6: Schedule
Ask:
How often should I run this? Options: nightly, twice-daily, weekly, manual.
Store as schedule.
If schedule is not manual and mode is not analyze, tell the user scheduled runs should default to analyze until they explicitly approve a write-enabled workflow.
Question 7: Results destination
Ask:
Where should I post results when I find something? Options: proposal, slack, both.
Store as resultsDestination.
If the answer includes Slack, ask one follow-up:
What Slack destination should I use?
Use an OpenClaw channel id or canonical channel choice. Store it as slackTarget.
Save config
After all answers are collected, save {baseDir}/config.json with this shape:
CODEBLOCK0
Then tell the user: INLINECODE23
Scheduling
If schedule is not manual, help the user set up scheduling.
Scheduled runs must default to analyze mode unless the user explicitly reconfigures the skill for a write-enabled workflow and confirms they want that behavior.
For OpenClaw, recommend a cron entry like:
CODEBLOCK1
Cron expressions:
- -
nightly → INLINECODE28 - INLINECODE29 → INLINECODE30
- INLINECODE31 → INLINECODE32
Execution Mode
Load config from {baseDir}/config.json.
Execution mode must honor these safety defaults:
- -
mode=analyze: do not modify repository files - INLINECODE35 : local edits are allowed only after explicit user approval for the selected fix
- INLINECODE36 : local edits, commits, pushes, and PR creation are allowed only after explicit user approval for the selected fix
Credential expectations:
- - repository access is limited to the configured INLINECODE37
- local edits require filesystem access to that repo
- commits require git to be available in that repo
- pushes and PR creation require existing remote/auth tooling already configured in the environment
- this skill must not request, create, or install credentials on its own
Phase 1: Scan Reddit
For each subreddit in config:
- 1. Search the web for recent posts in the last 7 days using patterns like:
-
site:reddit.com/r/{subreddit} {keywords} {productDescription keywords}
-
site:reddit.com/r/{subreddit} "wish it could" OR "anyone know how to" OR "frustrated with" OR "why can't" OR "feature request"
- 2. Collect posts and comments that describe real pain points.
- Filter for relevance to the configured product.
- Prefer current, specific complaints over vague discussion.
Phase 2: Analyze and prioritize
From all findings:
- 1. Score each issue by:
-
frequency — how often the problem appears
-
severity — how frustrated users are
-
fixability — whether a concrete code fix is realistic
- 2. Pick the single best issue: the most fixable issue with meaningful user pain behind it.
- Document:
-
The complaint — direct quotes from Reddit users
-
The root cause — what is actually wrong or missing
-
The fix — the code change that would address it
-
Impact — how many users or threads indicate the pain
Phase 3: Self-evaluation and local run report
Before implementing the fix, always evaluate the run.
Rate the run from 0–10 based on:
- - Did the search find relevant complaints?
- How confident is the proposed fix?
- How efficient was the search?
Only report instruction problems as instruction problems. External blockers are still valid reasons for a low rating, but they are not flaws in the skill itself.
Write a local run report to {baseDir}/state/last-run.json with this shape:
CODEBLOCK2
If the environment does not permit file writes, include the same report content in your final output under a Local run report heading instead of sending it to any external service.
Do not send telemetry to external services from this skill.
Approval checkpoint
Before making any repository changes, present:
- - the selected Reddit complaint
- the proposed root cause
- the intended fix
- the files likely to change
- the tests you plan to run
- whether the current config permits patch-only work or full PR work
Do not modify files, create branches, commit, push, or open a PR until the user explicitly approves the selected fix.
If approval is not given, stop after analysis and save the proposal + local run report.
Phase 4: Implement fix
Only run this phase after explicit user approval.
- 1. Navigate to
repoPath. - Operate only inside that repository. Do not modify files outside
repoPath. - Create a branch named
fix/reddit-<short-description>-<date> if the approved mode requires edits. - Investigate the relevant code paths.
- Implement the smallest real fix that addresses the complaint.
- Add or update tests.
- Run relevant tests.
- Commit with:
CODEBLOCK3
Phase 5: Open PR
Only run this phase if mode=pr and the user explicitly approved PR creation for this fix.
Open a PR using this format.
Title
CODEBLOCK4
Body
CODEBLOCK5
Phase 6: Notify
If resultsDestination is proposal or both, include a concise local proposal summary in the final output even when no code was changed.
If resultsDestination includes Slack:
- - If
slackTarget exists, use OpenClaw messaging to send a short summary and PR link. - Do not send notifications to arbitrary webhooks from this skill.
Include:
- - the pain point
- the chosen fix
- the subreddit source
- the PR link
- any notable risk or follow-up
Guardrails
- - Do not claim Reddit evidence is strong if the signal is weak.
- Do not implement speculative product changes when the complaint is ambiguous.
- Prefer minimal, testable fixes over broad roadmap detours.
- Default to analysis-only unless the user explicitly approved a write-enabled run.
- Do not modify files, create branches, commit, push, or open a PR without an explicit approval step for the selected fix.
- Limit all repository access to the configured
repoPath; do not modify files outside that repo. - Do not change secrets, auth, billing, deployment, or infrastructure code unless the user explicitly approves that scope.
- If the repo path is missing, invalid, or inaccessible, stop after analysis and report that blocker.
- If no credible complaint is found, say so plainly instead of forcing a patch or PR.
- If opening a PR or sending a notification requires credentials or permissions that are missing, stop and report the exact blocker.
Reddit to PR
扫描 Reddit 寻找痛点,选择最可行的议题,并准备修复方案。默认仅进行分析。只有在用户明确批准后,才能修改代码、提交、推送或打开 PR。
模式检测
使用 {baseDir} 作为技能目录。检查 {baseDir}/config.json 是否存在。
- - 如果不存在,运行设置模式。
- 如果存在,运行执行模式。
- 如果用户说setup 或 reconfigure,即使配置已存在,也运行设置模式。
设置模式
逐一提出设置问题,等待回答后再问下一个。
问题 1:目标子版块
询问:
我应该监控哪些子版块来获取用户反馈?这些应该是你的用户或潜在用户活跃的社区。
示例:webdev, reactjs, programming
存储为 subreddits — 字符串数组,不带 r/ 前缀。
问题 2:产品背景
询问:
用 1-2 句话描述你的产品。它做什么,目标用户是谁?这有助于我判断哪些投诉是相关的。
存储为 productDescription。
问题 3:仓库
询问:
你的代码仓库路径是什么?我将在这里创建分支和 PR。
示例:/Users/you/projects/my-app
存储为 repoPath。
问题 4:搜索关键词
询问:
我应该查找 Reddit 帖子中的哪些关键词?这些有助于筛选相关投诉。
示例:slow, crash, bug, broken, error, annoying, doesnt work
存储为 keywords — 字符串数组。
问题 5:执行模式
询问:
默认使用哪种模式?选项:analyze, patch, pr。analyze 仅研究和提出修复方案。patch 可在批准后本地编辑。pr 可在批准后编辑、提交、推送并打开 PR。
存储为 mode。
问题 6:计划
询问:
我应该多久运行一次?选项:nightly, twice-daily, weekly, manual。
存储为 schedule。
如果 schedule 不是 manual 且 mode 不是 analyze,告知用户计划运行应默认使用 analyze 模式,直到他们明确批准启用写入的工作流。
问题 7:结果输出位置
询问:
当我找到结果时,应该将结果发布到哪里?选项:proposal, slack, both。
存储为 resultsDestination。
如果答案包含 Slack,询问一个后续问题:
我应该使用哪个 Slack 目标?
使用 OpenClaw 频道 ID 或规范的频道选择。存储为 slackTarget。
保存配置
收集完所有答案后,将 {baseDir}/config.json 保存为以下格式:
json
{
subreddits: [webdev, reactjs],
productDescription: ...,
repoPath: /path/to/repo,
keywords: [slow, crash, bug],
mode: analyze,
schedule: nightly,
resultsDestination: proposal,
slackTarget: null,
setupComplete: true,
setupDate: 2026-03-24
}
然后告知用户:设置完成!
计划设置
如果 schedule 不是 manual,帮助用户设置计划。
计划运行必须默认使用 analyze 模式,除非用户明确重新配置技能以启用写入工作流并确认他们希望该行为。
对于 OpenClaw,推荐类似以下的 cron 条目:
bash
openclaw cron add \
--name reddit-to-pr \
--cron \
--tz \
--session isolated \
--message 运行 reddit-to-pr 技能。
Cron 表达式:
- - nightly → 0 2
- twice-daily → 0 8,20
- weekly → 0 2 1
执行模式
从 {baseDir}/config.json 加载配置。
执行模式必须遵循以下安全默认值:
- - mode=analyze:不修改仓库文件
- mode=patch:仅在对所选修复方案获得用户明确批准后,才允许本地编辑
- mode=pr:仅在对所选修复方案获得用户明确批准后,才允许本地编辑、提交、推送和创建 PR
凭证要求:
- - 仓库访问仅限于配置的 repoPath
- 本地编辑需要对该仓库的文件系统访问权限
- 提交需要该仓库中可用的 git
- 推送和创建 PR 需要环境中已配置的现有远程/认证工具
- 此技能不得自行请求、创建或安装凭证
阶段 1:扫描 Reddit
对于配置中的每个子版块:
- 1. 使用以下模式搜索最近 7 天的帖子:
- site:reddit.com/r/{subreddit} {keywords} {productDescription keywords}
- site:reddit.com/r/{subreddit} wish it could OR anyone know how to OR frustrated with OR why cant OR feature request
- 2. 收集描述真实痛点的帖子和评论。
- 筛选与配置产品相关的部分。
- 优先选择当前、具体的投诉,而非模糊的讨论。
阶段 2:分析和优先级排序
从所有发现中:
- 1. 按以下标准对每个议题评分:
- frequency — 问题出现的频率
- severity — 用户的沮丧程度
- fixability — 是否有切实可行的代码修复方案
- 2. 选择最佳议题:最具可修复性且背后有显著用户痛点的议题。
- 记录:
-
投诉内容 — Reddit 用户的直接引用
-
根本原因 — 实际出错或缺失的内容
-
修复方案 — 解决该问题的代码更改
-
影响范围 — 有多少用户或帖子表明该痛点
阶段 3:自我评估和本地运行报告
在实施修复之前,始终评估运行情况。
根据以下标准对运行评分(0-10 分):
- - 搜索是否找到了相关投诉?
- 提出的修复方案有多自信?
- 搜索效率如何?
仅将指令问题报告为指令问题。外部障碍仍然是低评分的有效原因,但这不是技能本身的缺陷。
将本地运行报告写入 {baseDir}/state/last-run.json,格式如下:
json
{
skill: reddit-to-pr,
version: 0.1.2,
rating: 7,
success: true,
whatWorked: 在 r/webdev 中找到了 3 个相关的投诉帖子。,
whatFailed: 一个子版块产生了低信号结果。,
improvementIdea: 在深入分析之前缩小关键词匹配范围。,
adaptations: 优先使用投诉风格的措辞而非广泛的产品术语。,
errorSummary: null
}
如果环境不允许写入文件,则在最终输出中在 本地运行报告 标题下包含相同的报告内容,而不是将其发送到任何外部服务。
不要从此技能向外部服务发送遥测数据。
批准检查点
在进行任何仓库更改之前,呈现:
- - 选定的 Reddit 投诉
- 提出的根本原因
- 预期的修复方案
- 可能更改的文件
- 计划运行的测试
- 当前配置是否仅允许补丁工作或完整的 PR 工作
在用户明确批准所选修复方案之前,不要修改文件、创建分支、提交、推送或打开 PR。
如果未获得批准,则在分析后停止,并保存提案和本地运行报告。
阶段 4:实施修复
仅在获得用户明确批准后运行此阶段。
- 1. 导航到 repoPath。
- 仅在该仓库内操作。不要修改 repoPath 之外的文件。
- 如果批准的模式需要编辑,则创建一个名为 fix/reddit-<简短描述>-<日期> 的分支。
- 调查相关代码路径。
- 实施解决投诉的最小实际修复方案。
- 添加或更新测试。
- 运行相关测试。
- 提交,提交信息为:
text
fix: <描述>(来自 r/<子版块> 用户反馈)
阶段 5:打开 PR
仅当 mode=pr 且用户明确批准为此修复创建 PR 时运行此阶段。
使用以下格式打开 PR。
标题
text
fix: <修复方案的简短描述>
正文
markdown
用户痛点
{Reddit 用户的直接引用}
— u/{用户名} 在 r/{子版块}({点赞数} 赞,{评论数} 条评论)
[如果有更多引用]
根本原因
{实际导致问题的原因}
修复方案
{此 PR 更改的内容及原因}