Agent skill

Gh CLI

by farm-fe in farm-fe/farm

A skill your agent uses when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API.

MITAuto-check passedDevelopment

Install Gh CLI

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

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

GitHub CLI
$ gh skill install farm-fe/farm 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/farm-fe/farm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/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
5.6k
Token cost
~1.5k tokens
SKILL.md length
575 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API.

  • Working with GitHub via the gh CLI - managing PRs
  • SKILL.md covers Overview, Prerequisites, Common Operations and Typical Patterns in Farm, plus 2 more sections
  • Calls gh and git; needs GH_TOKEN
  • Calling the GitHub API

What it does

Gh CLI is an agent skill from farm-fe/farm. Use when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API. Triggers on tasks involving GitHub operations, PR creation/management, issue tracking, release workflows, or any gh command usage.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires gh CLI installed and authenticated (gh auth login).

It sits in Development, covering Task management. It works with GitHub. The repository describes itself as: Extremely fast Vite-compatible web build tool written in Rust. The licence is MIT.

When your agent uses it

  • Working with GitHub via the gh CLI - managing PRs
  • Calling the GitHub API
  • Tasks involving GitHub operations
  • PR creation/management

Example prompts

  • “/gh-cli”

Requirements

  • Compatibility (from SKILL.md): Requires gh CLI installed and authenticated (gh auth login).

What it can do on your machine

Read from SKILL.md and the folder at commit 2000ef8. 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

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

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    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.

  • Compatibility

    Requires gh CLI installed and authenticated (gh auth login).

    From compatibility in the SKILL.md frontmatter.

Context cost

Gh CLI loads about 1.5k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 575 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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

The full file from farm-fe/farm at commit 2000ef8, republished under its MIT licence (© farm-fe). 575 words, ~1,478 tokens.

