Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计未展示

github-cliGitHub CLI

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

6,634

周安装

351

GitHub Stars

公开资料未说明

下载量

4,352
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:github-cli(GitHub CLI)
来源仓库:https://github.com/oriolrius/pki-manager-web
仓库路径:skills/github-cli
安装命令:
npx skills add oriolrius/pki-manager-web --skill "github-cli"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add oriolrius/pki-manager-web --skill "github-cli"

简介

用于围绕 GitHub 仓库、Issue、Pull Request 等协作流程提供辅助能力,适合让 Agent 查询项目状态或整理变更。

  • 适用于协作类任务,需区分只读查询和写入操作;涉及私有仓库时应确认 token 权限。
  • 通过 npx skills add oriolrius/pki-manager-web --skill "github-cli" 命令安装。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • github-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

GitHub CLI (gh)

Expert guidance for GitHub CLI operations and workflows.

Installation & Setup

# Login to GitHub
gh auth login

# Check authentication status
gh auth status

# Configure git to use gh as credential helper
gh auth setup-git

Pull Requests

Creating PRs

# Create PR interactively
gh pr create

# Create PR with title and body
gh pr create --title "Add feature" --body "Description"

# Create PR to specific branch
gh pr create --base main --head feature-branch

# Create draft PR
gh pr create --draft

# Create PR from current branch
gh pr create --fill  # Uses commit messages

Viewing PRs

# List PRs
gh pr list

# List my PRs
gh pr list --author @me

# View PR details
gh pr view 123

# View PR in browser
gh pr view 123 --web

# View PR diff
gh pr diff 123

# Check PR status
gh pr status

Managing PRs

# Checkout PR locally
gh pr checkout 123

# Review PR
gh pr review 123 --approve
gh pr review 123 --comment --body "Looks good!"
gh pr review 123 --request-changes --body "Please fix X"

# Merge PR
gh pr merge 123
gh pr merge 123 --squash
gh pr merge 123 --rebase
gh pr merge 123 --merge

# Close PR
gh pr close 123

# Reopen PR
gh pr reopen 123

# Ready draft PR
gh pr ready 123

PR Checks

# View PR checks
gh pr checks 123

# Watch PR checks
gh pr checks 123 --watch

Issues

Creating Issues

# Create issue interactively
gh issue create

# Create issue with title and body
gh issue create --title "Bug report" --body "Description"

# Create issue with labels
gh issue create --title "Bug" --label bug,critical

# Assign issue
gh issue create --title "Task" --assignee @me

Viewing Issues

# List issues
gh issue list

# List my issues
gh issue list --assignee @me

# List by label
gh issue list --label bug

# View issue details
gh issue view 456

# View in browser
gh issue view 456 --web

Managing Issues

# Close issue
gh issue close 456

# Reopen issue
gh issue reopen 456

# Edit issue
gh issue edit 456 --title "New title"
gh issue edit 456 --add-label bug
gh issue edit 456 --add-assignee @user

# Comment on issue
gh issue comment 456 --body "Update"

Repository Operations

Repository Info

# View repository
gh repo view

# View in browser
gh repo view --web

# Clone repository
gh repo clone owner/repo

# Fork repository
gh repo fork owner/repo

# List repositories
gh repo list owner

Repository Management

# Create repository
gh repo create my-repo --public
gh repo create my-repo --private

# Delete repository
gh repo delete owner/repo

# Sync fork
gh repo sync owner/repo

# Set default repository
gh repo set-default

Workflows & Actions

Viewing Workflows

# List workflows
gh workflow list

# View workflow runs
gh run list

# View specific run
gh run view 789

# Watch run
gh run watch 789

# View run logs
gh run view 789 --log

Managing Workflows

# Trigger workflow
gh workflow run workflow.yml

# Cancel run
gh run cancel 789

# Rerun workflow
gh run rerun 789

# Download artifacts
gh run download 789

Releases

Creating Releases

# Create release
gh release create v1.0.0

# Create release with notes
gh release create v1.0.0 --notes "Release notes"

