Skip to content
Back to skills

Pr Audit

ASecurity

Triage open pull requests and issues: find easy-win PRs to merge, close stale or superseded ones, label and reply to issues. Use when the user says "audit open PRs", "triage PRs", "triage issues", "close stale PRs", "what can we merge", "clean up the issue tracker", or runs /theo-mode prs. Requires the gh CLI authenticated for the repo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsgobashgitsecurity

Works with

  • cli

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add al3rez/theo-mode --skill pr-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/al3rez-pr-audit/badge)](https://www.skillsdirectory.com/skills/al3rez-pr-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pr-audit
description: >
  Triage open pull requests and issues: find easy-win PRs to merge, close
  stale or superseded ones, label and reply to issues. Use when the user says
  "audit open PRs", "triage PRs", "triage issues", "close stale PRs", "what
  can we merge", "clean up the issue tracker", or runs /theo-mode prs.
  Requires the gh CLI authenticated for the repo.
---

# PR / Issue Audit

Goal: a smaller, honest backlog. Every open item ends the session in one of
three states: merged, closed with a reason, or left open with a label that
says what it is waiting on.

## Step 0: inventory and scope

```bash
gh pr list --state open --limit 200 --json number,title,author,updatedAt,isDraft,mergeable,reviewDecision,labels
gh issue list --state open --limit 200 --json number,title,author,updatedAt,labels,comments
```

Report counts. If over ~50 items total, process in batches of 25, oldest
first, and report after each batch. Say this before starting.

## Step 1: bucket every PR

Read the diff (`gh pr diff N`) and the CI status (`gh pr checks N`). Put each
PR in exactly one bucket:

- **Easy win.** Small, green CI, does what the title says, no design
  decisions. Typo fixes, dep bumps, doc fixes, obvious bug fixes with a test.
- **Needs rebase.** Good change, conflicts with main. Try `gh pr checkout N
  && git rebase main`. If it rebases cleanly and CI passes, it becomes an
  easy win. If not, comment with the conflict summary and move on.
- **Superseded.** Another PR or a commit on main already did this. Link it.
- **Dead.** Author gone for 6+ months, no response to review, or the feature
  was rejected in discussion.
- **Real review needed.** Design change, security-relevant, large. Not for
  this session. Label it and list it for the human.

## Step 2: bucket every issue

- **Fixed already.** Search main and closed PRs for the symptom. Close with
  the commit or PR link.
- **Cannot reproduce / no info.** Older than 90 days, no repro, no response
  to a request for info. Close with a polite note inviting a reopen.
- **Duplicate.** Link the canonical one, close.
- **Easy fix.** Under an hour and you understand it. Fix it, open a PR,
  reference the issue. Cap this at 5 per session.
- **Real work.** Label (`bug`, `enhancement`, `needs-design`) and leave open.

## Step 3: present the plan, then execute

Print one table: number, title, bucket, action, one-line reason. Give the
user a chance to veto rows. Then execute every action with `gh`:

- Merge easy wins: `gh pr merge N --squash --delete-branch` (match the repo's
  existing merge style; check `git log` for merge vs squash).
- Close with reasons: `gh pr close N --comment "..."`, `gh issue close N
  --comment "..."`. The comment names the reason and how to reopen. Be kind;
  a real person wrote it.
- Label: `gh pr edit N --add-label ...`.

## Step 4: report

Counts per bucket, links for everything merged, and the "real review needed"
list for the human, ranked by how close to mergeable each one is.

## Do not

- Do not merge anything with red CI, no matter how small.
- Do not close a PR from an active contributor without a comment that tells
  them what would get it merged.
- Do not use a bot-sounding tone. Write the comment you would want to
  receive.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.