gh-activity-query
Query GitHub repository activity (PRs, issues) for a date range using the gh CLI. Use this skill whenever you need to fetch pull request or issue data from a GitHub repository, compute statistics like counts, merge times, or identify top contributors. Triggers on tasks involving GitHub activity reports, community pulse summaries, or repository metrics gathering.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- gh-activity-query
- description
- Query GitHub repository activity (PRs, issues) for a date range using the gh CLI. Use this skill whenever you need to fetch pull request or issue data from a GitHub repository, compute statistics like counts, merge times, or identify top contributors. Triggers on tasks involving GitHub activity reports, community pulse summaries, or repository metrics gathering.
03 SKILL.md 正文
GitHub Activity Query
Fetch and analyze pull request and issue data from GitHub repositories using the gh CLI.
Pull Request Queries
List PRs created in a date range
gh pr list --repo OWNER/REPO --state all --search "created:YYYY-MM-DD..YYYY-MM-DD" \
--json number,author,createdAt,mergedAt,closedAt,state --limit 300
--state allincludes open, closed, and merged PRs.--searchuses GitHub search qualifiers;created:START..ENDfilters by creation date.--jsonselects fields;authorreturns{login},stateisOPEN|CLOSED|MERGED.--limitdefaults to 30; raise it to capture all results for busy repos.
Counting and classifying PRs
- Total: length of the result array.
- Merged: items where
state == "MERGED"(ormergedAtis non-null). - Closed (not merged): items where
state == "CLOSED"andmergedAtis null. - Time-to-merge: difference between
mergedAtandcreatedAtin days.
Top contributor
Group by author.login, count PRs per author, pick the one with the highest count.
Issue Queries
List issues created in a date range
gh issue list --repo OWNER/REPO --state all --search "created:YYYY-MM-DD..YYYY-MM-DD" \
--json number,labels,createdAt,closedAt,state --limit 300
- Labels come as
[{name, ...}]; check if any label'snamecontains the substringbug(case-insensitive).
Bug detection
A bug report is any issue where at least one label's name contains the substring bug.
Resolved bugs
A bug is "resolved" if it is a bug report AND its closedAt falls within the target month (or it has state == "CLOSED" if checking as-of-now status). Clarify the definition with the requester — "closed during the month" vs "closed as of today".
Pagination
The gh CLI --limit flag controls how many results to return. For months with heavy activity, use --limit 500 or higher. If the result count equals the limit exactly, there may be more results — increase the limit and re-run.
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.