agentsclimarketplace

Github data extractor

Skill cxcscmu/SkillLearnBench/skills/b4-skill-creator-gemini-3-flash-preview/github-repo-analytics/github-data-extractor

Expert guidance on using the GitHub CLI (gh) to extract pull request and issue data for specific timeframes and repositories. Use this skill whenever you need to gather metrics for community reports, activity analysis, or repository health checks.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill github-data-extractor

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

SKILL.md

2.3 KB, 532 tokens by cl100k_base, as published. Nobody here has run it

GitHub Data Extractor

This skill provides optimized gh CLI commands and strategies for extracting pull request and issue data from GitHub repositories.

Extracting Pull Requests

To list PRs created within a specific date range, use the gh pr list command with the --search flag.

Command Pattern

gh pr list --repo <owner>/<repo> --limit 1000 --json <fields> --search "created:YYYY-MM-DD..YYYY-MM-DD"

Key Fields for PRs

  • number: PR identifier.
  • author: For identifying contributors.
  • createdAt: Creation timestamp.
  • mergedAt: Merge timestamp (null if not merged).
  • closedAt: Closure timestamp.
  • state: MERGED, CLOSED, or OPEN.

Example: PRs in December 2024

gh pr list --repo cli/cli --limit 1000 --json number,author,createdAt,mergedAt,closedAt,state --search "created:2024-12-01..2024-12-31"

Extracting Issues

To list issues created within a specific date range, use the gh issue list command.

Command Pattern

gh issue list --repo <owner>/<repo> --limit 1000 --json <fields> --search "created:YYYY-MM-DD..YYYY-MM-DD"

Key Fields for Issues

  • number: Issue identifier.
  • labels: To identify bug reports.
  • createdAt: Creation timestamp.
  • closedAt: Closure timestamp.

Example: Issues in December 2024

gh issue list --repo cli/cli --limit 1000 --json number,labels,createdAt,closedAt --search "created:2024-12-01..2024-12-31"

Filtering for Bugs

A bug report is typically identified by labels. Use jq to filter issues where any label contains "bug".

# Example jq filter for bug labels
jq '[.[] | select(.labels[].name | contains("bug"))]'

Best Practices

  • Pagination: The gh CLI defaults to a limit of 30. Always use --limit 1000 (or higher if needed) to ensure you capture all activity in the period.
  • Date Format: ISO 8601 (YYYY-MM-DD) is required for search queries.
  • Rate Limiting: For extremely large repositories, be mindful of secondary rate limits when fetching thousands of items.

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.