Skip to main content

gh-cli

Provides a comprehensive reference for using GitHub CLI to manage repositories, issues, pull requests, and more from the command line.

Install this skill

or
0/100

Security score

The gh-cli skill was audited on Jun 15, 2026 and we found 21 security issues across 6 threat categories, including 5 high-severity. Review the findings below before installing.

Categories Tested

Security Issues

low line 35

Command substitution pattern

SourceSKILL.md
33# Linux
34curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
35echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
36sudo apt update
37sudo apt install gh
low line 2089

Command substitution pattern

SourceSKILL.md
2087```bash
2088# Run workflow and wait
2089RUN_ID=$(gh workflow run ci.yml --ref main --jq '.databaseId')
2090
2091# Watch the run
low line 2125

Command substitution pattern

SourceSKILL.md
2123```bash
2124# Add to ~/.bashrc or ~/.zshrc
2125eval "$(gh completion -s bash)" # or zsh/fish
2126
2127# Create useful aliases
low line 2152

Command substitution pattern

SourceSKILL.md
2150
2151 ```bash
2152 export GH_TOKEN=$(gh auth token)
2153 ```
2154
medium line 34

Curl to non-GitHub URL

SourceSKILL.md
32
33# Linux
34curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
35echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
36sudo apt update
high line 669

Access to SSH directory

SourceSKILL.md
667
668# Add deploy key
669gh repo deploy-key add ~/.ssh/id_rsa.pub \
670 --title "Production server" \
671 --read-only
high line 1743

Access to SSH directory

SourceSKILL.md
1741
1742# Add SSH key
1743gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop"
1744
1745# Add key with type
high line 1746

Access to SSH directory

SourceSKILL.md
1744
1745# Add key with type
1746gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication"
1747
1748# Delete SSH key
high line 1762

Access to SSH directory

SourceSKILL.md
1760
1761# Add GPG key
1762gh gpg-key add ~/.ssh/id_rsa.pub
1763
1764# Delete GPG key
low line 669

Access to home directory dotfiles

SourceSKILL.md
667
668# Add deploy key
669gh repo deploy-key add ~/.ssh/id_rsa.pub \
670 --title "Production server" \
671 --read-only
low line 1743

Access to home directory dotfiles

SourceSKILL.md
1741
1742# Add SSH key
1743gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop"
1744
1745# Add key with type
low line 1746

Access to home directory dotfiles

SourceSKILL.md
1744
1745# Add key with type
1746gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication"
1747
1748# Delete SSH key
low line 1762

Access to home directory dotfiles

SourceSKILL.md
1760
1761# Add GPG key
1762gh gpg-key add ~/.ssh/id_rsa.pub
1763
1764# Delete GPG key
low line 1945

Access to home directory dotfiles

SourceSKILL.md
1943```bash
1944# Generate shell completion
1945gh completion -s bash > ~/.gh-complete.bash
1946gh completion -s zsh > ~/.gh-complete.zsh
1947gh completion -s fish > ~/.gh-complete.fish
low line 1946

Access to home directory dotfiles

SourceSKILL.md
1944# Generate shell completion
1945gh completion -s bash > ~/.gh-complete.bash
1946gh completion -s zsh > ~/.gh-complete.zsh
1947gh completion -s fish > ~/.gh-complete.fish
1948gh completion -s powershell > ~/.gh-complete.ps1
low line 1947

Access to home directory dotfiles

SourceSKILL.md
1945gh completion -s bash > ~/.gh-complete.bash
1946gh completion -s zsh > ~/.gh-complete.zsh
1947gh completion -s fish > ~/.gh-complete.fish
1948gh completion -s powershell > ~/.gh-complete.ps1
1949
low line 1948

Access to home directory dotfiles

SourceSKILL.md
1946gh completion -s zsh > ~/.gh-complete.zsh
1947gh completion -s fish > ~/.gh-complete.fish
1948gh completion -s powershell > ~/.gh-complete.ps1
1949
1950# Shell-specific instructions
low line 2124

Access to home directory dotfiles

SourceSKILL.md
2122
2123```bash
2124# Add to ~/.bashrc or ~/.zshrc
2125eval "$(gh completion -s bash)" # or zsh/fish
2126
high line 369

Instruction to display credentials

SourceSKILL.md
367gh auth status --hostname github.com
368
369# Show token in output
370gh auth status --show-token
371
medium line 2124

Shell profile modification

SourceSKILL.md
2122
2123```bash
2124# Add to ~/.bashrc or ~/.zshrc
2125eval "$(gh completion -s bash)" # or zsh/fish
2126
medium line 1273

Download and run instruction

SourceSKILL.md
1271gh run delete 123456789
1272
1273# Download run artifacts
1274gh run download 123456789
1275
Scanned on Jun 15, 2026
View Security Dashboard