Token导航 LogoToken导航

Agent Skill · 研究检索

gh(GH 搜索)

gh 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gh 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,081。

总安装 1,622周安装 65GitHub Stars 81下载 525核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dagster-io/erk --skill gh

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

gh 技能全面覆盖 GitHub CLI 的使用指南,包括 PR 管理、Issue 跟踪与仓库操作等企业协作场景。适用于希望通过命令行高效处理 GitHub 工作流的开发者或 DevOps 人员。通过 /gh 命令激活,内置快速参考表帮助用户快速找到所需 gh 子命令及其参数说明。

使用前需确保已安装官方 GitHub CLI 工具并配置好身份认证(如 PAT token)。本技能仅提供文档支持,不会直接执行危险操作如强制推送或删除分支。

来源仓库内路径:skills/gh

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dagster-io/erk --skill gh;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gh 怎么安装?

在终端执行 npx skills add https://github.com/dagster-io/erk --skill gh。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gh 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gh 需要什么权限?

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

gh 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gh 用的人多吗?

公开数据是累计安装 1,622 次,近一周安装 65 次,下载 525 次,GitHub 81 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gh 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
gh

GH 搜索 · 本页

1,62281操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

GitHub CLI (gh)

Overview

GitHub CLI (gh) is the official command-line tool for GitHub that brings pull requests, issues, releases, and other GitHub concepts to the terminal. This skill provides comprehensive guidance for using gh to streamline GitHub workflows, including PR management, issue tracking, repository operations, and API access.

When to Use This Skill

Invoke this skill when users:

  • Mention GitHub CLI (gh) commands or workflows
  • Ask about creating, viewing, or managing pull requests from the command line
  • Need help with GitHub issue management via CLI
  • Want to understand gh's mental model or command structure
  • Request guidance on GitHub automation or scripting
  • Ask about GitHub API access through gh
  • Need help with gh authentication or configuration
  • Request integration patterns between gh, git, and other tools (like erk)

Core Concepts

Before providing guidance, understand these key concepts:

Three-Layer Architecture:

  1. High-Level Commands (porcelain): gh pr, gh issue, gh repo - user-friendly workflows
  2. API Access: gh api - direct REST/GraphQL access with built-in auth
  3. Git Integration: Smart repo detection from git remotes and current branch

Context Resolution:

  • gh automatically detects repository from git remotes
  • Uses current branch to infer PR context
  • Falls back to interactive selection when ambiguous

Mental Model: Think of gh as "GitHub workflows made CLI-native" - each command maps to a common GitHub workflow optimized for terminal use.

Using the Reference Documentation

When providing gh guidance, load the comprehensive reference documentation:

references/gh.md

This reference contains:

  • Complete mental model and terminology
  • Full command reference for PRs, issues, repos, releases, and more
  • Authentication and configuration patterns
  • Workflow patterns for common scenarios
  • Integration details (erk, git, CI/CD)
  • GitHub API access patterns
  • Practical examples for daily development

Loading Strategy:

  • Always load references/gh.md when user asks gh-related questions
  • The reference is comprehensive (~1480 lines) but optimized for progressive reading
  • Use grep patterns to find specific sections when needed:

- gh pr - Pull request commands - gh issue - Issue management commands - gh repo - Repository operations - gh api - API access patterns - Pattern [0-9]: - Workflow patterns - Authentication - Auth setup - erk Integration - Integration with erk

Common Operations

When users ask for help with gh, guide them using these patterns:

First-Time Setup

  1. Check if gh is installed: gh --version
  2. Authenticate: gh auth login (interactive) or gh auth status (check current)
  3. Configure defaults: gh config set <key> <value>
  4. Test connection: gh repo view (in a git repo)

Pull Request Operations

Load references/gh.md and search for "gh pr" section to provide:

  • Creating PRs: gh pr create (interactive or with flags)
  • Viewing PRs: gh pr view, gh pr list
  • Checking out PRs: gh pr checkout <number>
  • Reviewing PRs: gh pr review, gh pr diff
  • Merging PRs: gh pr merge
  • PR status checks: gh pr checks

Issue Management

Load references/gh.md and search for "gh issue" section to provide:

  • Creating issues: gh issue create
  • Listing issues: gh issue list (with filters)
  • Viewing issues: gh issue view <number>
  • Updating issues: gh issue edit, gh issue close
  • Issue assignment and labels

