运行时依赖
安装命令
点击复制技能文档
使用 GitHub Skill gh CLI 进行所有操作。始终在非 git 目录中使用 --repo owner/repo。 安全(始终) 认证:gh auth login --web 或 GITHUB_TOKEN 环境变量 密钥:gh secret set NAME --repo owner/repo(交互式,永远不使用 --body) 永远不要打印/记录令牌。使用 gh auth status 进行验证。
快速参考 任务 命令 认证检查 gh auth status 列出 PRs gh pr list --repo o/r 创建 PR gh pr create --repo o/r --title "..." --base develop --head branch PR 检查 gh pr checks --repo o/r 合并(squash)gh pr merge --squash --delete-branch --repo o/r 失败的 CI 日志 gh run view --log-failed --repo o/r 重新运行失败的 gh run rerun --failed-only --repo o/r 创建问题 gh issue create --repo o/r --title "..." --body "..." 创建发布 gh release create vX.Y.Z --repo o/r --title "..." --notes "..." 设置密钥 gh secret set KEY --repo o/r 保护分支 gh api --method PUT repos/o/r/branches/main/protection ...
分支模型 main ← 生产,受保护 develop ← 集成 feature/ ← 从 develop 分支 fix/ ← 从 develop 分支(参考问题:fix/123-desc) hotfix/ ← 从 main 分支(紧急) release/ ← 从 develop 分支(准备)
提交约定:feat: 描述 (#42) / fix: 描述 (#42) PR 合并:--squash 用于功能,--merge 用于发布。 语义版本:MAJOR.MINOR.PATCH —— breaking/功能/修复。
何时阅读参考文件 仅加载当前任务所需的内容: 任务 读取 设置新仓库,分支保护 references/repo-setup.md PRs,审查,合并策略 references/pull-requests.md CI 运行,GitHub Actions references/ci-actions.md 发布,版本,标签 references/releases.md 密钥,环境 references/secrets-envs.md JSON 查询,审计,搜索 references/api-queries.md