From f419afcf86f2e3089bfc1459e9b76b440baf79f4 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Thu, 23 Jul 2026 00:52:05 +0900 Subject: [PATCH 1/2] Add a Claude Code skill for the runner-PR workflow Captures the conventions for opening a new-runner pull request (branch name, commit message, PR template, English summary, pre-checklist verification) so future contributors using Claude Code don't have to rediscover them. Co-Authored-By: Claude Opus 4.7 --- .claude/skills/add-runner-pr/SKILL.md | 93 +++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .claude/skills/add-runner-pr/SKILL.md diff --git a/.claude/skills/add-runner-pr/SKILL.md b/.claude/skills/add-runner-pr/SKILL.md new file mode 100644 index 0000000..d46d681 --- /dev/null +++ b/.claude/skills/add-runner-pr/SKILL.md @@ -0,0 +1,93 @@ +--- +name: add-runner-pr +description: Create a branch, commit, and open a pull request that adds a new runner, following this repository's conventions. Assumes the user has already placed `metadata.json`, `preview.png`, and `-frames.zip` under `runners//`. Triggers — "add a runner PR", "open a PR for the new runner", "ランナー追加のPRを作って", "〜のランナーをPRにして". +--- + +# Add-runner PR + +## Preconditions + +Before starting, confirm the user has placed: + +- `runners//metadata.json` +- `runners//preview.png` +- `runners//-frames.zip` + +The `runners/manifest.json` entry may or may not already be in place. Check with `git status` and `git diff runners/manifest.json`. If missing, add `` while preserving **alphabetical order**. + +## Steps + +### 1. Verify before checking the checklist + +Do not tick the PR checkboxes mechanically. Run the checks first, then tick. + +```bash +# Zip layout — expect -frames/-frame-.png, no __MACOSX or .DS_Store +unzip -l runners//-frames.zip + +# Compare with an existing runner (e.g. dots) to confirm the same layout +unzip -l runners/dots/dots-frames.zip | head -5 + +# preview.png dimensions — height must be 36, width must be 10–100 +file runners//preview.png +``` + +`Read` `metadata.json` and confirm `author`, `displayName`, `type` (`monochrome` or `color`), and `tags` are all present and correct. + +If anything violates the spec (width out of range, height not 36, junk files inside the zip, etc.), **send the asset back to the user for fixing**. Do not loosen the spec ([[runner-spec-is-absolute]]). + +### 2. Branch and commit + +Follow the existing convention exactly. Confirm with `git log --oneline` if unsure. + +- Branch name: `add-` +- Commit message: `Add the runner` (English, no trailing period) + +```bash +git checkout -b add- +git add runners/manifest.json runners// +git commit -m "$(cat <<'EOF' +Add the runner + +Co-Authored-By: Claude Opus 4.7 +EOF +)" +git push -u origin add- +``` + +### 3. Open the PR + +**Always start by `Read`ing `.github/pull_request_template.md`** and use its current contents as the PR body — never a hardcoded copy inside this skill, since the template can change and this document will drift. Fill it in by: + +- Checking the `Add a new runner` box under `Type of Change`. +- Writing the `Runner Summary` (see below). +- Ticking every item under `Checklist for Adding a Runner` that step 1 actually verified. + +If a new checklist item appears in the template that step 1 did not cover, verify it now before ticking — do not tick blindly just because the item is new. + +Write the Runner Summary in **English**, even when the conversation with the user is in Japanese (per the global rule that PRs on OSS repos are written in English). Match the tone of recent PRs — inspect one with `gh pr view --json body -q .body` first. Format: + +``` +`` — a runner featuring . frames at ×36. +``` + +- ``: frame count from `unzip -l` +- `×36`: width from `file runners//preview.png` + +Create the PR by passing the filled-in template body via a heredoc: + +```bash +gh pr create --title "Add the runner" --body "$(cat <<'EOF' + +EOF +)" +``` + +After creating, verify with `gh pr view --json body -q .body` and return the PR URL to the user. + +## Common mistakes + +- **Skipping the PR template and writing a bespoke summary** → always `Read` the template first, then `gh pr create` with it. +- **Writing the Runner Summary in Japanese** → English. The chat may be in Japanese; the PR body is not. +- **Ticking every checkbox without verifying** → verify first, then tick. If the asset breaks the spec, hand it back for fixes rather than loosening the checklist. +- **Breaking the manifest ordering** → keep `runners/manifest.json` alphabetical. From d80b92b68a0ddd7e0d1f569edaa72ccb377379f2 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Thu, 23 Jul 2026 00:58:32 +0900 Subject: [PATCH 2/2] Generalize the PR template beyond runner additions Rename `Runner Summary` to `Summary` and add a note that the `Checklist for Adding a Runner` section can be skipped for non-runner PRs (tooling, docs, site changes). Also updates the add-runner-pr skill to reference the new section name. Co-Authored-By: Claude Opus 4.7 --- .claude/skills/add-runner-pr/SKILL.md | 8 ++++---- .github/pull_request_template.md | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.claude/skills/add-runner-pr/SKILL.md b/.claude/skills/add-runner-pr/SKILL.md index d46d681..88be6ba 100644 --- a/.claude/skills/add-runner-pr/SKILL.md +++ b/.claude/skills/add-runner-pr/SKILL.md @@ -60,12 +60,12 @@ git push -u origin add- **Always start by `Read`ing `.github/pull_request_template.md`** and use its current contents as the PR body — never a hardcoded copy inside this skill, since the template can change and this document will drift. Fill it in by: - Checking the `Add a new runner` box under `Type of Change`. -- Writing the `Runner Summary` (see below). +- Writing the `Summary` (see below). - Ticking every item under `Checklist for Adding a Runner` that step 1 actually verified. If a new checklist item appears in the template that step 1 did not cover, verify it now before ticking — do not tick blindly just because the item is new. -Write the Runner Summary in **English**, even when the conversation with the user is in Japanese (per the global rule that PRs on OSS repos are written in English). Match the tone of recent PRs — inspect one with `gh pr view --json body -q .body` first. Format: +Write the Summary in **English**, even when the conversation with the user is in Japanese (per the global rule that PRs on OSS repos are written in English). Match the tone of recent PRs — inspect one with `gh pr view --json body -q .body` first. Format: ``` `` — a runner featuring . frames at ×36. @@ -78,7 +78,7 @@ Create the PR by passing the filled-in template body via a heredoc: ```bash gh pr create --title "Add the runner" --body "$(cat <<'EOF' - + EOF )" ``` @@ -88,6 +88,6 @@ After creating, verify with `gh pr view --json body -q .body` and retur ## Common mistakes - **Skipping the PR template and writing a bespoke summary** → always `Read` the template first, then `gh pr create` with it. -- **Writing the Runner Summary in Japanese** → English. The chat may be in Japanese; the PR body is not. +- **Writing the Summary in Japanese** → English. The chat may be in Japanese; the PR body is not. - **Ticking every checkbox without verifying** → verify first, then tick. If the asset breaks the spec, hand it back for fixes rather than loosening the checklist. - **Breaking the manifest ordering** → keep `runners/manifest.json` alphabetical. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 27348c1..8f8d3e0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,12 +6,14 @@ - [ ] Fix or improve an existing runner - [ ] Other (site, docs, tooling) -## Runner Summary +## Summary - + ## Checklist for Adding a Runner + + - [ ] I have read [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) and followed the steps described there. - [ ] The runner is my original work, or I hold the rights to it, and I consent to its distribution under this repository's license (Apache-2.0). - [ ] The runner does NOT contain third-party intellectual property (e.g., Pokémon, Mario, or other copyrighted/trademarked characters).