cxcscmu/skilllearnbench/github-metrics
Claude Code and agent skill by cxcscmu/skilllearnbench
- community
Checking that the SKILL.md file is still in the repository.
How to calculate GitHub community pulse metrics using the `gh` CLI. Use this skill whenever the user asks for pull request metrics, issue metrics, community pulse, average merge times, top contributors, or bug reports over a specific timeframe.
Install
npx vskill@latest install cxcscmu/skilllearnbench/github-metricsSKILL.md
The same SKILL.md was published earlier as cxcscmu/skilllearnbench/github-metrics.
GitHub Community Metrics (gh-pulse)
Use this skill when you need to calculate metrics about GitHub repositories, such as PRs created, issues created, average merge times, and top contributors.
Tools to use
You should use the gh CLI for querying GitHub's API. To get raw data over a specific timeframe, you should leverage the --search flag with date queries.
Fetching PR Metrics
To fetch PRs created within a month (e.g., Dec 2024), use:
This gives you a JSON array of PR objects. You can then process this JSON using tools like jq or a small Python script to calculate:
- Total: Length of the array.
- Merged: Count where
stateis "MERGED" (or wheremergedAtis not null). Note that GitHub CLI'sstatefield might sayMERGEDor it might just sayCLOSEDwith amergedAttimestamp depending on the query, so prefer usingmergedAtorstate. - Closed: Count where
stateis "CLOSED" and it's not merged. - Average Time-to-Merge: For each merged PR, parse
createdAtandmergedAt(ISO 8601), compute the difference in days, sum them up, divide by merged count. Round to one decimal. - Top Contributor: Tally
author.loginof each PR, find the maximum.
Fetching Issue Metrics
To fetch Issues created within a timeframe, use:
- Total: Length of the array.
- Bugs: Filter where at least one label's name contains "bug" (case-insensitive substring).
- Resolved/Closed Bugs: Of those bugs, count how many have
stateas "CLOSED".
Best Practices
- Write a short Python script to orchestrate the
ghcalls and compute metrics. This is much more reliable and robust than attempting complex bash strings. - Always add
--limitlarge enough to capture the month's activity (e.g.,--limit 1000).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/b4-skill-creator-gemini-3.1-pro-preview/github-repo-analytics/github-metrics/SKILL.md
Popularity
- Repository stars
- 83
- Repository forks
- 7
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. 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/cxcscmu/skilllearnbench/github-metrics)