agentsclimarketplace

Run3 calculate github community metrics

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-gemini-3-flash-preview/github-repo-analytics/run3_calculate_github_community_metrics

Processes JSON data from GitHub Search results to compute specific repository health metrics including average merge time, top contributors, and bug resolution counts.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run3_calculate_github_community_metrics

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.7 KB, 386 tokens by cl100k_base, as published. Nobody here has run it

When calculating metrics from the JSON output of a paginated GitHub Search API call, use the following logic patterns:

PR Metrics

  • Merged Count: Filter items where merged_at != null.
  • Closed Count: Filter items where state == "closed" and merged_at == null.
  • Average Merge Days:
    • Filter for merged PRs.
    • Calculate the difference between merged_at and created_at using ( (.merged_at | fromdateiso8601) - (.created_at | fromdateiso8601) ) / 86400.
    • Use add / length to find the average and round or multiplication/division logic for decimal precision.
  • Top Contributor: Use group_by(.user.login), sort by group length, and select the login of the last group.

Issue Metrics

  • Bug Identification: Use a case-insensitive check for the substring "bug" within any of the issue's labels. Logic: .labels[].name | ascii_downcase | contains("bug").
  • Resolved Bugs: To accurately report bugs resolved during a month, query for issues closed in that period (closed:YYYY-MM-DD..YYYY-MM-DD) and then filter the results for labels containing "bug".

JQ Integration Example

To compute average merge time to one decimal place:

jq '[.[] | select(.merged_at != null) | ((.merged_at | fromdateiso8601) - (.created_at | fromdateiso8601)) / 86400] | (add / length * 10 | round / 10)' input.json

To identify the user who opened the most PRs:

jq -r 'group_by(.user.login) | sort_by(length) | last | .[0].user.login' input.json

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.