npx skills add https://github.com/boshu2/agentops --skill pr-research在贡献前系统性地探索上游代码库。
研究外部代码库,以了解如何进行有效贡献。这是在规划或实施开源贡献之前的第一步。
使用时机:
不应使用的时机:
$research)-1. 检查先前工作 -> 阻塞性步骤:检查现有 issue/PR
0. CONTRIBUTING.md -> 强制性步骤:查找贡献指南
1. 仓库设置 -> 克隆/识别上游仓库
2. 指南分析 -> 模板,CODE_OF_CONDUCT
3. PR 考古学 -> 分析已合并的 PR,提交模式
4. 维护者研究 -> 响应模式,审查期望
5. 发现 Issue -> 寻找贡献机会
6. 输出 -> 撰写研究文档
关键:在进行任何研究之前,检查是否已经有人在处理此问题。
# 搜索关于此主题的开放 issue
gh issue list -R <owner/repo> --state open --search "<topic keywords>" --limit 20
# 搜索可能解决此问题的开放 PR
gh pr list -R <owner/repo> --state open --search "<topic keywords>" --limit 20
# 检查最近合并的 PR(可能已修复)
gh pr list -R <owner/repo> --state merged --search "<topic keywords>" --limit 10
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 发现情况 | 行动 |
|---|---|
| 存在开放 issue | 链接到它,不要创建重复项 |
| 存在开放 PR | 不要重复工作 |
| 最近合并的 PR | 验证修复,无需工作 |
| 未发现先前工作 | 进入阶段 0 |
关键:未找到贡献指南前,请勿继续。
# 检查所有常见位置
cat CONTRIBUTING.md 2>/dev/null
cat .github/CONTRIBUTING.md 2>/dev/null
cat docs/CONTRIBUTING.md 2>/dev/null
# 检查 README 中的贡献部分
grep -i "contribut" README.md | head -10
| 要求 | 查找位置 |
|---|---|
| 提交格式 | "提交信息" 部分 |
| PR 流程 | "拉取请求" 部分 |
| 测试要求 | "测试" 部分 |
| 代码风格 | "风格" 部分 |
| CLA/DCO | "法律" 或 "许可证" 部分 |
关键:了解成功的 PR 是什么样的。
# 列出最近合并的 PR
gh pr list --state merged --limit 20
# 最近的提交风格
git log --oneline -30 | head -20
# 检查是否使用约定式提交
git log --oneline -30 | grep -E "^[a-f0-9]+ (feat|fix|docs|refactor|test|chore)(\(.*\))?:"
| 规模 | 文件数 | 代码行数 | 接受可能性 |
|---|---|---|---|
| 小 | 1-3 | <100 | 高 |
| 中 | 4-10 | 100-500 | 中等 |
| 大 | 10+ | 500+ | 需要先讨论 |
# 查找适合初学者的 issue
gh issue list --label "good first issue" --state open
gh issue list --label "help wanted" --state open
# 查找未分配负责人的 issue
gh issue list --state open --json assignees,title,number | \
jq -r '.[] | select(.assignees | length == 0) | "#\(.number): \(.title)"' | head -10
写入 .agents/research/YYYY-MM-DD-pr-{repo-slug}.md
# PR 研究:{repo-name}
## 执行摘要
{2-3 句话:项目健康状况,贡献友好度}
## 贡献指南
| 文档 | 状态 | 关键要求 |
|----------|--------|------------------|
| CONTRIBUTING.md | 存在/缺失 | {摘要} |
| PR 模板 | 存在/缺失 | {必填部分} |
## PR 模式
- **平均规模**:X 个文件,Y 行
- **提交风格**:{约定式/祈使式/其他}
- **审查时间**:约 X 天
## 贡献机会
| Issue | 类型 | 难度 |
|-------|------|------------|
| #N | bug/feat | easy/medium |
## 后续步骤
-> `$pr-plan .agents/research/YYYY-MM-DD-pr-{repo}.md`
| 不要 | 应该这样做 |
|---|---|
| 跳过指南检查 | 始终先阅读 CONTRIBUTING.md |
| 忽略 PR 模式 | 研究成功的已合并 PR |
| 从大型 PR 开始 | 从小的、专注的更改开始 |
$pr-research <repo> -> $pr-plan <research> -> implement -> $pr-prep
用户说: "在我提出修复之前,为 owner/repo 做 PR 研究。"
会发生什么:
用户说: "在这个仓库里找一些小型的入门贡献选项。"
会发生什么:
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 未找到贡献指南 | 仓库缺少标准文件 | 从已合并的 PR 历史记录和维护者评论中推断惯例 |
| 可能的 issue 太多 | 范围未受限制 | 按标签、组件路径和最近的维护者活动进行筛选 |
| 建议的工作似乎有风险 | 存在隐藏依赖或影响范围过大 | 缩小范围至更窄的文件/领域边界,并重新陈述假设 |
| 输出过于笼统 | 仓库证据不足 | 添加具体的文件/PR 引用和明确的模式发现 |
每周安装数
128
仓库
GitHub 星标数
197
首次出现
2026年2月18日
安全审计
安装于
opencode128
gemini-cli125
github-copilot125
codex125
kimi-cli125
amp125
Systematic exploration of upstream repositories before contributing.
Research an external codebase to understand how to contribute effectively. This is the FIRST step before planning or implementing an open source contribution.
When to Use :
When NOT to Use :
$research)-1. Prior Work Check -> BLOCKING: Check for existing issues/PRs
0. CONTRIBUTING.md -> MANDATORY: Find contribution guidelines
1. Repository Setup -> Clone/identify upstream repo
2. Guidelines Analysis -> Templates, CODE_OF_CONDUCT
3. PR Archaeology -> Analyze merged PRs, commit patterns
4. Maintainer Research -> Response patterns, review expectations
5. Issue Discovery -> Find contribution opportunities
6. Output -> Write research document
CRITICAL : Before ANY research, check if someone is already working on this.
# Search for open issues on this topic
gh issue list -R <owner/repo> --state open --search "<topic keywords>" --limit 20
# Search for open PRs that might address this
gh pr list -R <owner/repo> --state open --search "<topic keywords>" --limit 20
# Check for recently merged PRs (might already be fixed)
gh pr list -R <owner/repo> --state merged --search "<topic keywords>" --limit 10
| Finding | Action |
|---|---|
| Open issue exists | Link to it, don't create duplicate |
| Open PR exists | Don't duplicate work |
| Recently merged PR | Verify fix, no work needed |
| No prior work found | Proceed to Phase 0 |
CRITICAL : Do not proceed without finding contribution guidelines.
# Check all common locations
cat CONTRIBUTING.md 2>/dev/null
cat .github/CONTRIBUTING.md 2>/dev/null
cat docs/CONTRIBUTING.md 2>/dev/null
# Check README for contribution section
grep -i "contribut" README.md | head -10
| Requirement | Where to Find |
|---|---|
| Commit format | "Commit messages" section |
| PR process | "Pull Requests" section |
| Testing requirements | "Testing" section |
| Code style | "Style" section |
| CLA/DCO | "Legal" or "License" section |
CRITICAL : Understand what successful PRs look like.
# List recent merged PRs
gh pr list --state merged --limit 20
# Recent commit style
git log --oneline -30 | head -20
# Check for conventional commits
git log --oneline -30 | grep -E "^[a-f0-9]+ (feat|fix|docs|refactor|test|chore)(\(.*\))?:"
| Size | Files | Lines | Likelihood |
|---|---|---|---|
| Small | 1-3 | <100 | High acceptance |
| Medium | 4-10 | 100-500 | Moderate |
| Large | 10+ | 500+ | Needs discussion first |
# Find beginner-friendly issues
gh issue list --label "good first issue" --state open
gh issue list --label "help wanted" --state open
# Issues with no assignee
gh issue list --state open --json assignees,title,number | \
jq -r '.[] | select(.assignees | length == 0) | "#\(.number): \(.title)"' | head -10
Write to .agents/research/YYYY-MM-DD-pr-{repo-slug}.md
# PR Research: {repo-name}
## Executive Summary
{2-3 sentences: project health, contribution friendliness}
## Contribution Guidelines
| Document | Status | Key Requirements |
|----------|--------|------------------|
| CONTRIBUTING.md | Present/Missing | {summary} |
| PR Template | Present/Missing | {required sections} |
## PR Patterns
- **Average size**: X files, Y lines
- **Commit style**: {conventional/imperative/etc}
- **Review time**: ~X days
## Contribution Opportunities
| Issue | Type | Difficulty |
|-------|------|------------|
| #N | bug/feat | easy/medium |
## Next Steps
-> `$pr-plan .agents/research/YYYY-MM-DD-pr-{repo}.md`
| DON'T | DO INSTEAD |
|---|---|
| Skip guidelines check | Always read CONTRIBUTING.md first |
| Ignore PR patterns | Study successful merged PRs |
| Start with large PRs | Begin with small, focused changes |
$pr-research <repo> -> $pr-plan <research> -> implement -> $pr-prep
User says: "Do PR research for owner/repo before I propose a fix."
What happens:
User says: "Find small starter contribution options in this repo."
What happens:
| Problem | Cause | Solution |
|---|---|---|
| No contribution guide found | Repo lacks standard files | Infer conventions from merged PR history and maintainers' comments |
| Too many possible issues | Scope not constrained | Filter by labels, component paths, and recent maintainer activity |
| Suggested work seems risky | Hidden dependency or broad blast radius | Downscope to narrower file/domain boundary and restate assumptions |
| Output is too generic | Insufficient repository evidence | Add concrete file/PR references and explicit pattern findings |
Weekly Installs
128
Repository
GitHub Stars
197
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketFailSnykWarn
Installed on
opencode128
gemini-cli125
github-copilot125
codex125
kimi-cli125
amp125
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装