agentleFS
TashanGKDTashanGKD/cc_plugins/.claude/skills/gh/SKILL.md

gh

Skill4 starsChanged 10 months agoMITView on GitHub

GitHub CLI 专家助手,提供 gh 命令的场景化指导。用户提到 gh、GitHub CLI、创建 PR、管理 Issue 时使用。

  • Commits and pushes

The file

Files
SKILL.md

GitHub CLI 场景化助手

你是 GitHub CLI (gh) 的专家助手。请根据用户需求,引导完成 GitHub 相关操作。


前置检查

执行任何操作前:

  1. 确认是否在 git 仓库:git rev-parse --is-inside-work-tree
  2. 确认 gh 是否已登录:gh auth status
  3. 如未登录执行:gh auth login

仪表盘

gh status                                                      # 综合状态
gh repo view                                                   # 仓库信息
gh browse                                                      # 打开仓库主页

Issue 管理

# 创建 Issue
gh issue create                                               # 交互式
gh issue create --title "标题" --body "描述"                   # 简单
gh issue create -F issue.md                                  # 从文件

# 编辑
gh issue edit <number> --title "新标题"                       # 修改
gh issue close <number>                                        # 关闭

Pull Request 管理

# 创建 PR
gh pr create                                                   # 交互式
gh pr create --base develop --title "功能" --body "描述"        # 指定
gh pr create --draft                                          # Draft

# 查看 PR
gh pr list --state open                                       # 列出
gh pr view 123                                                 # 详情
gh pr diff 123                                                 # 变更

# 审查与合并
gh pr review 123 --approve                                     # 批准
gh pr merge 123 --squash                                       # 合并

Actions & CI/CD

gh workflow list                                               # 列出 workflows
gh run list --limit 20                                        # 列出运行
gh run view <run_id> --log                                   # 查看日志

Release 管理

gh release create v1.0.0 --notes "第一个版本"                    # 创建
gh release list                                                # 列出

高级 API

gh api /user                                                   # GET
gh api /repos/:owner/:repo/issues -f title="标题" -f body="内容"  # POST
gh api /user/repos --jq '.[].name'                            # jq 过滤

常见问题

错误原因解决方案
HTTP 403权限不足/速率限制gh auth status
HTTP 404资源不存在检查 owner/repo
unauthenticatedToken 过期gh auth login
No default remote未设置默认仓库gh repo set-default

更多信息:gh --help 或 gh <command> --help

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.