中文导读
GitHub CLI (gh) 是一套面向一人公司的通用 playbook,帮助你用更少的人力完成更稳的增长、交付与决策。
说明: 原始步骤、命令与 API 名称保留英文,以避免参数和接口名称失真。
概览
Use gh for authenticated GitHub operations from the terminal. Prefer explicit, idempotent commands and report URLs back to the user. Quick checks
Auth status:
- gh auth status
- Current repo context:
- gh repo view --json nameWithOwner,url,defaultBranchRef
- Core workflows
- Repo create (private by default)
- gh repo create OWNER/NAME --private --confirm --description "..."
- If running inside a local repo, use --source . --remote origin --push.
- Clone / fork
- gh repo clone OWNER/NAME
- gh repo fork OWNER/NAME --clone
- Issues
- List:
- gh issue list --limit 20
- Create:
- gh issue create --title "..." --body "..."
- Comment:
- gh issue comment <num> --body "..."
- Pull requests
- Create from current branch:
- gh pr create --title "..." --body "..."
- List:
- gh pr list --limit 20
- View:
- gh pr view <num> --web
- Merge (use explicit method):
- gh pr merge <num> --merge
- Releases
- gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."
- Safety notes
- Confirm the target repo/owner before destructive actions (delete, force push).
- For private repos, ensure --private is set on create.
- Prefer --confirm to avoid interactive prompts in automation.
SKILL.md 原文件
预览原始 SKILL.md. 下面可以直接查看完整原文。可滚动阅读、检查结构,再下载精确的 SKILL.md 原文件。
# gh
GitHub CLI (gh)
Overview
Use gh for authenticated GitHub operations from the terminal. Prefer explicit, idempotent commands and report URLs back to the user.
Quick checks
Auth status:
gh auth status
Current repo context:
gh repo view --json nameWithOwner,url,defaultBranchRef
Core workflows
Repo create (private by default)
gh repo create OWNER/NAME --private --confirm --description "..."
If running inside a local repo, use --source . --remote origin --push.
Clone / fork
gh repo clone OWNER/NAME
gh repo fork OWNER/NAME --clone
Issues
List:
gh issue list --limit 20
Create:
gh issue create --title "..." --body "..."
Comment:
gh issue comment <num> --body "..."
Pull requests
Create from current branch:
gh pr create --title "..." --body "..."
List:
gh pr list --limit 20
View:
gh pr view <num> --web
Merge (use explicit method):
gh pr merge <num> --merge
Releases
gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."
Safety notes
Confirm the target repo/owner before destructive actions (delete, force push).
For private repos, ensure --private is set on create.
Prefer --confirm to avoid interactive prompts in automation.
预览原始 SKILL.md. 下面可以直接查看完整原文。可滚动阅读、检查结构,再下载精确的 SKILL.md 原文件。
# gh
GitHub CLI (gh)
Overview
Use gh for authenticated GitHub operations from the terminal. Prefer explicit, idempotent commands and report URLs back to the user.
Quick checks
Auth status:
gh auth status
Current repo context:
gh repo view --json nameWithOwner,url,defaultBranchRef
Core workflows
Repo create (private by default)
gh repo create OWNER/NAME --private --confirm --description "..."
If running inside a local repo, use --source . --remote origin --push.
Clone / fork
gh repo clone OWNER/NAME
gh repo fork OWNER/NAME --clone
Issues
List:
gh issue list --limit 20
Create:
gh issue create --title "..." --body "..."
Comment:
gh issue comment <num> --body "..."
Pull requests
Create from current branch:
gh pr create --title "..." --body "..."
List:
gh pr list --limit 20
View:
gh pr view <num> --web
Merge (use explicit method):
gh pr merge <num> --merge
Releases
gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."
Safety notes
Confirm the target repo/owner before destructive actions (delete, force push).
For private repos, ensure --private is set on create.
Prefer --confirm to avoid interactive prompts in automation.
评论与讨论
添加评论