clice-io/kotatsu / .claude/skills/pr
pr
VerifiedThe full pipeline from "code is ready" to "ready to merge" — pre-push verification, three-way self-review, opening the PR, watching CI and review threads. Read BEFORE committing, opening a PR, or checking on an open one.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.6 KB |
| scripts/comments.py | script | 10.8 KB |
| scripts/info.py | script | 3.2 KB |
scripts/info.py
View on GitHub"""Print one screen of PR state: metadata, merge state, checks, review load.
python3 info.py [PR] [--commits N]
"""
import argparse
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
from comments import (
clean,
current_pr,
fetch_reviews,
fetch_threads,
gh,
is_finding,
login,
repo,
) # noqa: E402
VIEW_FIELDS = (
"number,title,state,isDraft,url,headRefName,baseRefName,headRefOid,author,mergeable,"
"mergeStateStatus,reviewDecision,additions,deletions,changedFiles,updatedAt,labels,commits"
)
def main():
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument(
"pr", nargs="?", type=int, help="PR number (default: the current branch's PR)"
)
parser.add_argument(
"--commits", type=int, default=5, help="how many recent commits to list"
)
args = parser.parse_args()
pr = args.pr or current_pr()
view = gh("pr", "view", str(pr), "--json", VIEW_FIELDS)
# Exit code 8 means checks are pending; the JSON is printed either way. A PR
# with no checks yet is reported as a failure with no JSON at all.
try:
checks = gh(
"pr", "checks", str(pr), "--json", "name,bucket,link", status_codes=(8,)
)
except SystemExit as failure:
if "no checks reported" not in str(failure.code):
raise
checks = []
owner, name = repo()
_, threads = fetch_threads(owner, name, pr)
reviews = fetch_reviews(owner, name, pr)
state = view["state"] + (" (draft)" if view["isDraft"] else "")
labels = ", ".join(label["name"] for label in view["labels"])
print(f"#{view['number']} {view['title']}")
print(
f"{state} · {view['headRefName']} → {view['baseRefName']} · {view['headRefOid'][:8]}"
f" · by {login(view)} · +{view['additions']} -{view['deletions']} in {view['changedFiles']} files"
)
print(
f"merge: {view['mergeable']} / {view['mergeStateStatus']} · review: {view['reviewDecision'] or 'none'}"
f" · updated {view['updatedAt']}" + (f" · labels: {labels}" if labels else "")
)
buckets = {}
for check in checks:
buckets.setdefault(check["bucket"], []).append(check)
summary = " · ".join(
f"{len(buckets[b])} {b}"
for b in ("pass", "fail", "pending", "skipping", "cancel")
if b in buckets
)
print(f"checks: {summary or 'none'}")
for check in buckets.get("fail", []) + buckets.get("cancel", []):
print(f" {check['bucket']:<8}{check['name']} {check['link']}")
if pending := buckets.get("pending"):
print(f" pending {', '.join(check['name'] for check in pending)}")
unresolved = sum(1 for thread in threads if not thread["isResolved"])
findings = sum(
1 for review in reviews if is_finding(review, clean(review["body"])[1])
)
print(
f"review threads: {unresolved} unresolved of {len(threads)} · findings in review bodies: {findings}"
)
print("last commits:")
for commit in view["commits"][-args.commits :]:
print(f" {commit['oid'][:8]} {commit['messageHeadline']}")
print(view["url"])
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |