working-github-cli

majiayu000 的头像作者 majiayu000

通过 gh CLI 处理 GitHub 存储库、拉取请求、问题、发布或其他 GitHub 操作时使用

📖 中文导读:通过 gh CLI 处理 GitHub 存储库、拉取请求、问题、发布或其他 GitHub 操作时使用 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: working-github-cli description: Use when working with GitHub repositories, pull requests, issues, releases, or other GitHub operations via the gh CLI

Working with GitHub CLI

Use the gh CLI tool via the Bash tool for all GitHub operations.

Authentication & Account Issues

IMPORTANT: If you encounter "repository not found" or authentication errors:

  1. Check authentication status:

    gh auth status
    
  2. If multiple accounts are configured, try switching accounts:

    gh auth switch
    
  3. If not authenticated, prompt user to run:

    gh auth login
    

Commands & Usage

See @common-commands.md for detailed command reference, examples, and common operations.

Best Practices

  • Use gh commands instead of git+web workflows when possible
  • Always check gh <command> --help for options
  • Use --json flag for machine-readable output when parsing
  • Use heredoc for multiline bodies (PR descriptions, issue bodies)