Skip to content
Skills Library
Data & analytics · Analysis

github-metrics

/github-metrics

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.

Licence
MIT
Last repository change
02.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author description

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.

How it works

  1. Tools to use
  2. Fetching PR Metrics
  3. Fetching Issue Metrics
  4. Best Practices
Original SKILL.md headings · 34 lines, 318 words
SKILL.md preview
---
name: github-metrics
description: "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."
---

# 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:
```bash
gh pr list -R <owner>/<repo> --search "created:2024-12-01..2024-12-31" --state all --json number,state,createdAt,mergedAt,author --limit 1000
```
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 `state` is "MERGED" (or where `mergedAt` is not null). Note that GitHub CLI's `state` field might say `MERGED` or it might just say `CLOSED` with a `mergedAt` timestamp depending on the query, so prefer using `mergedAt` or `state`.
- **Closed**: Count where `state` is "CLOSED" and it's not merged.
- **Average Time-to-Merge**: For each merged PR, parse `createdAt` and `mergedAt` (ISO 8601), compute the difference in days, sum them up, divide by merged count. Round to one decimal.
- **Top Contributor**: Tally `author.login` of each PR, find the maximum.

## Fetching Issue Metrics
To fetch Issues created within a timeframe, use:
```bash
gh issue list -R <owner>/<repo> --search "created:2024-12-01..2024-12-31 is:issue" --state all --json number,state,labels --limit 1000
```
- **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 `state` as "CLOSED".

## Best Practices
- Write a short Python script to orchestrate the `gh` calls and compute metrics. This is much more reliable and robust than attempting complex bash strings.
- Always add `--limit` large enough to capture the month's activity (e.g., `--limit 1000`).

Versions

The database has no other skills named github-metrics.

Database snapshot: 13.11.2026 · package version e5e746f29b05 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gh-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…
  • 100gh-pr-analysis
    How to fetch and analyze pull request data from a GitHub repository for a given time period: counts, merge rates, average time-to-merge, and top contributors. Use this skill whenever the user wants PR metrics, pull request summaries, contributor leaderboards, or community pulse reports.
  • 100evo-gh-report-generator
    Computes community pulse metrics from raw PR and issue data and writes a structured report.json file. Calculates PR counts by state, average time-to-merge, top contributor, bug issue counts, and resolved bugs. Use when you need to generate GitHub repository health metrics reports.
  • 100github-dashboard
    GitHub repository analytics dashboard — stars, forks, contributors, issues, pull requests, recent activity, and top contributors. Use when the brief asks for a GitHub repo dashboard, open-source growth report, repository health page, or GitHub analytics view.
  • 100pulse-weekly
    Weekly community analysis report — aggregates Discord AND WhatsApp activity, engagement metrics, sentiment trends, top contributors, product insights, and docs gaps. Generates an HTML report using the Evolution brand. Use when user says 'weekly community', 'community analysis',…
  • 90community-pulse
    Use when gauging community sentiment, bug reports, or feature requests about Claude Code via Exa search.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.