Run3 GitHub CLI Data Retrieval
Used to query, filter, and extract metadata from GitHub PRs and Issues using the `gh` command line tool with appropriate search qualifiers and pagination limits.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run3_GitHub-CLI-Data-RetrievalAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.2 KB, 252 tokens by cl100k_base, as published. Nobody here has run it
To retrieve data from GitHub using the gh CLI, follow these standards:
- Broaden Scope: Always use the
-s allflag (orstate:all) to ensure the command retrieves merged, closed, and open items. - Apply Search Qualifiers: Use the
-Sflag with the search querycreated:2024-12-01..2024-12-31. Do not use date ranges that exceed the repository activity window. - Lift Limits: Explicitly set the
--limitflag to a high value (e.g.,--limit 1000) to avoid the default truncation of results, which causes inaccurate counts. - Select Fields Carefully: When using
--json, always verify the object path. For user names, useauthor.login. For dates, usecreatedAt,mergedAt, andclosedAtto ensure accurate time calculations. - JSON Formatting: Rely on
jqto process raw JSON output fromgh. Ensure all calculations (averages, counts) handle empty arrays by providing default values (e.g.,0) to prevent null-pointer or syntax errors in the final output file.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.