# OpenCLI Agent Pack: GitHub CLI

Use this when an AI agent needs to work with `gh`.

## What this CLI is for
The official CLI from GitHub. Pull requests, issue triage, and github actions from the terminal. Start with `gh auth login` and go from there. Supports structured output — good for scripts and agents.

Best for: pull requests, issue triage, and github actions from the terminal.

## Agent readiness
Great for agents (75/100)
- Structured output is available for parsing.
- Supports non-interactive/scripted use.
- Works well in CI or repeatable automation.

## Install
```sh
brew install gh
```

## Verify before real work
```sh
gh auth status
```
Expected signal: Shows the signed-in GitHub account and scopes.

## Safe starting commands
```sh
gh auth status
```

```sh
gh auth login && gh repo clone vercel/next.js
```

```sh
gh auth login
```

```sh
gh repo clone vercel/next.js
```

```sh
gh pr create --fill
```

## Guardrails for agents
- Verify identity/account before running task commands.
- Network access is required; avoid leaking secrets in logs.
- Start read-only, then ask before mutations.

## Suggested agent instruction
You may use GitHub CLI (`gh`) for pull requests, issue triage, and github actions from the terminal.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.

Source: OpenCLI
