Agent Skills: gh-api

>-

UncategorizedID: rcdailey/dotfiles/gh-api

Install this agent skill to your local

pnpm dlx add-skill https://github.com/rcdailey/dotfiles/tree/HEAD/home/dot_config/opencode/exact_skills/gh-api

Skill Files

Browse the full folder contents for gh-api.

Download Skill

Loading file tree…

home/dot_config/opencode/exact_skills/gh-api/SKILL.md

Skill Metadata

Name
gh-api
Description
>-

Use gh pr create --draft and gh pr ready [--undo] for draft status. Review comments belong to gh-pr-review. Consult gh api --help for request flags; the global explicit-method rule applies to REST and GraphQL alike.

Output Filtering

Mutation responses (POST, PATCH, PUT, DELETE) return the full object by default, which wastes context tokens. Always pipe through --jq to extract only the fields you need.

General pattern

For any mutation, append --jq selecting the fields the caller actually needs. Typical minimal set: {id, body, html_url}. Add state, title, or number when relevant.

Discussions (GraphQL)

GraphQL queries use POST too; HTTP method alone does not classify GraphQL operation semantics. Retrieve only needed fields and paginate when completeness matters:

gh api --method POST graphql -F owner=OWNER -F repo=REPO -f query='query(
  $owner: String!, $repo: String!
) {
  repository(owner: $owner, name: $repo) {
    discussions(first: 10) { nodes { number title url } }
  }
}'