agentsclimarketplace

Run3 Query GitHub PRs for December Activity

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-haiku-4-5/github-repo-analytics/run3_Query-GitHub-PRs-for-December-Activity

Fetch all pull requests created in December 2024 from cli/cli repository using the GitHub CLI, applying correct date range filtering to ensure accurate total count and contributor identification.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run3_Query-GitHub-PRs-for-December-Activity

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

SKILL.md

2.1 KB, 486 tokens by cl100k_base, as published. Nobody here has run it

Query GitHub PRs for December Activity

Overview

Use gh pr list with proper date range syntax to retrieve all PRs created between 2024-12-01 and 2024-12-31 in the cli/cli repository.

Step 1: Test the Search Syntax

First, verify the correct syntax for date range filtering with gh pr list:

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

Critical Notes:

  • gh pr list may NOT support --search flag directly — check gh pr list --help
  • If --search doesn't work, you may need to use gh api graphql instead for complex date filtering
  • Test this command locally first to confirm it returns results before using in scripts
  • The date format YYYY-MM-DD should be ISO-8601 compatible
  • Increase --limit if you expect more than 200 PRs

Step 2: Verify Output Fields

Ensure the JSON output contains:

  • number: PR identifier
  • author: Object with login field (for top contributor)
  • createdAt: ISO-8601 timestamp (for date range filtering)
  • mergedAt: ISO-8601 timestamp or null (indicates merge status)
  • closedAt: ISO-8601 timestamp or null
  • state: Should be MERGED, CLOSED, or OPEN (verify actual values)

Step 3: Parse and Count

From the returned JSON:

  • Count total number of records returned
  • Count records where state == "MERGED" (do NOT use mergedAt != null alone)
  • Count records where state == "CLOSED" (and mergedAt == null to exclude merged PRs)
  • Extract author login and count occurrences to find top contributor

Troubleshooting

  • If counts are still too high, check if --search is including PRs outside the date range
  • Verify state values are exactly as expected (case-sensitive)
  • Consider using GraphQL query if CLI flags prove unreliable

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.