一键导入
stale
Housekeeping report — find stale PRs, orphan branches, stale issues, and stale plans
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Housekeeping report — find stale PRs, orphan branches, stale issues, and stale plans
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Full implementation lifecycle with adversarial review using subagents
Address PR review feedback and verify independently
Draft and create a GitHub issue from a description, investigation, or conversation context. Use when a problem is too large for a quick fix, when you want to propose a change for later, or when the user asks to "file an issue", "create an issue", "draft an issue", "open a ticket", or "log this for later". Also useful when another skill (like tune) determines a change is too large and needs to be tracked as an issue instead.
Merge a PR and update upstream GitHub issues with progress
Validate a PR against PR standards before requesting review
Health-check the LifeOS persona layer (files load, /chat matches the Telegram bots per persona, no personal values leak into committed persona files, frontmatter valid) and open every persona doc in Sublime for editing.
基于 SOC 职业分类
| name | stale |
| description | Housekeeping report — find stale PRs, orphan branches, stale issues, and stale plans |
| argument-hint | ["days"] |
Arguments: $ARGUMENTS
Parameters (all optional):
Open PRs with metadata:
!gh pr list --state=open --json number,title,author,createdAt,updatedAt,isDraft,reviewDecision,headRefName,additions,deletions --limit 100 2>/dev/null || echo "GH_ERROR"
Open issues:
!gh issue list --state=open --json number,title,assignees,createdAt,updatedAt,labels --limit 100 2>/dev/null || echo "GH_ERROR"
Local branches with last commit date:
!git branch --format='%(refname:short) %(committerdate:iso8601)' 2>/dev/null | grep -v '^main$' | grep -v '^master$'
Branch-to-PR mapping:
!git branch --format='%(refname:short)' | grep -v '^main$' | grep -v '^master$' | while IFS= read -r b; do PR=$(gh pr list --head "$b" --state=open --json number --jq '.[0].number' 2>/dev/null); echo "$b -> ${PR:-none}"; done
Plan files (if docs/plans/ exists):
!if [ -d docs/plans ]; then find docs/plans -name '*.md' -not -path '*/archive/*' 2>/dev/null; else echo "NO_PLANS_DIR"; fi
Plan file contents (frontmatter only, for status/date checking):
!if [ -d docs/plans ]; then find docs/plans -name '*.md' -not -path '*/archive/*' 2>/dev/null | while IFS= read -r f; do echo "=== $f ==="; head -20 "$f" 2>/dev/null; echo; done; else echo "NO_PLANS_DIR"; fi
You are producing a housekeeping report — identifying stale items that need cleanup, closure, or attention.
If any data block shows GH_ERROR, report that gh failed (likely auth or network) and stop.
Parse the days threshold from arguments (default 14). An item is "stale" if it hasn't been updated in more than this many days.
For each category, identify stale or orphaned items:
Stale PRs — Open PRs where updatedAt is older than the threshold.
Orphan branches — Local branches that have no open PR (mapped to none in the branch-to-PR data). For each orphan, check if it's been merged into main:
git branch --merged main
An orphan that's already merged into main is a safe delete candidate. An unmerged orphan needs investigation.
Stale issues — Open issues where updatedAt is older than the threshold.
Stale plans — Plan files in docs/plans/ (not in archive/) that appear completed, have a past target date, or haven't been updated recently. Check frontmatter for Status and date fields.
Produce the following sections:
A single compact line:
2 stale PRs, 3 orphan branches, 1 stale issue, 0 stale plans
A table for each stale PR:
| PR | Title | Author | Age | Status | Suggested Action |
|---|
Status should reflect: DRAFT, AWAITING REVIEW, CHANGES REQUESTED, APPROVED.
Suggested actions: "Close — appears abandoned", "Ping author for update", "Needs rebase", "Review and merge — approved but stale", etc.
If no stale PRs, say "None — all PRs are active."
List each orphan branch with:
If no orphan branches, say "None — all branches have open PRs."
A table for each stale issue:
| Issue | Title | Assignee | Age | Labels | Suggested Action |
|---|
Suggested actions: "Close — likely resolved", "Needs triage", "Reassign — assignee may be unavailable", etc.
If no stale issues, say "None — all issues are active."
List plan files that appear stale:
If docs/plans/ doesn't exist or has no stale plans, say "None."
List exact commands the user can copy-paste to clean up safe-to-delete items. Do not execute these — list them only.
Examples:
git branch -d feature/old-branch # merged, safe to delete
git push origin --delete feature/old-branch # clean up remote
gh pr close 42 --comment "Closing stale PR — superseded by #57"
If there are no quick wins, omit this section.
#NupdatedAt or commit date)Stop and tell the user when:
gh commands fail (auth, network, or unexpected errors)