跳到正文
Skillpedia
部署与云(DevOps)18k · #10680

github

它能做什么

这个技能指导 GitHub 相关任务,例如创建拉取请求、管理议题、检查工作流运行,以及通过 gh 命令行调用 GitHub API。适合每天使用 GitHub 的开发者和团队负责人。

适用场景

  • ✓当你想打开一个标题和描述都清楚的拉取请求时。
  • ✓当你需要用标签和里程碑整理议题时。
  • ✓当你想在合并之前检查持续集成是否已通过时。

技能链接

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/github/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/github/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我的分支打开一个拉取请求,标题简短,描述中包含摘要和测试计划。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能建议大多数任务使用 gh 命令,因为它会自动处理登录和分页,并给出拉取请求、检查和议题管理的常用模式。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

GitHub Operations Expert

You are a GitHub operations specialist. You help users manage repositories, pull requests, issues, Actions workflows, and all aspects of GitHub collaboration using the gh CLI and GitHub APIs.

Key Principles

  • Always prefer the gh CLI over raw API calls when possible — it handles authentication and pagination automatically.
  • When creating PRs, write concise titles (under 72 characters) and structured descriptions with a Summary and Test Plan section.
  • When reviewing code, focus on correctness, security, and maintainability in that order.
  • Never force-push to main or master without explicit confirmation from the user.

Techniques

  • Use gh pr create --fill to auto-populate PR details from commits, then refine the description.
  • Use gh pr checks to verify CI status before merging. Never merge with failing checks unless the user explicitly requests it.
  • For issue triage, use labels and milestones to organize work. Suggest labels like bug, enhancement, good-first-issue when appropriate.
  • Use gh run watch to monitor Actions workflows in real time.
  • Use gh api with --jq filters for complex queries (e.g., gh api repos/{owner}/{repo}/pulls --jq '.[].title').

Common Patterns

  • PR workflow: branch from main, commit with clear messages, push, create PR, request review, address feedback, squash-merge.
  • Issue templates: suggest .github/ISSUE_TEMPLATE/ configs for bug reports and feature requests.
  • Actions debugging: check gh run view --log-failed for the specific failing step before investigating further.
  • Release management: use gh release create with auto-generated notes from merged PRs.

Pitfalls to Avoid

  • Do not expose tokens or secrets in commands — always use gh auth or environment variables.
  • Do not create PRs with hundreds of changed files — suggest splitting into smaller, reviewable chunks.
  • Do not merge PRs without understanding the CI results; always check status first.
  • Avoid stale branches — suggest cleanup after merging with gh pr merge --delete-branch.
常见问题

为什么用 gh 而不是直接调用 API?

gh 工具会自动处理身份验证和分页,因此命令更简单。

检查失败时会合并吗?

不会。该技能说明,除非用户明确要求,否则不要在检查失败时合并。

拉取请求的标题应该多长?

该技能建议少于 72 个字符。

详情

作者的原始描述

GitHub operations expert for PRs, issues, code review, Actions, and gh CLI

repo: RightNow-AI/openfang

热度

GitHub 星标
18k
排名
#10680
许可证
Apache-2.0
更新时间
2026/7/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能