Agent skill

GitHub CLI Reference

by papermark in papermark/papermark

Reference for the gh command line tool covering repositories, issues, pull requests, Actions, releases, gists and codespaces, with install and login steps.

Custom licenceAuto-check: warningsDevelopment

Install GitHub CLI Reference

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add papermark/papermark --skill gh-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install papermark/papermark gh-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/papermark/papermark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/gh-cli .claude/skills/gh-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-cli
GitHub stars
9.2k
Used in
4 other repos
Token cost
~9.8k tokens
SKILL.md length
406 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Custom licence

At a glance

Reference for the gh command line tool covering repositories, issues, pull requests, Actions, releases, gists and codespaces, with install and login steps.

  • Works in 5 steps: Authentication: Use environment… → Default Repository: Set default to avoid… → JSON Parsing: Use jq for complex data… → …
  • Creating, forking or syncing repositories from the terminal
  • SKILL.md covers Prerequisites, CLI Structure, Configuration and Authentication (gh auth), plus 2 more sections
  • Calls gh, git and apt; reaches cli.github.com and github.com; needs GH_TOKEN

What it does

This skill is a long command reference for the GitHub CLI, written against version 2.85.0. It opens with installation, signing in through gh auth login, and setting up gh as the git credential helper, then lays out the whole command tree along with global configuration and environment variables such as GH_TOKEN.

Each command family gets its own section of ready-to-run examples. The repository section alone covers create, clone, list, view, edit, delete, fork and sync, and there are separate sections for browsing and for switching accounts or refreshing tokens. By its description, the rest extends to issues, pull requests, Actions, projects, releases, gists, codespaces, organizations and extensions. It includes destructive commands such as gh repo delete, so check what the agent is about to run.

When your agent uses it

  • Creating, forking or syncing repositories from the terminal
  • Opening, listing or merging pull requests without leaving the shell
  • Setting up gh authentication and git credentials on a new machine
  • Looking up the right gh subcommand and flags for a GitHub task

Example prompts

  • “Fork the upstream repo, clone it and sync the fork with gh.”
  • “List my open pull requests across the organization using the GitHub CLI.”
  • “Log me into GitHub with gh and set it up as the git credential helper.”
  • “Switch the active gh account to my work login and confirm with auth status.”

Requirements

  • The GitHub CLI (`gh`) installed
  • A GitHub account, signed in with `gh auth login` or a GH_TOKEN token

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Authentication: Use environment variables for automation
  2. Default Repository: Set default to avoid repetition
  3. JSON Parsing: Use jq for complex data extraction
  4. Pagination: Use --paginate for large result sets
  5. Caching: Use cache control for frequently accessed data

What it can do on your machine

Read from SKILL.md and the folder at commit ed19717. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git
    • apt
    • brew
    • curl
    • winget

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cli.github.com
    • github.com

    Also links to:

    • docs.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GH_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub CLI Reference loads about 9.8k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 406 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~9.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • NoteRuns commands with sudoSKILL.md:21
    packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
  • NoteRuns commands with sudoSKILL.md:22
    //cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
  • NoteRuns commands with sudoSKILL.md:23
    sudo apt update
  • NoteRuns commands with sudoSKILL.md:24
    sudo apt install gh
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:656
    gh repo deploy-key add ~/.ssh/id_rsa.pub \
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:1730
    gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop"
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:1733
    gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication"
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:1749
    gh gpg-key add ~/.ssh/id_rsa.pub

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 406 words (~9,754 tokens).

“Comprehensive reference for GitHub CLI (gh) - work seamlessly with GitHub from the command line.”

— opening of SKILL.md by papermark, Custom licence
name
gh-cli

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/gh-cli of papermark/papermark.

Open the folder on GitHubat commit ed19717

Used in 4 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in papermark/papermark, which our catalogue first saw on October 7, 2026.

Compare with similar skills

