github-cli-helper

Execute gh commands using the full Homebrew path.

3|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/mkaczkowski/ai-command-library --skill github-cli-helper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-cli-helper
Source: https://github.com/mkaczkowski/ai-command-library/tree/main/plugins/common/skills/github-cli
Command: npx skills add https://github.com/mkaczkowski/ai-command-library --skill github-cli-helper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensure GitHub CLI commands always execute with the full Homebrew path to avoid environment-specific issues that can break gh operations.

Core Features & Use Cases

  • Enforces using the explicit path for gh commands across PRs, issues, repos, and other GitHub interactions.
  • Improves reliability when switching shells, environments, or CI runners that may have multiple gh binaries installed.
  • Real-world use: quickly approve a PR or list issues using the guaranteed full path to gh.

Quick Start

Use the full Homebrew path for gh commands, e.g. /opt/homebrew/bin/gh pr list, to guarantee reliable results in all environments.

Frequently Asked Questions about github-cli-helper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does the gh command fail when switching shells on macOS?

The gh command fails during shell switches because multiple installed binaries can shadow the intended executable. Forcing the explicit Homebrew path ensures the correct gh binary is called, maintaining reliable GitHub CLI operations.

How do I run GitHub CLI commands with the full Homebrew path?

Run GitHub CLI commands by prefixing them with the explicit Homebrew path, such as /opt/homebrew/bin/gh pr list. This guarantees reliable execution across PRs, issues, and repos in environments with multiple binaries.

Can I use this path fix for gh commands in CI runners?

Yes, enforcing the explicit Homebrew path works for CI runners. It resolves environment-specific issues by ensuring the gh binary is consistently found, preventing command failures in automated pipelines with multiple shells.

What is the best way to prevent gh binary shadowing across different environments?

The best way to prevent gh binary shadowing is to enforce the full Homebrew path for all commands. This bypasses shell lookup ambiguities and guarantees reliable GitHub CLI interactions for PRs and issues.

When do I need to use the explicit Homebrew path for GitHub CLI?

Use the explicit Homebrew path when switching shells, environments, or CI runners that may have multiple gh binaries installed. This guarantees reliable results for PR, issue, and repo interactions.

gh command not working after environment switch, how to fix?

Fix gh command failures by enforcing the full Homebrew path, such as /opt/homebrew/bin/gh. This avoids environment-specific binary shadowing and guarantees reliable execution across shells and CI runners.