agentsclimarketplace

Run3 github search issues

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-sonnet-4-6/github-repo-analytics/run3_github-search-issues

Use `gh search issues` to fetch issues from a specific repo within a date range. Returns structured JSON. More reliable than `gh issue list --search` for date-range filtering.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run3_github-search-issues

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, 523 tokens by cl100k_base, as published. Nobody here has run it

Fetching Issues with gh search issues

Use gh search issues (not gh issue list) for reliable date-range filtering.

Command pattern

gh search issues \
  --repo OWNER/REPO \
  --created "YYYY-MM-DD..YYYY-MM-DD" \
  --limit 200 \
  --json number,title,state,createdAt,closedAt,labels

Key flags

  • --repo — target repository
  • --created "2024-12-01..2024-12-31" — server-side date range filter
  • --limit 200 — max results
  • --json — comma-separated list of fields; include labels for bug detection

Post-fetch date verification (safety net)

import json, subprocess
from datetime import datetime, timezone

START = datetime(2024, 12, 1, tzinfo=timezone.utc)
END   = datetime(2024, 12, 31, 23, 59, 59, tzinfo=timezone.utc)

result = subprocess.run([
    "gh", "search", "issues",
    "--repo", "cli/cli",
    "--created", "2024-12-01..2024-12-31",
    "--limit", "200",
    "--json", "number,title,state,createdAt,closedAt,labels"
], capture_output=True, text=True, check=True)

all_issues = json.loads(result.stdout)

# Post-fetch filter
issues = [
    issue for issue in all_issues
    if START <= datetime.fromisoformat(issue["createdAt"].replace("Z", "+00:00")) <= END
]

Detecting bug reports

A bug report is any issue where at least one label's name contains the substring bug (case-insensitive).

def is_bug(issue):
    return any("bug" in label["name"].lower() for label in issue.get("labels", []))

bug_issues = [i for i in issues if is_bug(i)]

Counting resolved (closed) bugs within the month

from datetime import datetime, timezone

def closed_in_month(issue):
    closed = issue.get("closedAt")
    if not closed:
        return False
    dt = datetime.fromisoformat(closed.replace("Z", "+00:00"))
    return START <= dt <= END

resolved_bugs = [i for i in bug_issues if closed_in_month(i)]

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.