GitHub CLI Reference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub CLI Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub CLI Reference this skillpapermark/papermark9.2k4 repos~9.8kAutomated safety check: WarnCustom licence
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT
Create Pull Request with Work Item IDmakeplane/plane61k—~824Automated safety check: PassAGPL-3.0
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated today
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Pascal Editor PR Opener

    pascalorg/editor

    Opens or refreshes a pull request on pascalorg/editor from the current branch, describing only what the branch's commits and diff actually contain.

    25k GitHub stars~619 tokensUpdated today
    DevelopmentAuto-check passed

More from papermark/papermark

  • Trigger.dev Agent Patterns

    papermark/papermark

    Patterns for building LLM agents on Trigger.dev tasks: prompt chaining, routing, parallel workers, orchestrator-workers, evaluator loops and human approval gates.

    9.2k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Trigger.dev Configuration

    papermark/papermark

    Configures Trigger.dev projects through trigger.config.ts, with build extensions for Prisma, Playwright, Puppeteer, FFmpeg, Python and system packages.

    9.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Audits Trigger.dev tasks, schedules and run history for wasteful machine sizes, retries, polling and cron frequency to cut spend.

    9.2k GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Trigger.dev Realtime

    papermark/papermark

    Shows how to subscribe to Trigger.dev task runs from the backend and from React for progress indicators, live dashboards, AI response streams and approval waits.

    9.2k GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Trigger.dev Background Tasks

    papermark/papermark

    Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.

    9.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about GitHub CLI Reference

What does GitHub CLI Reference do?

Reference for the gh command line tool covering repositories, issues, pull requests, Actions, releases, gists and codespaces, with install and login steps. 0. It opens with installation, signing in through gh auth login, and setting up gh as the git credential helper, then lays out the whole command tree along with global configuration and environment variables such as GH_TOKEN.

When should I use GitHub CLI Reference?

GitHub CLI Reference fits situations like: creating, forking or syncing repositories from the terminal; opening, listing or merging pull requests without leaving the shell; setting up gh authentication and git credentials on a new machine; looking up the right gh subcommand and flags for a GitHub task.

How do I install GitHub CLI Reference in Claude Code?

Run `npx skills add papermark/papermark --skill gh-cli -a claude-code`. Or copy the skill folder (.agents/skills/gh-cli in papermark/papermark) into .claude/skills/gh-cli in your project. Claude Code loads it when a task matches its description.

How do I install GitHub CLI Reference in Codex?

Run `npx skills add papermark/papermark --skill gh-cli -a codex`. Or copy the skill folder (.agents/skills/gh-cli in papermark/papermark) into .agents/skills/gh-cli in your project. Codex loads it when a task matches its description.

Can I use GitHub CLI Reference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add papermark/papermark --skill gh-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-cli, .gemini/skills/gh-cli, .github/skills/gh-cli and .opencode/skills/gh-cli in your project.

What does GitHub CLI Reference need to run?

Going by SKILL.md and its folder, GitHub CLI Reference needs the command-line tools its instructions call (gh, git, apt, brew, curl and winget) and credentials named GH_TOKEN. Our summary lists: The GitHub CLI (`gh`) installed; A GitHub account, signed in with `gh auth login` or a GH_TOKEN token.

Does GitHub CLI Reference access the network?

SKILL.md names 3 domains. In commands or code: cli.github.com and github.com; the agent is likely to contact these when it follows the instructions. As links in the text: docs.github.com. This is read from the text; nothing was executed.

Is GitHub CLI Reference safe to install?

Our automated static check of SKILL.md flagged 4 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does GitHub CLI Reference use?

GitHub CLI Reference has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does GitHub CLI Reference use?

About 9.8k tokens (SKILL.md is roughly 39k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GitHub CLI Reference?

Skills that share tags, products or a category with GitHub CLI Reference: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Create Pull Request (cline/cline, 70k stars), Creating Description For Gh PR (redis/jedis, 12k stars) and Create Pull Request with Work Item ID (makeplane/plane, 61k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub CLI Reference?

papermark (a GitHub organization) maintains it in papermark/papermark, which has 9,242 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 28, 2026.

Source: papermark/papermark on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.