project-sync

Detects and resolves stale GitHub Issues, orphan PRs, and abandoned branches automatically.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/kai-kou/gem-hunter --skill project-sync-kai-kou
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: project-sync
Source: https://github.com/kai-kou/gem-hunter/tree/main/.claude/skills/project-sync
Command: npx skills add https://github.com/kai-kou/gem-hunter --skill project-sync-kai-kou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories accumulate hygiene problems over time: Issues stuck in-progress for hours, pull requests left unreviewed for over 24 hours, and branches abandoned after merge. This Skill automatically detects and resolves these inconsistencies between GitHub Issues and Projects V2, keeping the repository clean without any manual user intervention. ## Core Features & Use Cases - Stale Issue & Orphan PR Detection: Finds Issues stuck in-progress over 4 hours and PRs untouched for 24+ hours, then routes them back to the appropriate review or merge flow. - Label & Assignee Type Synchronization: Aligns Projects V2 Assignee Type fields with status labels (waiting-user, waiting-claude, in-progress, blocked) and fixes mislabeled backlog items. - Automated Cleanup Scans: Auto-closes completed waiting-user Issues, cleans zombie pipeline-state records, and lists abandoned branch deletion candidates. - Use Case: A scheduled hourly task runs this Skill to sweep the repository each morning and midday, closing stale report Issues, nudging orphan PRs, and persisting a hygiene metrics snapshot with Slack alerts when thresholds are exceeded. ## Quick Start Ask the AI to run project-sync to clean up stale Issues, orphan PRs, and label inconsistencies in the repository.

Frequently Asked Questions about project-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically clean up stale GitHub Issues and PRs?▼

Run the project-sync Skill manually or via a scheduled hourly task. It detects Issues stuck in-progress over 4 hours and PRs idle over 24 hours, then routes them back to review flows or auto-merges them when appropriate.

How to sync GitHub Projects V2 fields with issue labels?▼

The Skill reads each open Issue's status label and sets the Projects V2 Assignee Type field accordingly: waiting-user and blocked map to user, while waiting-claude and in-progress map to claude. It uses the issue_write tool with issue_fields to apply updates.

Can this run in cloud environments without the gh CLI?▼

Yes. In cloud environments where the real gh CLI is unavailable, all operations use GitHub MCP tools like mcp__github__list_issues and mcp__github__issue_write instead. The gh commands documented in the Skill are for local execution only.

What are the limitations of automated issue auto-closing?▼

Auto-close is capped at 5 Issues per run as a circuit breaker, and only applies to waiting-user Issues whose completion metadata confirms publication. Entity ID assignment is limited to 10 per run, and abandoned branches are only listed, never auto-deleted.

Why does issue_write label update remove existing labels?▼

The issue_write labels parameter performs a full replacement, not an append. You must fetch the Issue's current labels first and pass the complete desired list, otherwise any labels not included are silently removed.