Repository Operations

Load references/gh.md and search for "gh repo" section to provide:

  • Viewing repos: gh repo view
  • Cloning repos: gh repo clone
  • Creating repos: gh repo create
  • Forking repos: gh repo fork
  • Repository settings and visibility

API Access

Load references/gh.md and search for "gh api" section to provide:

  • REST API calls: gh api <endpoint>
  • GraphQL queries: gh api graphql -f query='...'
  • Pagination handling
  • JSON processing with --jq
  • Authentication details

For advanced GraphQL use cases, load references/graphql.md:

  • Projects V2 management (no REST API exists)
  • Discussion API operations
  • Batch queries across multiple repos
  • Complex nested data retrieval
  • Advanced issue search
  • See GraphQL API Reference section below

Release Management

Load references/gh.md and search for "gh release" section to provide:

  • Creating releases: gh release create
  • Listing releases: gh release list
  • Downloading assets: gh release download
  • Uploading assets: gh release upload

Workflow Guidance

When users describe their workflow needs, map them to patterns in the reference:

Pattern 1: Daily PR Workflow - Create, review, merge PRs Pattern 2: Issue Triage - List, filter, and manage issues Pattern 3: Release Automation - Script release creation and asset management Pattern 4: PR Checks and Status - Monitor CI/CD and review status Pattern 5: Multi-Repo Operations - Work across multiple repositories Pattern 6: GitHub API Scripting - Automate complex GitHub workflows Pattern 7: Code Review Workflow - Review PRs from command line

Load the appropriate pattern sections from references/gh.md based on user needs.

Output Formatting

When users need to parse or format gh output:

  1. Load the Output Formatting section from references/gh.md
  2. Explain format options: --json, --jq, --template
  3. Show JSON field selection: gh pr list --json number,title,state
  4. Demonstrate jq filtering: gh api /repos/{owner}/{repo}/pulls | jq '.[] | select(.draft==false)'
  5. Provide template examples for custom output

Authentication and Configuration

When users need auth or config help:

  1. Load the Authentication & Configuration section from references/gh.md
  2. Distinguish between:

- Authentication: gh auth login, token management - Configuration: gh config set, per-command defaults

  1. Explain authentication methods: browser, token, SSH
  2. Show common config settings: git_protocol, editor, pager
  3. Handle multiple accounts and enterprise instances

Integration Guidance

Erk Integration

When users mention erk or worktree workflows:

  • Load the Erk Integration section from references/gh.md
  • Explain how gh detects repos in worktrees
  • Show PR operations across multiple worktrees
  • Guide on using --repo flag when needed
  • Reference erk documentation for worktree-specific patterns

Git Integration

When users need to understand gh + git workflows:

  • Load the Git Integration section from references/gh.md
  • Explain repo detection from git remotes
  • Show how current branch affects PR commands
  • Demonstrate combined git + gh workflows
  • Clarify when to use git vs gh commands

CI/CD Integration

When users want to integrate gh with CI/CD:

  • Load the CI/CD patterns from references/gh.md
  • Show authentication in CI environments: GH_TOKEN
  • Provide examples of automated PR creation/merging
  • Demonstrate status check monitoring
  • Guide on release automation

Scripting and Automation

When users want to script GitHub workflows:

  1. Load the Scripting section from references/gh.md
  2. Show how to use gh in shell scripts
  3. Demonstrate error handling: --jq, exit codes
  4. Explain pagination for large datasets
  5. Provide examples of common automation patterns:

- Bulk operations across PRs/issues - Custom notifications - Release workflows - Repository management

Advanced Features

When users need advanced capabilities:

  1. Aliases: Custom commands via gh alias set
  2. Extensions: Third-party gh extensions
  3. GraphQL: Complex queries beyond REST API (see GraphQL API Reference)
  4. Webhooks: Trigger workflows (via API)
  5. GitHub Actions: Interact with workflows via gh workflow

Load the relevant sections from references/gh.md for each advanced feature.

GraphQL API Reference

When standard gh commands are insufficient, use GraphQL via gh api graphql. Load references/graphql.md for comprehensive GraphQL guidance.

When to Use GraphQL:

