CtrlK
BlogDocsLog inGet started
Tessl Logo

ambaba/github-pr-lister

List all PRs authored by the user across specified repos since a given date with full pagination.

94

Quality

94%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

SKILL.md

name:
github-pr-lister
description:
List all PRs authored by the user across specified repos since a given date. Returns PR titles, descriptions, repos, merge dates, and review counts. Trigger on: "list my PRs", "my pull requests since", "github contributions".

GitHub PR Lister

Leaf skill — lists all PRs authored by the current user since a given date across one or more GitHub repos.

Inputs

  • since_date: ISO date string (e.g., "2026-01-01"). Required.
  • repos: List of GitHub repos (e.g., ["CXEPI/cvi-ldos-ai"]). If empty, query all repos in the org.
  • org: GitHub org. Default: CXEPI.
  • author: GitHub username. Default: current authenticated user (gh api user --jq .login).

Scope

In scope: Listing PR metadata (number, title, body, dates, review status, URL) for a given author and date range. Out of scope: PR content diffs, review comments, CI status. The caller handles filtering and synthesis.

Prerequisites

gh auth status

If this fails, stop and tell the user: "Run gh auth login to authenticate the GitHub CLI."

Workflow

Step 1 — Identify repos

If repos not provided:

gh repo list ORG --limit 500 --json name --jq '.[].name'

Step 2 — Fetch PRs

For each repo:

gh pr list --repo ORG/REPO_NAME --author AUTHOR --state all --search "created:>=SINCE_DATE" --limit 500 --json number,title,body,mergedAt,createdAt,reviewDecision,url

Step 3 — Compile and return

- repo: ORG/repo-name
  pr: #123
  title: "PR title"
  created: 2026-01-15
  merged: 2026-01-16
  review_decision: APPROVED
  url: https://github.com/CXEPI/repo-name/pull/123

Pagination

Single authoritative rule: Never return partial results. Fetch ALL PRs in the date range.

  • Use --limit 500 per repo.
  • If result count == limit, double the limit and re-fetch. Max ceiling: 2000.
  • If 2000 is still hit, bisect the date range (split since_date to midpoint, fetch each half, merge).
  • For org-wide queries, iterate every repo returned in Step 1.

Validation (before returning)

  1. Confirm no repo was silently skipped without an explicit warning in output.
  2. Confirm total PR count == sum of per-repo counts.
  3. If any repo hit the 2000 ceiling even after bisection, flag it as a warning.

Error Handling

ConditionAction
gh auth status failsStop. Tell user to run gh auth login.
Repo not found / 404Skip repo, emit warning, continue.
Rate limited (403)Wait 60s, retry once. If still limited, return partial results + warning listing skipped repos.
Network errorReport error, list which repos succeeded vs failed.

Rules

  • Include both merged and unmerged PRs — caller decides what to filter.
  • Do not summarize or filter — return raw metadata.

SKILL.md

tile.json