FrancyJGLisboa/agent-skills-platform / references/examples/pr-blocker-summarizer
pr-blocker-summarizer
UnverifiedSummarizes open pull requests into a blockers-first standup digest. Activates when the user asks to summarize open PRs, find blocked pull requests, generate a PR standup, or triage review backlog from a PR export.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.9 KB |
| SKILL.md | skill md | 2.7 KB |
| VERIFICATION.md | markdown | 849 B |
| contracts/data_contract_pull_request_reviews/.contract_id | other | 20 B |
| contracts/data_contract_pull_request_reviews/code/contract_health.py | script | 402 B |
| discovery.json | config | 2.2 KB |
| evals/golden/case-1/expected.json | config | 396 B |
| evals/golden/case-1/input.json | config | 339 B |
| evals/golden/case-2/expected.json | config | 152 B |
| evals/golden/case-2/input.json | config | 209 B |
| evals/golden/case-3/expected.json | config | 233 B |
| evals/golden/case-3/input.json | config | 106 B |
| evals/pr-blocker-summarizer.eval.md | markdown | 1.8 KB |
| scripts/dependency_health.py | script | 3.9 KB |
| scripts/evolve.pyexecutable | script | 10.2 KB |
| scripts/review_staleness.py | script | 6.2 KB |
| scripts/run_evals.pyexecutable | script | 49.4 KB |
| scripts/run_pipeline.pyexecutable | script | 2.7 KB |
| scripts/schema_drift.py | script | 7.3 KB |
| scripts/skill_document.py | script | 9.8 KB |
| scripts/staleness_check.py | script | 7.5 KB |
| scripts/success_ledger.py | script | 16.5 KB |
scripts/run_pipeline.py
View on GitHub#!/usr/bin/env python3
"""Deterministic entry-point for the pr-blocker-summarizer skill.
Reads a JSON array of open PRs, classifies each as blocked or ready, and writes a
blockers-first digest. Stdlib-only.
python3 scripts/run_pipeline.py --input prs.json --output digest.json
"""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
STALE_DAYS = 7
def blockers_for(pr: dict) -> list[str]:
"""Return the list of reasons a PR is blocked (empty list = not blocked)."""
reasons: list[str] = []
if pr.get("checks") == "failing":
reasons.append("failing checks")
if pr.get("review") == "changes_requested":
reasons.append("changes requested")
if pr.get("review") == "pending":
reasons.append("awaiting review")
try:
if int(pr.get("age_days", 0)) >= STALE_DAYS:
reasons.append(f"stale ({pr['age_days']}d)")
except (TypeError, ValueError):
pass
return reasons
def summarize(prs: list[dict]) -> dict:
"""Split PRs into blocked vs. ready and build a one-line summary."""
blocked: list[dict] = []
ready: list[str] = []
for pr in prs:
title = pr.get("title", "(untitled)")
reasons = blockers_for(pr)
if reasons:
blocked.append({"title": title, "reasons": reasons})
elif pr.get("checks") == "passing" and pr.get("review") == "approved":
ready.append(title)
return {
"total": len(prs),
"blocked": blocked,
"ready": ready,
"summary": f"{len(prs)} open · {len(blocked)} blocked · {len(ready)} ready to merge",
}
def run_pipeline(input_path: Path, output_path: Path) -> Path:
"""Read the PR JSON array, build the digest, write JSON. Return output path."""
prs = json.loads(input_path.read_text(encoding="utf-8"))
if not isinstance(prs, list):
raise ValueError("input must be a JSON array of pull requests")
output_path.write_text(json.dumps(summarize(prs), indent=2), encoding="utf-8")
return output_path
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description="Summarize open PRs into a digest.")
parser.add_argument("--input", required=True, help="JSON array of PRs.")
parser.add_argument("--output", required=True, help="Where to write digest JSON.")
args = parser.parse_args(argv)
try:
run_pipeline(Path(args.input), Path(args.output))
except (OSError, ValueError, json.JSONDecodeError) as exc:
print(json.dumps({"error": str(exc), "error_type": "runtime"}), file=sys.stderr)
return 1
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |