Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lovstudio avatar

Lovstudio Gh Tidy

  • 1 installs
  • Updated July 13, 2026
  • lovstudio/gh-tidy-skill

Lists open issues, PRs, stale branches, and orphan labels, then interactively closes, merges, comments, or deletes each via gh CLI.

About

Surveys a GitHub repo's open issues, PRs, stale branches, and orphan labels, summarizes each, and asks the user how to handle them before executing via gh CLI. A developer uses it for interactive repo hygiene and cleanup.

  • Lists issues, PRs, stale branches, and orphan labels
  • Executes chosen close/merge/comment/delete actions via gh CLI

Lovstudio Gh Tidy by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #524 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lovstudio/gh-tidy-skill --skill lovstudio-gh-tidy

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedJuly 13, 2026
Repositorylovstudio/gh-tidy-skill

What it does

Lists open issues, PRs, stale branches, and orphan labels, then interactively closes, merges, comments, or deletes each via gh CLI.

Files

SKILL.mdMarkdownGitHub ↗

lovstudio:gh-tidy

Interactive GitHub repo triage — issues, PRs, branches, labels in one pass.

Prerequisites

  • gh CLI installed and authenticated (gh auth status)
  • Current directory is a git repo with a GitHub remote

Workflow

Step 1: Scan

Run all of these in parallel to gather repo state:

# Open issues
gh issue list --state open --limit 100 --json number,title,author,createdAt,labels,comments

# Open PRs
gh pr list --state open --limit 100 --json number,title,author,createdAt,labels,reviewDecision,mergeable,headRefName

# Remote branches (exclude main/master/develop)
git branch -r --no-merged origin/main | grep -v 'HEAD\|main$\|master$\|develop$'

# Labels
gh label list --limit 100 --json name,description,color

Step 2: Summarize

Present a concise table for each category that has items:

Issues:

#TitleAuthorAgeCommentsLabels

PRs:

#TitleAuthorAgeMergeableReview

Stale branches (no commits in 30+ days): List branch names with last commit date.

Orphan labels (not used by any issue/PR): List label names.

For each item, provide a brief analysis:

  • Issues: Is it actionable? Feature request vs bug? Has it been addressed?
  • PRs: Are there conflicts? Is the code valuable? What does the diff look like?
  • Branches: Is the work merged? Abandoned?

Step 3: Triage

Use AskUserQuestion to ask the user how to handle each item. Group by category.

For issues, offer: Close with thank-you / Close as wontfix / Keep open / Add label For PRs, offer: Review & merge / Close without merge / Keep open For branches, offer: Delete / Keep For labels, offer: Delete / Keep

Important: Always show your analysis and reasoning for each item before asking. Don't just present options without context.

Step 4: Execute

Execute all chosen actions via gh CLI:

# Close issue with comment
gh issue close <N> --comment "message"

# Merge PR (prefer squash)
gh pr merge <N> --squash

# Close PR without merge
gh pr close <N> --comment "message"

# Delete remote branch
git push origin --delete <branch>

# Delete label
gh label delete <name> --yes

Step 5: Report

Show a summary of what was done:

GitHub Tidy Report
==================
Issues:  2 closed, 1 kept
PRs:     1 merged, 0 closed
Branches: 3 deleted
Labels:  0 deleted

Rules

  • Always show analysis before asking for decisions — explain WHY you suggest an action
  • For PR merges with conflicts, resolve conflicts locally first, then push and merge
  • When closing issues/PRs from external contributors, always leave a polite thank-you comment
  • Never force-push or delete protected branches
  • Skip categories with zero items — don't show empty tables
  • For large repos (50+ items), batch the triage questions by category

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.