mcpField
G
github

github

github.com/sammcj开发16744 次安装2 天前更新
代码仓库

关于 github

供 Agent 使用的 GitHub 工作流技能,通过 `gh` 管理议题和 PR、检查评审讨论及 Actions 安全性,并提供评审线程处理和 Actions 版本更新指引。

主要功能

  1. 01使用 `gh` 处理议题、PR 和发布
  2. 02读取 PR 评论与评审线程
  3. 03通过 GraphQL 解决或重新打开评审线程
  4. 04检查 Actions 版本并审计安全性

适用场景

  1. 01查看 PR 讨论和未解决的评审反馈
  2. 02按明确要求解决评审线程
  3. 03更新 GitHub Actions 并执行安全审计

安装

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

$npx skills add https://github.com/sammcj/agentic-coding --skill github

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

详细介绍

GitHub

  • 使用 gh CLI 工具与 GitHub 交互(issues、PR、releases),并在沙盒外执行 gh 命令
  • 在使用 Github Actions 时,始终检查并使用至少发布 7 天的最新 Actions 版本;可使用 pinact run -update --min-age 7 实现此操作
  • 对于常规 PR 对话时间线(非行级审查评论),使用 gh pr view --comments 或 REST /issues/N/comments 端点
  • 需要读取包含已解决状态的行级审查评论时(例如,整理 bot 或人工审查反馈),通过 GraphQL 在一次调用中获取: gh api graphql -f query='query { repository(owner: "OWNER", name: "REPO") { pullRequest(number: N) { reviewThreads(first: 100) { nodes { id isResolved path line comments(first: 1) { nodes { author { login } body } } } } } } }' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
  • 用户明确要求“close”或“resolve”审查评论时,通过 GraphQL mutation 解决该线程(除非收到指示,否则不要回复评论):gh api graphql -f query='mutation($id: ID!) { resolveReviewThread(input: { threadId: $id }) { thread { isResolved } } }' -f id="PRRT_..."
  • 线程 ID 以 PRRT_ 开头。使用 unresolveReviewThread 重新打开
  • 运行 zizmor . 可审计 Github Actions 安全性

评论

支持 Markdown