Use GraphQL when the porcelain commands (gh pr, gh issue, etc.) cannot accomplish the task:

  • Projects V2: No REST API exists - all operations require GraphQL

- Create/update projects - Add items and update field values - Query custom fields and project data

  • Discussions: No porcelain commands available

- Create/manage discussions - Add comments and replies - Query discussion categories

  • Batch Operations: Query multiple resources in one API call

- Compare multiple repositories - Aggregate data across repos - Reduce rate limit consumption

  • Complex Queries: Fetch nested data efficiently

- PR with reviews, comments, and status checks in one call - Issue with timeline, reactions, and linked PRs - Repository with open issues, PRs, and contributors

  • Advanced Search: Complex filtering beyond basic commands

- Multi-criteria issue/PR searches - Boolean logic and date ranges - Advanced sorting options

  • Custom Fields: Precise field selection

- Request only needed fields - Optimize for performance - Build custom data aggregations

GraphQL Resources:

  • references/graphql.md - Complete GraphQL guide including:

- Use cases requiring GraphQL - Common patterns (variables, pagination, batching, etc.) - Complete examples (Projects V2, Discussions, batch queries) - Best practices and troubleshooting

  • references/graphql-schema-core.md - Core schema types (load only when needed):

- Detailed field information for Repository, Issue, PullRequest, etc. - Projects V2 field types and mutations - Discussion types and operations - Input types and enums

Loading Strategy:

  1. Start with references/graphql.md for use cases and patterns
  2. Load references/graphql-schema-core.md only when detailed schema info is needed
  3. Use grep patterns to find specific sections:

- Projects V2 - Project automation examples - Discussion - Discussion API examples - Batch - Batch query patterns - Pagination - Cursor-based pagination - Example [0-9] - Complete working examples

Rate Limits and API Backend

When users encounter rate limit issues or need to optimize API usage:

  1. Load references/api-backend-audit.md for complete command-to-API mapping
  2. Understand the difference:

- REST: 5,000 requests/hour, counted per request - GraphQL: 5,000 points/hour, cost based on query complexity - Search: 30 requests/minute (separate limit)

  1. Key insights:

- PR/Issue commands use GraphQL (query cost varies) - Run/Workflow/Gist commands use REST (predictable cost) - Project commands require GraphQL exclusively - Search always uses REST with stricter limits

  1. Check current limits: gh api rate_limit --jq '.resources'

Troubleshooting

When users encounter issues:

  1. Check authentication: gh auth status
  2. Verify repository detection: gh repo view
  3. Test API access: gh api user
  4. Review configuration: gh config list
  5. Check rate limits: gh api rate_limit
  6. Enable debug mode: GH_DEBUG=api gh <command>

Load the Troubleshooting section from references/gh.md for specific error patterns.

Command Discovery

When users ask "what can gh do?":

  • Start with overview of main commands: pr, issue, repo, release, workflow
  • Show command help: gh <command> --help
  • Demonstrate interactive mode: most commands work interactively
  • Point to gh api for anything not covered by porcelain commands
  • Reference the full command reference in references/gh.md

Resources

references/

  • gh.md - Comprehensive GitHub CLI mental model and command reference (~1480 lines)

- Load for all standard gh command guidance - Full workflow patterns and examples - Integration patterns (erk, git, CI/CD)

  • graphql.md - GitHub GraphQL API comprehensive guide (~1000 lines)

- Load when porcelain commands are insufficient - Use cases requiring GraphQL (Projects V2, Discussions, batch queries) - Complete patterns and examples - Best practices and troubleshooting

  • graphql-schema-core.md - Core GraphQL schema types (~500 lines)

- Load only when detailed schema info needed - Detailed field definitions for core types - Mutation input types and examples

  • api-backend-audit.md - REST vs GraphQL API backend audit (~850 lines)

- Load when understanding which API type a command uses - Rate limit guidance and optimization strategies - Complete mapping of all gh commands to their API backends - Batch operation alternatives and caching strategies

These references should be loaded as needed to ensure accurate, detailed information. Use progressive disclosure: start with the main reference, then load specialized GraphQL docs when needed.

平台分布

Codex

32.44%
按下载量换算170

Claude

31.14%
按下载量换算163

Cursor

18.11%
按下载量换算95

Gemini CLI

9.43%
按下载量换算50

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills