PluginBench
Skill
Review
Audit score 70

cli-gh

paulrberg/agent-skills

GitHub CLI automation for repository reads, workflows, search, codespaces, and releases.

What is cli-gh?

This skill enables GitHub CLI automation for read-only operations and reversible writes on repositories, workflows, and releases. Use it for inspecting repository state, running workflows, searching issues, managing codespaces, and executing gh commands; route destructive operations and PR/issue authoring through dedicated skills.

  • Execute GitHub CLI commands for repository inspection, workflow management, and release operations
  • Search issues and pull requests with semantic or hybrid ranking
  • Manage codespaces and check out branches into linked git worktrees
  • Preview writes with exact targets and impact before execution
  • Handle label deletion with explicit approval workflow

How to install cli-gh

npx skills add https://github.com/paulrberg/agent-skills --skill cli-gh
Prerequisites
  • GitHub CLI (gh) installed and authenticated
  • Access to target repositories with appropriate permissions
Claude Code
Cursor
Windsurf
Cline

How to use cli-gh

  1. 1.Resolve the target repository explicitly if the current working directory is ambiguous
  2. 2.Use `gh <command> <subcommand> --help` to confirm available flags and JSON output fields
  3. 3.Preview broad write operations showing the repository, exact targets, and impact
  4. 4.Execute the gh command and verify the result by fetching the updated resource
  5. 5.For destructive operations like label deletion, confirm the exact labels and affected issues/PRs before proceeding

Use cases

Good for
  • Inspect repository configuration, branches, and workflow status without making changes
  • Search for related issues or PRs across repositories using semantic ranking
  • Trigger or monitor GitHub Actions workflows and retrieve their results
  • Create or manage codespaces for development environments
  • Preview and execute reversible GitHub operations with user confirmation
Who it's for
  • Developers automating GitHub repository operations
  • Teams managing CI/CD workflows and releases
  • Users needing programmatic access to GitHub CLI without manual commands

cli-gh FAQ

When should I use this skill versus yeet?

Use this skill for reads and reversible writes (workflow runs, codespace creation). Route PR/issue authoring, comments, and discussions through yeet, which handles semantic analysis and idempotency.

Can I delete repositories or releases with this skill?

No. This skill cannot delete repositories, releases, assets, workflow runs, secrets, keys, codespaces, or gists. Label deletion requires explicit approval in a separate message.

How do I check out a branch into a worktree?

Use `gh pr checkout --worktree <path>` for pull requests or `gh issue develop --checkout --worktree <path>` for issues to create a linked git worktree instead of switching branches.

What should I do if a write operation fails?

Check whether the operation partially succeeded before retrying. Report the verified state, URL, concrete error, and next action. Distinguish between unknown results and confirmed failures.

How do I search issues by relevance?

Use `gh search issues --search-type semantic` or `--search-type hybrid` to rank results by relevance; this returns one page without sort/order options and is not available on GitHub Enterprise Server.

Full instructions (SKILL.md)

Source of truth, from paulrberg/agent-skills.


coordination: exempt name: cli-gh skill-dependencies:

  • repo-rename
  • yeet user-invocable: false description: "Use for GitHub CLI automation: repository reads, workflow runs, search, codespaces, releases, configuration, or gh command syntax. Use yeet for contribution writes to PRs, issues, comments, or discussions."

GitHub CLI

This skill is coordination-exempt: skip the ai-coord gate for its declared work.

Routing

Use yeet to author or update a pull request, issue, issue comment, or discussion. yeet owns semantic analysis, repository templates, Paul's writing voice, idempotency, and direct posting. Route repository renames through repo-rename so GitHub and local continuity change together.

Authority

  • Read and inspect without confirmation.
  • Execute reversible or ordinary GitHub writes only when the user explicitly requested that outcome.
  • Never delete repositories, releases/assets, workflow runs/caches, secrets/variables, keys, codespaces, extensions, or gists.
  • Label deletion is the sole destructive exception: show the target repo, exact labels, commands, and issue/PR impact, then require approval in a subsequent message before gh label delete ... --yes.

Workflow

  1. Resolve the repository explicitly when cwd is ambiguous. Let the first required read-only command validate authentication; run gh auth status only for auth diagnosis.

  2. Use installed gh <command> <subcommand> --help to resolve flags, JSON fields, and command behavior; CLI JSON field names can differ from API fields. Prefer --json with --jq for structured output.

  3. Preview broad writes with the repository, exact targets, commands, and issue/PR impact. An already requested ordinary write does not require a second approval.

Notable Flags (gh 2.98+)

  • gh pr checkout --worktree <path> and gh issue develop --checkout --worktree <path> check out into a linked git worktree instead of switching the current branch.
  • gh search issues --search-type semantic|hybrid ranks by relevance: issues only, one page, no --sort/--order, not on GitHub Enterprise Server.
  • gh config set api_host <gateway> --host <host> routes that host's API traffic through a gateway; experimental and not a security boundary.
  • --attach '<file>#<alt>' on issue/PR create, edit, and comment uploads images or videos; route those writes through yeet.

Completion

Complete when command output verifies the requested GitHub data or state. After a write, fetch the resulting resource. On a partial or ambiguous failure, check whether it changed before retrying. Report the verified state and URL or stable identifier; include the concrete error and next action when incomplete, and distinguish an unknown result from a confirmed failure.