mcpField
G
github-author-context

github-author-context

github.com/steipete开发7.4k89 次安装1 周前更新
代码仓库

关于 github-author-context

github-author-context 是用于 GitHub PR 审查的维护者背景调查技能,帮助审查者整理作者身份、贡献记录和相关风险。它按指定来源顺序查找信息,并提供简洁的审查备注格式。

主要功能

  1. 01查找贡献者备注
  2. 02查看 GitHub 公开资料
  3. 03整理目标仓库活动
  4. 04生成简洁作者背景摘要
  5. 05记录有后续价值的贡献者备注

适用场景

  1. 01审查 PR 前了解作者背景
  2. 02结合仓库活动评估贡献情况
  3. 03在处理 PR 后记录重要维护信息

安装

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

$npx skills add https://github.com/steipete/agent-scripts --skill github-author-context

安装后在 Claude Code 中输入/github-author-context确认已加载。

附带文件agents/openai.yaml

详细介绍

GitHub 作者背景

为 PR 作者或 GitHub 用户整理一份简明的维护者背景资料。默认在 PR 审查期间使用,但作者是 Peter(steipete、Peter Steinberger 或明显由 Peter 所有的机器人/账户)时除外。

输入

优先使用 GitHub 登录名。从 PR 中获取:

gh pr view <n> --json author,url,headRepository,baseRepository -q '{author:.author.login,url:.url,repo:.baseRepository.nameWithOwner}'

除非用户明确要求,否则跳过对 steipete 的背景资料整理。

来源顺序

  1. OpenClaw 贡献者备注:
~/Projects/maintainers/scripts/clawtributors find github <login>

如果 ~/Projects/maintainers/contributors/people 中有匹配的贡献者文件,则只阅读以下部分:

  • Identity
  • Signals
  • Context
  • Evidence
  • Notes

仅当新的贡献者文件不存在,且旧的维护者背景资料可能有帮助时,才使用以下备用来源:

rg -n -i "<login>|<name>|<discord>" ~/Projects/openclaw-maintainers/people ~/Projects/openclaw-maintainers/data

如果有匹配的旧人物文件,则只阅读相关部分:

  • Verdict
  • Identity
  • Company Affiliation
  • Metrics
  • Discord Communication
  • Evidence
  • 如有,则阅读 Risks / Concerns / Recommendation
  1. GitHub 实时公开个人资料:
gh api "users/<login>" --jq '{login,name,company,location,bio,blog,twitter_username,created_at,followers,following,public_repos}'
  1. 目标仓库中的活动记录:
gh search prs --repo <owner/repo> --author <login> --state merged --limit 20 --json number,title,mergedAt,url
gh search prs --repo <owner/repo> --author <login> --state open --limit 20 --json number,title,updatedAt,url
gh search issues --repo <owner/repo> --author <login> --state open --limit 20 --json number,title,updatedAt,url
gh api "repos/<owner>/<repo>/collaborators/<login>/permission" --jq '{permission,user:.user.login}' 2>/dev/null || true

对于 OpenClaw,除非时效性显然很重要,否则优先使用新的 openclaw/maintainers 贡献者文件,而不是重新计算活动情况。

  1. 必要时参考本地 Git 证据:
git log --all --author="<login>" --since="90 days ago" --oneline --decorate --no-merges | head -40
git shortlog -sne --all | rg -i "<login>|<name>|<email>"

输出

保持简短。在 PR 审查内容靠前的位置添加此区块:

Author context: @login
- Who: <name/company/location/role, confidence>
- Activity: <merged/open PRs, issues, reviews/commits if known>
- OpenClaw signal: <maintainer/candidate/drive-by/vendor/security/unknown>
- Risk: <review-load, broad PRs, low history, company-governance, none obvious>

除非 Peter 要求,否则不要引用私人电话号码/电子邮箱/联系方式。将雇主与受公司委托开展的 OpenClaw 工作区分开;几乎每个人都有雇主。

贡献者备注

合并/拒绝/关闭/审查之后,只有在能为今后的审查提供价值时才添加备注:首次优质合并、表现异常出色、反复出现质量问题、敷衍内容、无法复现的问题反复消耗精力、响应速度出色、未能跟进,或身份确认。

使用维护者仓库辅助工具,确保 Markdown 格式一致:

~/Projects/maintainers/scripts/clawtributors note github <login> --kind merged --pr <n> --summary "Focused bug fix. Tests credible. Smooth review."
~/Projects/maintainers/scripts/clawtributors note github <login> --kind rejected --pr <n> --summary "Broad generated refactor; no reproducible bug; asked to split."
~/Projects/maintainers/scripts/clawtributors link github <login> discord <id> --username <discord> --confidence high --evidence "Self-linked authored PRs in #clawtributors."

备注应简洁、客观、注明日期并附上链接。不要记录普通琐事。

评论

支持 Markdown