matthewp/gh-skills/github-api
Claude Code and agent skill by matthewp/gh-skills
- community
Checking that the SKILL.md file is still in the repository.
GitHub REST API calls with a token you are given. Uses a token supplied by the caller (GITHUB_TOKEN, or passed in by an orchestrator/workflow) to read or write issues, pull requests, repos, commits, file contents, Actions runs, and notifications, and to search — picking the right endpoint, paginating, and reading results. It does NOT log anyone in or obtain credentials: if no token is available it stops and says so. Use in headless/server contexts or when a token is provided; for interactive OAuth login use the `github-client` skill instead.
Install
npx vskill@latest install matthewp/gh-skills/github-apiSKILL.md
GitHub REST API
Use this skill to read and write GitHub data through the REST API at https://api.github.com. You issue the HTTP requests yourself with whatever capability you have — a shell (curl), an HTTP request tool, or a language runtime. This skill tells you which request to make and how to read the result.
Using your token
This skill makes calls with a token provided to you — it does not log anyone in or obtain credentials itself.
- Use the token from
GITHUB_TOKEN, or one handed to you by the caller
(orchestrator, workflow, or environment).
- Send it as
Authorization: Bearer <token>on every request, together with
Accept: application/vnd.github+json and X-GitHub-Api-Version: 2022-11-28.
- If no token is available, stop and say so — you cannot acquire one here.
(The github-client skill handles interactive OAuth login; this skill is for headless use where a token is supplied.)
- Only ever send the token to
api.github.com— never put it in a URL, send it
to another host, echo it, or write it to a shared/committed file.
When is a token required? Public, read-only data works without one but is capped at 60 requests/hour (authenticated: 5,000/hour), and private resources are invisible (they return 404). Anything private, any write, and search/code require a token.
The request shape
Every call is METHOD https://api.github.com<path> with the three headers above. Paths use {owner}/{repo} and resource ids, e.g. /repos/{owner}/{repo}/issues/{number}. Bodies (for POST/PATCH) are JSON; add -H "Content-Type: application/json" -d '{...}'.
Most-used recipes
5 most recent open issues in a repo (newest first; note: this endpoint also returns pull requests — skip any item that has a pull_request field):
Search issues/PRs across GitHub (returns { total_count, items }):
One issue with its body: GET /repos/{owner}/{repo}/issues/{number} Recent commits on a branch: GET /repos/{owner}/{repo}/commits?sha={branch}&per_page=10 A file's contents: GET /repos/{owner}/{repo}/contents/{path}?ref={branch} (content is base64; or send Accept: application/vnd.github.raw for the raw bytes).
See references/endpoints.md for the full catalog and references/search-syntax.md for search qualifiers.
Conventions that trip people up
- "Most recent" / "latest" →
sort=created&direction=desc. "Top N" →per_page=N. - The repo issues list includes PRs. Filter them out by checking for a
pull_requestkey on each item. - Pagination:
per_page(max 100) +page. The responseLinkheader carriesrel="next"; follow it to page, stop when it's absent. - Dates are ISO 8601 UTC (
2026-06-19T20:13:00Z). Search supports ranges likecreated:>=2026-01-01. - Search has its own, lower rate limit (~30 requests/min) and caps results at 1,000 — narrow the query rather than paging deeply.
- Prefer the smallest request: a specific path +
per_pageover fetching everything and filtering client-side.
Errors & rate limits
401invalid/expired token — the supplied token is bad or expired; request a fresh one from whoever provided it.403often a rate-limit or permission issue ·404missing or no access (GitHub hides private resources as 404) ·422validation error (bad query/params).- Check
X-RateLimit-RemainingandX-RateLimit-Reset(epoch seconds). On403/429with aRetry-Afterheader, wait that many seconds before retrying. Back off on secondary-rate-limit messages. - On error, the JSON body has a
messageand often adocumentation_url— read it before retrying.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggithub-api/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/matthewp/gh-skills/github-api)