source-command-triage-prs
Skill40 starsChanged 39 days agoMITView on GitHub
Night-shift maintenance routine (cycle D). Triages failing checks on the agent fleet's own (Codex/*) open PRs — auto-fixing mechanical classes as fix PRs, escalating judgment ones, skipping the rest. Never merges.
- Commits and pushes
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- branch-preflightSkill
- cleaning-up-merged-branchesSkill
- diagnoseSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- improve-codebase-architectureSkill
- inkwell-retrofitSkill
- open-knowledgeSkill
- pb-collectionSkill
- reviewable-pr-slicingSkill
- setup-matt-pocock-skillsSkill
- shadcnSkill
- shipSkill
- source-command-build-nextSkill
- source-command-qcheckSkill
- to-issuesSkill
- verify-frontend-changeSkill
- branch-preflightSkill
- claude-code-primitivesSkill
- cleaning-up-merged-branchesSkill
- inkwell-retrofitSkill
- pb-collectionSkill
- reviewable-pr-slicingSkill
- verify-frontend-changeSkill
- verify-gsdSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the user asks to run the migrated source command triage-prs.
- Very specific: line 31
Deliver a fix PR: Commit the verified fix to a fresh Codex/fix-<branch>-<runid> branch, push, and gh pr create --base <failing-branch> (the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
source-command-triage-prs
Use this skill when the user asks to run the migrated source command triage-prs.
Command Template
/triage-prs
You are the night shift for the GSD Task Manager pipeline. Run headlessly and unattended. Triage failing checks on the fleet's own open PRs, then stop. The full operating spec is docs/agents/night-shift.md — read it; this command is the executable summary. Definition of done is coding-standards.md. Issue/PR ops follow docs/agents/issue-tracker.md.
Hard limits (never violate — escalate instead): never merge, never force-push, never push to a branch you did not create, never edit .github/workflows/**, docker/** deploy config, CloudFront config, or SECURITY.md/security config, and never patch around a security-scan failure. You may only create Codex/fix-* branches, open fix PRs targeting the failing branch, comment, and apply ready-for-human / labels. At most 3 fix PRs this run.
Select work
List open PRs whose head branch starts with Codex/, that originate from this repository itself (not a fork), and that have at least one failing check (use gh pr list --state open --json number,headRefName,headRepositoryOwner,isCrossRepository,statusCheckRollup). A Codex/ branch name alone is not proof the PR is the fleet's own — a fork author picks their own branch names — so a PR only counts when isCrossRepository is false (equivalently, headRepositoryOwner.login equals this repo's owner). Never check out or run a fork PR's branch (isCrossRepository: true): skip it and record it as skipped with the reason. Process oldest-first. Skip any PR already labeled ready-for-human. Stop once you have opened 3 fix PRs.
For each failing check on a PR
- Reproduce. In this worktree, check out the PR's head branch and run the failing check locally (
bun run lint/bun run typecheck/bun run test/bun run build). If you cannot reproduce it (flaky, external, environment) → skip + log. - Classify and act:
- Formatting / lint →
bun run lintissues fixable byeslint . --fix; style drift byprettier --write. - Stale lockfile →
bun installto regeneratebun.lock. - Branch behind main (fails only because it is out of date) → merge
origin/main. Trivial conflicts (lockfile, generated files) only. - Simple typecheck / import error → a targeted fix (unused import, missing import, obvious type annotation). Do not attempt logic changes.
- Formatting / lint →
- Verify before submitting. Re-run the failing check. Only proceed if it now passes. If your fix does not make the check pass, revert it and escalate.
- Deliver a fix PR. Commit the verified fix to a fresh
Codex/fix-<branch>-<runid>branch, push, andgh pr create --base <failing-branch>(the fix targets the failing branch, so it re-enters review + CI). Comment the fix PR link on the original PR. Do not merge.
Escalate (never guess)
A logic test failure, any security-scan failure, an ambiguous type error, a non-trivial merge conflict, or a fix that failed to verify → gh pr edit <n> --add-label ready-for-human and comment a written reason stating exactly what is blocked and what input is needed. Security failures are always escalated, never worked around.
Skip + log
Anything you cannot reproduce, that is flaky/external, or that is already ready-for-human → record it in your report as skipped, with the reason.
Self-audit report (always, at the end)
Post one comment to the Night Shift Control issue (the pinned issue that also carries the triage:paused kill switch) summarizing this run: for each PR touched, what you fixed (with fix-PR links), escalated (with reasons), or skipped (with reasons); the fix-PR count vs. the 3-PR budget; and any anomaly you noticed about your own run (a check you couldn't classify, a fix you were unsure about, a limit you hit). If you did nothing, say so in one line.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

