AgentSkillsCN

github-cli

GitHub CLI(gh)参考手册,涵盖仓库、议题、拉取请求、Actions、项目、发布、Gist、Codespace,以及通过命令行进行的GitHub操作。

SKILL.md
--- frontmatter
name: github-cli
description: GitHub CLI (gh) reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, and GitHub operations from the command line.
metadata:
  author: hairy
  version: "2026.2.6"
  source: Generated from sources/github (awesome-copilot), scripts at https://github.com/antfu/skills

GitHub CLI (gh)

Use this skill when working with GitHub from the command line: repos, issues, PRs, Actions, projects, releases, gists, codespaces, search, secrets, and API. Content is based on gh 2.85.0 (January 2026).

Core References

TopicDescriptionReference
CLI StructureFull command tree for discoverycore-cli-structure
Install & VerifyInstall on macOS, Linux, Windows; verifycore-install
Auth & ConfigLogin, token, config, env vars, browse, global flags, JSON/template outputcore-auth-config
Repos, Issues, PRsCreate/list/view/edit repo, issue, PR; merge, review, checkoutcore-repo-issues-prs
Repo ExtrasAutolinks, deploy keys, gitignore/license, rename, archivecore-repo-extras
Issue & PR AdvancedStatus, pin, lock, transfer, delete, review types, merge optionscore-issue-pr-advanced

Features

Actions & Secrets

TopicDescriptionReference
Runs, Workflows, CacheList/watch/rerun/delete runs, run workflows, manage cachesfeatures-actions-secrets
Secrets & VariablesRepository, environment, org secrets/variablesfeatures-actions-secrets

Projects, Releases & More

TopicDescriptionReference
ProjectsFields, items, link/unlink, copy, mark-templatefeatures-projects-releases-gists
ReleasesCreate, upload, download, verify, verify-assetfeatures-projects-releases-gists
Gists & CodespacesGist rename/multi-file; codespace cp, jupyter, logs, portsfeatures-projects-releases-gists
OrgsList, view, JSON outputfeatures-projects-releases-gists
Preview & Agent Tasksgh preview, gh agent-taskfeatures-preview-agent-task
Search, API, MiscSearch, labels, SSH/GPG keys, gh api, aliases, extensions, rulesets, attestationfeatures-search-api-misc

Best Practices

TopicDescriptionReference
Environment SetupShell completion, aliases, git credential helperbest-practices-workflows
Workflows & PracticesAutomation tips, bulk ops, repo setup, CI/CD, fork sync, helpbest-practices-workflows

Quick Tips

  • Use GH_TOKEN and GH_REPO for non-interactive use.
  • Prefer --json + --jq for scripting.
  • Use gh repo set-default owner/repo to avoid repeating --repo.