Download SKILL.mdSave it as .claude/skills/gh-cli/SKILL.md (or your agent's skills folder).
name
gh-cli
description
Use when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API. Triggers on tasks involving GitHub operations, PR creation/management, issue tracking, release workflows, or any gh command usage.
compatibility
Requires gh CLI installed and authenticated (gh auth login).
license
MIT
metadata.author
farm
metadata.version
1.0

GH CLI

Quick reference for the GitHub CLI (gh). Covers the most common operations in the farm repo workflow.

Overview

gh is GitHub's official CLI tool. It wraps the GitHub API and Git operations into composable commands. Most commands accept --json for structured output and --jq for filtering.

Prerequisites

bash
gh auth status                          # verify authenticated
gh auth login                           # authenticate if needed

Common Operations

Pull Requests
OperationCommand
List PRsgh pr list --state open
List PRs for current branchgh pr list --head "$(git branch --show-current)" --json number,title,state,url
Create from current branchgh pr create --fill
Create with explicit title/bodygh pr create --title "feat: ..." --body "...description..."
Create with body from filegh pr create --title "..." --body-file body.md
View PR detailsgh pr view [number]
View PR by branchgh pr view --head "$(git branch --show-current)"
Check PR out locallygh pr checkout <number>
View CI checksgh pr checks [number]
Merge PRgh pr merge <number> --squash
Close PRgh pr close <number>
Comment on PRgh pr comment <number> --body "..."
Request reviewgh pr edit <number> --add-assignee @me --add-reviewer @user
Draft PRgh pr create --draft --title "..." --body "..."
Issues
OperationCommand
List issuesgh issue list --state open --limit 20
Create issuegh issue create --title "..." --body "..."
Create with typegh api repos/{owner}/{repo}/issues -X POST -f title=... -f body=... -f type="Bug"
View issuegh issue view <number>
Close issuegh issue close <number>
Reopen issuegh issue reopen <number>
Comment on issuegh issue comment <number> --body "..."
Edit issue labelsgh issue edit <number> --add-label "bug" --remove-label "wip"

Note: gh issue create does not support --type. Use gh api for issue types (see API section below).

Repositories
OperationCommand
Clone a repogh repo clone owner/repo
Fork a repogh repo fork owner/repo
View repo infogh repo view --json nameWithOwner,description,defaultBranch
List releasesgh release list
View releasegh release view v1.0.0
Create releasegh release create v1.0.0 --title "..." --notes "..."
Workflows & CI
OperationCommand
List workflowsgh workflow list
View workflow runsgh run list --workflow "CI" --limit 10
Watch a rungh run watch <run-id>
View run logsgh run view <run-id> --log
Re-run failedgh run rerun <run-id> --failed
Cancel a rungh run cancel <run-id>
Download artifactsgh run download <run-id>
Show full SKILL.md (211 more words)Show less
OperationCommand
Search issuesgh search issues "query" --owner org --repo repo
Search PRsgh search prs "query" --owner org --repo repo
Search codegh search code "term" --owner org --repo repo
API Access

Call arbitrary GitHub REST endpoints:

bash
gh api repos/{owner}/{repo}/issues \
  -X POST \
  -f title="Title" \
  -f body="Body in markdown" \
  -f labels[]="bug" \
  --jq '{number, html_url}'

For GraphQL:

bash
gh api graphql -f query='
  query($owner: String!, $repo: String!) {
    repository(owner: $owner, name: $repo) {
      issues(first: 5, states: OPEN) {
        nodes { number title }
      }
    }
  }
' -f owner=org -f repo=repo

Key flags for gh api:

  • -X METHOD — HTTP method (GET, POST, PATCH, DELETE)
  • -f key=value — form field (repeat for multiple values; use -f key[]=val for arrays)
  • -F key=@file — file upload
  • --jq '...' — filter JSON output with jq syntax
  • --paginate — follow pagination automatically
  • -H "Header: value" — custom headers

Typical Patterns in Farm

Create a PR for the current branch
bash
git push -u origin "$(git branch --show-current)"
gh pr create --fill

If --fill fails, provide explicit title/body:

bash
gh pr create --title "feat: description" --body "Closes #123"
Check if a branch already has a PR
bash
gh pr list --head "$(git branch --show-current)" --json number,title,state,url

Returns empty [] if no PR exists.

View CI status for a PR
bash
gh pr checks
# or for a specific PR
gh pr checks <number>
Merge a PR with squash
bash
gh pr merge --squash --delete-branch

JSON Output and Filtering

Most gh commands support --json and --jq:

bash
# Get PR number and URL
gh pr list --head "my-branch" --json number,url --jq '.[0] | {number, url}'

# Get specific field
gh pr view --json title --jq '.title'

# List PR numbers only
gh pr list --state open --json number --jq '.[].number'

Tips

  • Use --json + --jq instead of parsing text output
  • gh pr create --fill uses branch commits for title/body — works best with conventional commits
  • gh api is the escape hatch when built-in commands lack features (e.g., issue types)
  • For GitHub Actions secrets: gh secret set NAME --body "value" --repo owner/repo
  • GH_TOKEN env var or GH_HOST can target different GitHub instances
  • Run gh <command> --help for full flag documentation on any command

© farm-fe, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/gh-cli of farm-fe/farm.

Open the folder on GitHubat commit 2000ef8

Compare with similar skills

Gh CLI 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.

Gh CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh CLI this skillfarm-fe/farm5.6k—~1.5kAutomated safety check: PassMIT
Kanvibe Release Deployrookedsysc/kanvibe143—~12kAutomated safety check: NotesAGPL-3.0
Git Project Statusespennilsen/pi122—~4.4kAutomated safety check: NotesMIT
OpenObserve PR Briefopenobserve/openobserve22k—~1.8kAutomated safety check: PassAGPL-3.0
Spec Driven Developzhu1090093659/spec_driven_develop983—~5.1kAutomated safety check: PassMIT
Release Kanban Mdantopolskiy/kanban-md223—~1.2kAutomated safety check: PassMIT

Similar skills

  • Kanvibe Release Deploy

    rookedsysc/kanvibe

    A skill your agent uses whenever releasing or deploying KanVibe desktop from a clean, up-to-date dev checkout: ask only for the target version and release-note approval, then let the AI update…

    143 GitHub stars~12k tokensUpdated today
    DevelopmentAuto-check: notes
  • Git Project Status

    espennilsen/pi

    Generate comprehensive status reports for git repositories. An agent skill from espennilsen/pi.

    122 GitHub stars~4.4k tokensUpdated 15 days ago
    DevelopmentAuto-check: notes
  • OpenObserve PR Brief

    openobserve/openobserve

    Produces a read-only morning brief of your open pull requests across the openobserve GitHub org, with a next step for each and a reminder for idle ones.

    22k GitHub stars~1.8k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Spec Driven Develop

    zhu1090093659/spec_driven_develop

    Automates pre-development workflow for large-scale complex tasks.

    983 GitHub stars~5.1k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Release Kanban Md

    antopolskiy/kanban-md

    Release kanban-md through its tag-triggered GoReleaser workflow, monitor CI, recover safely from failures, and publish user-facing GitHub release notes.

    223 GitHub stars~1.2k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • GitHub Automation

    ruvnet/ruflo

    GitHub workflow automation, PR management, issue tracking, and code review coordination.

    74k GitHub starsUsed in 2 repos~368 tokens
    DevelopmentAuto-check passed

More from farm-fe/farm

All 20 skills in this repo
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 34 repos~1.4k tokens
    Auto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 33 repos~1.8k tokens
    Auto-check passed
  • A skill your agent uses when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and…

    5.6k GitHub starsUsed in 44 repos~1.6k tokens
    Auto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    Auto-check passed
  • A skill your agent uses when completing tasks, implementing major features, or before merging to verify work meets requirements

    5.6k GitHub starsUsed in 37 repos~702 tokens
    Auto-check passed
  • A skill your agent uses when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any…

    5.6k GitHub starsUsed in 45 repos~1k tokens
    Auto-check passed

Works with

Questions about Gh CLI

What does Gh CLI do?

A skill your agent uses when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API. Gh CLI is an agent skill from farm-fe/farm. Use when working with GitHub via the gh CLI - managing PRs, issues, releases, repos, workflows, searching code, or calling the GitHub API.

When should I use Gh CLI?

Gh CLI fits situations like: working with GitHub via the gh CLI - managing PRs; calling the GitHub API; tasks involving GitHub operations; PR creation/management.

How do I install Gh CLI in Claude Code?

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

How do I install Gh CLI in Codex?

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

Can I use Gh CLI 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 farm-fe/farm --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 Gh CLI need to run?

Going by SKILL.md and its folder, Gh CLI needs the command-line tools its instructions call (gh and git) and credentials named GH_TOKEN. Compatibility (from SKILL.md): Requires gh CLI installed and authenticated (gh auth login)..

Does Gh CLI access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Gh CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh CLI use?

Gh CLI is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh CLI use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Gh CLI?

Skills that share tags, products or a category with Gh CLI: Kanvibe Release Deploy (rookedsysc/kanvibe, 143 stars), Git Project Status (espennilsen/pi, 122 stars), OpenObserve PR Brief (openobserve/openobserve, 22k stars) and Spec Driven Develop (zhu1090093659/spec_driven_develop, 983 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh CLI?

farm-fe (a GitHub organization) maintains it in farm-fe/farm, which has 5,594 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on September 22, 2026.

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