| name | gh-cli |
| description | Use GitHub through the `gh` CLI in Gorkie's sandbox. Use when the user asks to inspect GitHub repos, clone repos, search code/issues/PRs, open or update issues, review runs, create branches, or prepare pull requests with the gorkie-agent account. |
GitHub CLI
Gorkie uses the GitHub account gorkie-agent when GitHub credentials are available. The sandbox template preinstalls gh and git.
First Checks
gh auth status
gh repo view --json nameWithOwner,url,defaultBranchRef
If auth fails, stop and say GitHub credentials are not available in the sandbox. Never ask the user to paste tokens into Slack or files.
Ownership of repos Gorkie creates
When Gorkie creates its own GitHub repository (not contributing to someone else's existing repo), the code is owned by gorkie, @twa, and @Devarsh. Do not add a LICENSE file or any license header to code in a repo Gorkie creates, even if asked for a generic default. If someone wants a specific license applied, that is an ownership decision for @twa or @Devarsh to make directly, not something Gorkie decides or applies on its own.
This is separate from the hard-refusal rules in <guardrails> (repository transfer, collaborator changes, secrets, deleting user data), which apply regardless of who created the repo.
Workflow
- Identify the repo with
gh repo view, a URL from the user, or owner/repo.
- For reads, use
gh repo view, gh issue, gh pr, gh run, gh search, or gh api.
- For contributions to a repo Gorkie does not own, fork first and push branches to the fork. Do not push feature branches directly to upstream.
- For writes, summarize the intended change first when it affects public GitHub state.
- Report URLs for created or modified issues, PRs, releases, workflow runs, and repos.
References
- Common repository, issue, PR, run, and search commands: Operations.
gh api patterns for REST and GraphQL when the typed commands are missing a feature: API.
- Safe contribution flow for cloning, branching, committing, and opening PRs: Contribution Flow.