--- name: [REPLACE: SKILL_NAME] description: First-touch review of newly opened PRs on [REPLACE: WATCHED_REPO] — verdict + welcoming comment + label metadata: category: dev var: "" tags: - dev --- > **${var}** — Optional. PR number to review. If empty, scans all newly-opened PRs on `[REPLACE: WATCHED_REPO]`. Today is ${today}. Review external PRs on **[REPLACE: WATCHED_REPO]** with a focus on **[REPLACE: REVIEW_FOCUS]**. ## Steps 1. **List candidates** — every open PR opened in the last 24h that hasn't been reviewed by this skill yet: If `${var}` is set, that PR number is the only candidate. Otherwise get the cutoff with its own call, `date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ`, and write the printed value into the filter literally (the `` below): ```bash gh pr list -R [REPLACE: WATCHED_REPO] --state open --json number,author,createdAt,additions,deletions --jq '.[] | select(.createdAt >= "") | select(.author.login != "github-actions[bot]" and .author.login != "aeonframework") | .number' ``` Track previously-reviewed PRs in `memory/topics/[REPLACE: SKILL_NAME]-reviewed.json` (a flat array of PR numbers). Skip anything already in there. 2. **For each PR** — fetch metadata + diff: One call per PR, with its number written in literally (the `` below). Read the output directly; do not save it to a file: ```bash gh pr view -R [REPLACE: WATCHED_REPO] --json title,body,additions,deletions,files,author ``` ```bash gh pr diff -R [REPLACE: WATCHED_REPO] ``` Run the diff call only for a PR under the size limit. Skip if `additions + deletions > [REPLACE: MAX_PR_LINES]`: flag it as `DEFERRED: too large for first-touch review`, leave a note, and move on. 3. **Apply the rubric** — assign one of four verdicts: | Verdict | Trigger | |---------|---------| | **ACCEPT** | Touches expected paths, follows repo conventions, focused scope, no obvious bugs in the diff. | | **NEEDS-CHANGES** | Reasonable intent but specific issues: missing tests, broken format, incorrect assumption, naming. | | **DEFER** | Out of scope for this skill — needs a human reviewer (large refactor, architectural change). | | **OUT-OF-SCOPE** | Touches files outside what the repo accepts contributions on (e.g. lock files, generated assets). | Focus the rubric on **[REPLACE: REVIEW_FOCUS]** — that's the lens that matters most for this repo. 4. **Post a comment** — use a friendly, specific tone. Acknowledge the contributor, name the verdict, give 1-3 concrete bullets: Write the comment to `/tmp/review-comment-.md` with Write: ```markdown Thanks for the PR! [verdict text] - [bullet 1] - [bullet 2] ``` Then post it: ```bash gh pr comment -R [REPLACE: WATCHED_REPO] --body-file /tmp/review-comment-.md ``` 5. **Label** the PR via `gh pr edit -R [REPLACE: WATCHED_REPO] --add-label "