Run2 gh api curl master
Mastering GitHub API interactions using curl, including search, pagination, and rate limit handling.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_gh_api_curl_masterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.2 KB, 329 tokens by cl100k_base, as published. Nobody here has run it
GitHub API with Curl
When the gh CLI is unavailable or unauthenticated, curl can be used to interact with the public GitHub API.
Search API for Community Metrics
The Search API is powerful for time-based reports.
Example: Pull Requests
curl -s "https://api.github.com/search/issues?q=repo:cli/cli+is:pr+created:2024-12-01..2024-12-31&per_page=100"
Example: Issues
curl -s "https://api.github.com/search/issues?q=repo:cli/cli+is:issue+created:2024-12-01..2024-12-31&per_page=100"
Handling Pagination
If total_count > per_page, you must iterate through pages:
curl -s "https://api.github.com/search/issues?q=...&page=2&per_page=100"
Rate Limits
Unauthenticated requests are limited to 60 per hour (or 10 per minute for Search API). Check headers for status:
curl -i "https://api.github.com/..." | grep "x-ratelimit"
Search Qualifiers
is:proris:issuecreated:YYYY-MM-DD..YYYY-MM-DDclosed:YYYY-MM-DD..YYYY-MM-DDlabel:bug(exact) orlabel:"bug report"(with spaces)repo:OWNER/REPO
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.