gh
由 trumppo 提供
Git & GitHub简介
Use the GitHub CLI (gh) to perform core GitHub operations: auth status, repo create/clone/fork, issues, pull.
描述
该技能的功能
Runs authenticated GitHub operations from the terminal using the gh CLI. Covers repo creation, cloning, forking, issue management, pull requests, and releases. Prefers explicit, idempotent commands and returns URLs for created resources.
Keeps the full GitHub workflow in the terminal, eliminating browser context switches when managing repos, issues, and PRs alongside code.
何时使用
- Create a private GitHub repo from a local project directory
- File and comment on issues without switching to the browser
- Open a pull request from the current branch
- Fork a repo and clone it locally for upstream contribution
- Publish a versioned release with notes
示例工作流
User asks: open a pull request for my current branch
- 1
Check auth status with gh auth status
- 2
View current repo context to confirm owner and default branch
- 3
Run gh pr create with a title and body based on recent commits
- 4
Return the pull request URL
Pull request URL, e.g. https://github.com/owner/repo/pull/42
前置要求
- GitHub account
- GitHub CLI (gh) installed
安装
clawhub install trumppo/gh运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。