# Create release with files
gh release create v1.0.0 dist/*.tar.gz

# Create draft release
gh release create v1.0.0 --draft

# Generate release notes automatically
gh release create v1.0.0 --generate-notes

Managing Releases

# List releases
gh release list

# View release
gh release view v1.0.0

# Download release assets
gh release download v1.0.0

# Delete release
gh release delete v1.0.0

Version Management (pki-manager specific)

IMPORTANT: When creating a new release for this project, you MUST bump the version in ALL THREE package.json files:

  • package.json (root - authoritative source)
  • frontend/package.json
  • backend/package.json

Version Bump Types (Semantic Versioning)

TypeWhen to useExample
patchBug fixes, minor changes1.2.01.2.1
minorNew features, backwards compatible1.2.01.3.0
majorBreaking changes1.2.02.0.0

Pre-Release Workflow

Before creating a release, you MUST:

  1. Check current version in root package.json
  2. Determine bump type based on changes since last release
  3. Update ALL package.json files with the new version
  4. Commit version changes with message: chore: bump version to vX.Y.Z
  5. Create git tag: git tag vX.Y.Z
  6. Push tag: git push origin vX.Y.Z
  7. Create GitHub release: gh release create vX.Y.Z --generate-notes

Complete Release Workflow

# 1. Determine current version
cat package.json | grep '"version"'
# Output: "version": "1.2.0"

# 2. Update versions in all package.json files
# For patch bump (1.2.0 → 1.2.1):
NEW_VERSION="1.2.1"

# Edit package.json (root)
# Edit frontend/package.json
# Edit backend/package.json
# All three must have the same version!

# 3. Commit version bump
git add package.json frontend/package.json backend/package.json
git commit -m "chore: bump version to v${NEW_VERSION}"

# 4. Create and push tag
git tag "v${NEW_VERSION}"
git push origin main
git push origin "v${NEW_VERSION}"

# 5. Create GitHub release with auto-generated notes
gh release create "v${NEW_VERSION}" --generate-notes

# Or with custom notes
gh release create "v${NEW_VERSION}" --notes "## What's Changed
- Feature A
- Bug fix B
- Improvement C"

Version Synchronization Rules

CRITICAL: All three package.json files MUST have matching versions:

FilePathMust Match Root
Rootpackage.json✓ (authoritative)
Frontendfrontend/package.json
Backendbackend/package.json

Checking Version Consistency

# Quick check all versions
echo "Root: $(cat package.json | grep '"version"' | head -1)"
echo "Frontend: $(cat frontend/package.json | grep '"version"' | head -1)"
echo "Backend: $(cat backend/package.json | grep '"version"' | head -1)"

Release Checklist

Before releasing, verify:

  • All tests pass (pnpm test)
  • Build succeeds (pnpm build)
  • All three package.json versions match
  • Changes are committed to main branch
  • No uncommitted changes (git status)
  • Previous release tag exists for comparison

Gists

# Create gist
gh gist create file.txt

# Create gist from stdin
echo "content" | gh gist create -

# List gists
gh gist list

# View gist
gh gist view <gist-id>

# Edit gist
gh gist edit <gist-id>

# Delete gist
gh gist delete <gist-id>

Advanced Features

Aliases

# Create alias
gh alias set pv "pr view"
gh alias set bugs "issue list --label bug"

# List aliases
gh alias list

# Use alias
gh pv 123

API Access

# Make API call
gh api repos/:owner/:repo/issues

# With JSON data
gh api repos/:owner/:repo/issues -f title="Bug" -f body="Description"

# Paginated results
gh api --paginate repos/:owner/:repo/issues

Extensions

# List extensions
gh extension list

# Install extension
gh extension install owner/gh-extension

# Upgrade extensions
gh extension upgrade --all

Common Workflows

Code Review Workflow

# List PRs assigned to you
gh pr list --assignee @me

# Checkout PR for testing
gh pr checkout 123

# Run tests, review code...

# Approve PR
gh pr review 123 --approve --body "LGTM!"

# Merge PR
gh pr merge 123 --squash

Quick PR Creation

# Create feature branch, make changes, commit
git checkout -b feature/new-feature
# ... make changes ...
git add .
git commit -m "Add new feature"
git push -u origin feature/new-feature

# Create PR from commits
gh pr create --fill

# View PR
gh pr view --web

Issue Triage

# List open issues
gh issue list

# Add labels to issues
gh issue edit 456 --add-label needs-triage
gh issue edit 456 --add-label bug

# Assign issue
gh issue edit 456 --add-assignee @developer

Configuration

# Set default editor
gh config set editor vim

# Set default git protocol
gh config set git_protocol ssh

# View configuration
gh config list

# Set browser
gh config set browser firefox

Tips

  1. Use --web flag: Open items in browser for detailed view
  2. Interactive prompts: Most commands work interactively if you omit parameters
  3. Filters: Use --author, --label, --state to filter lists
  4. JSON output: Add --json flag for scriptable output
  5. Template repos: Use gh repo create --template for templates
  6. Auto-merge: Enable with gh pr merge --auto

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.77%
按下载量换算1,296

windsurf

20.81%
按下载量换算906

trae

15.21%
按下载量换算662

OpenCode

10.75%
按下载量换算468

Codex

8.35%
按下载量换算363

Antigravity

3.54%
按下载量换算154

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills