Agent skill

PR Screenshot

by team-mirai in team-mirai/mirai-gikai

UI変更を含むPRで、agent-browserでスクリーンショットを撮影し、R2にアップロードしてPR本文に貼り付ける

AGPL-3.0Auto-check: notesProductivity & Automation

Install PR Screenshot

skills CLI
$ npx skills add team-mirai/mirai-gikai --skill pr-screenshot -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install team-mirai/mirai-gikai pr-screenshot --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/team-mirai/mirai-gikai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pr-screenshot .claude/skills/pr-screenshot && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-screenshot
GitHub stars
212
Token cost
~1.4k tokens
SKILL.md length
173 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
AGPL-3.0

At a glance

UI変更を含むPRで、agent-browserでスクリーンショットを撮影し、R2にアップロードしてPR本文に貼り付ける

  • Works in 7 steps: 変更差分の分析 → 環境セットアップ → スクリーンショット対象URLの構築 → …
  • Tasks that involve Browser automation
  • SKILL.md covers 使い方, 設定, ワークフロー and 注意事項
  • Calls npx, git and jq; reaches pub-xxx.r2.dev

What it does

PR Screenshot is an agent skill from team-mirai/mirai-gikai. UI変更を含むPRで、agent-browserでスクリーンショットを撮影し、R2にアップロードしてPR本文に貼り付ける

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Browser automation. It works with Cloudflare Workers. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Browser automation

Example prompts

  • “/pr-screenshot”

Requirements

  • Node.js

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. 変更差分の分析
  2. 環境セットアップ
  3. スクリーンショット対象URLの構築
  4. スクリーンショット撮影
  5. R2 アップロード
  6. PR 本文にスクリーンショットを追加
  7. クリーンアップ

What it can do on your machine

Read from SKILL.md and the folder at commit 9ae4a5c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • git
    • jq
    • gh
    • curl
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • pub-xxx.r2.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Screenshot loads about 1.4k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 173 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:85
    npx dotenv -e .env -- pnpm --filter web run dev &
  • NoteMentions a .env fileSKILL.md:87
    # npx dotenv -e .env -- pnpm --filter admin run dev &

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from team-mirai/mirai-gikai at commit 9ae4a5c, republished under its AGPL-3.0 licence (© team-mirai). 173 words, ~1,397 tokens.

Download SKILL.mdSave it as .claude/skills/pr-screenshot/SKILL.md (or your agent's skills folder).
name
pr-screenshot
description
UI変更を含むPRで、agent-browserでスクリーンショットを撮影し、R2にアップロードしてPR本文に貼り付ける

PR Screenshot

UI変更を含むPRのスクリーンショットを自動で撮影・アップロード・PR本文更新するスキル。

使い方

/pr-screenshot
/pr-screenshot "ホバー状態も撮って"

引数なしで実行すると、変更差分からUI変更対象ページを自動判断する。

設定

R2の接続情報はローカル設定ファイル .claude/skills/pr-screenshot/config.local.json から読み取る(gitignore対象)。

json
{
  "r2AccountId": "your-cloudflare-account-id",
  "r2Bucket": "your-bucket-name",
  "r2PublicUrl": "https://pub-xxx.r2.dev"
}

初回セットアップ: このファイルが存在しない場合、スキル実行時にユーザーに値を聞いて作成する。

SCREENSHOT_DIR=/tmp/pr-screenshots

ワークフロー

Step 1: 変更差分の分析

現在のブランチとPR番号を特定する:

bash
git branch --show-current
gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number'
git diff --name-only develop...HEAD

変更されたファイルパスから、影響を受けるUI画面を推定する:

推定ルール:

  • web/src/features/{feature}/ → その feature に対応するページ
  • web/src/app/(main)/bills/ → 議案詳細ページ (/bills/{id})
  • web/src/app/(main)/page.tsx → トップページ (/)
  • web/src/app/(main)/kokkai/ → 国会会期ページ
  • web/src/components/ → 影響範囲が広い。トップページ + 議案詳細を撮る
  • admin/src/features/bills-edit/ → admin 議案編集ページ
  • admin/src/features/bills/ → admin 議案一覧ページ
  • web/src/app/globals.css → トップページ + 議案詳細を撮る
  • admin/src/app/ 配下 → 対応する admin ページ

feature名からページを特定する対応表:

  • bills → /bills/{id} (議案詳細)
  • interview-config → /bills/{id}/interview (インタビューLP)
  • interview-session → /bills/{id}/interview/chat (チャット)
  • interview-report → /report/{reportId} (レポート)
  • bill-difficulty → /bills/{id} (議案詳細)

UIに関係しない変更のみの場合(migration, test, server-only logic等)はスキップして終了。

Step 2: 環境セットアップ

worktreeのパスを特定し(現在のディレクトリが worktree であることを前提)、devサーバーを起動する:

bash
# Supabase が起動中か確認
npx supabase status 2>&1 | head -5

# シードデータを投入(新カラム等を反映)
pnpm seed

# devサーバー起動(バックグラウンド)
# web のみ: ポート3000
# admin も必要なら: ポート3001
npx dotenv -e .env -- pnpm --filter web run dev &
# admin が必要な場合:
# npx dotenv -e .env -- pnpm --filter admin run dev &

# サーバー起動待ち
sleep 8

サーバーが起動したら、使用するポートを確認する(3000が使用中なら別ポートが割り当てられる):

bash
# 起動ログからポートを確認するか、curl で確認
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 || curl -s -o /dev/null -w "%{http_code}" http://localhost:3002
Step 3: スクリーンショット対象URLの構築

seed投入後、DBから議案IDを取得してURLを構築する:

bash
# 公開済み議案のIDを1件取得
npx supabase db query "SELECT id::text FROM bills WHERE publish_status = 'published' LIMIT 1;"

取得したIDを使い、Step 1 で特定したページのURLリストを作る。

admin ページが対象の場合:

bash
# admin にログインが必要(session cookie取得)
# admin は Basic Auth やメールログインが必要なので、URL直アクセスで取れない場合がある
# → admin はログインフローを agent-browser で実行してからスクショを撮る
Step 4: スクリーンショット撮影

agent-browser でモバイルビューポート (390x844) でスクリーンショットを撮る。

bash
mkdir -p /tmp/pr-screenshots

# セッション名はPR番号を使う
SESSION="pr-${PR_NUMBER}"

# ビューポートをモバイルに設定
agent-browser --session $SESSION set viewport 390 844

# 各URLを開いてスクショ
agent-browser --session $SESSION open "$URL"
agent-browser --session $SESSION wait 3000
agent-browser --session $SESSION screenshot /tmp/pr-screenshots/screenshot-1.png

注意点:

  • ページ読み込み後 wait 3000 で安定を待つ
  • 初回アクセスはコンパイルに時間がかかるので open がタイムアウトしたらリトライする
  • ツールチップやホバー状態が必要な場合は hover してから撮る
  • スクロールが必要な場合は scroll down してから撮る
  • 撮影後は Read ツールで画像を確認し、正しく表示されているか検証する

admin ページのログインフロー:

bash
agent-browser --session $SESSION open "http://localhost:3001/login"
agent-browser --session $SESSION snapshot -i
# メールとパスワードを入力
agent-browser --session $SESSION fill "@eX" "admin@example.com"
agent-browser --session $SESSION fill "@eY" "admin123456"
agent-browser --session $SESSION click "@eZ"  # ログインボタン
agent-browser --session $SESSION wait 3000
# ログイン後、目的のページに遷移
Step 5: R2 アップロード

まず wrangler の認証状態を確認する:

bash
npx wrangler whoami 2>&1

「Not authenticated」等のエラーが出た場合、ユーザーに ! npx wrangler login の実行を促す(ブラウザでのOAuth認証が必要なため、Claude側では実行できない)。認証が完了するまでこのステップを中断する。

config.local.json から設定を読み取ってアップロードする。

bash
# config.local.json から値を取得(Bash の jq または Read ツールで読む)
R2_ACCOUNT_ID=$(cat .claude/skills/pr-screenshot/config.local.json | jq -r '.r2AccountId')
R2_BUCKET=$(cat .claude/skills/pr-screenshot/config.local.json | jq -r '.r2Bucket')
R2_PUBLIC_URL=$(cat .claude/skills/pr-screenshot/config.local.json | jq -r '.r2PublicUrl')

export CLOUDFLARE_ACCOUNT_ID=$R2_ACCOUNT_ID

# PR番号ベースのパスでアップロード
npx wrangler r2 object put "${R2_BUCKET}/pr-${PR_NUMBER}/screenshot-1.png" \
  --file /tmp/pr-screenshots/screenshot-1.png --remote

# 複数ファイルがある場合はそれぞれアップロード

公開URLのパターン:

${R2_PUBLIC_URL}/pr-${PR_NUMBER}/screenshot-1.png
Step 6: PR 本文にスクリーンショットを追加

gh pr edit でPR本文を更新する。既存の本文を取得し、スクリーンショットセクションを追加/更新する。

スクリーンショットが3枚以下の場合はテーブルで横並び(33%幅):

markdown
## スクリーンショット

| 説明1 | 説明2 | 説明3 |
|:---:|:---:|:---:|
| <img src="URL1" width="250" /> | <img src="URL2" width="250" /> | <img src="URL3" width="250" /> |

4枚以上の場合は2列テーブル:

markdown
## スクリーンショット

| 説明1 | 説明2 |
|:---:|:---:|
| <img src="URL1" width="350" /> | <img src="URL2" width="350" /> |
| <img src="URL3" width="350" /> | <img src="URL4" width="350" /> |

既存のPR本文に ## スクリーンショット セクションがある場合は置換する。ない場合は ## Test plan の直前に挿入する。

Step 7: クリーンアップ
bash
# devサーバーを停止
pkill -f "next dev.*turbopack" 2>/dev/null

# 一時ファイル削除
rm -rf /tmp/pr-screenshots

注意事項

  • agent-browser CLI がインストール済みであること
  • npx wrangler が認証済みであること(未認証の場合、ユーザーに ! npx wrangler login を促す)
  • Supabase がローカルで起動中であること(npx supabase start)
  • seed データには固定IDがないため、DBクエリでIDを取得する
  • Next.js の unstable_cache により、seed直後でもキャッシュが効く場合がある。.next フォルダ削除 + サーバー再起動で解決する
  • admin ページは認証が必要。seed データの admin@example.com / admin123456 でログインする

© team-mirai, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/pr-screenshot of team-mirai/mirai-gikai.

Open the folder on GitHubat commit 9ae4a5c

Compare with similar skills

PR Screenshot next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Screenshot compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Screenshot this skillteam-mirai/mirai-gikai212—~1.4kAutomated safety check: NotesAGPL-3.0
Cloudflare Browser Renderingcloudflare/moltworker9.9k—~742Automated safety check: PassApache-2.0
Test Fumadocs Wranglerclabernetes/clabernetes143—~569Automated safety check: PassBSD-3-Clause
Cloudflare Browser Renderingeinverne/dotfiles121—~4.9kAutomated safety check: PassGPL-3.0
Agents SDKhodgef/apiker1273 repos~3kAutomated safety check: PassMIT
Dev-Browser CLI AutomationSawyerHood/dev-browser6.7k1 repos~455Automated safety check: PassMIT

Similar skills

  • Cloudflare Browser Rendering

    cloudflare/moltworker

    Official

    Drives headless Chrome through Cloudflare Browser Rendering over a CDP WebSocket to take screenshots, navigate and scrape pages, and record multi-page videos.

    9.9k GitHub stars~742 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Test Fumadocs Wrangler

    clabernetes/clabernetes

    Builds and validates the Fumadocs React Router static site through Wrangler with headless browser checks.

    143 GitHub stars~569 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Guide for implementing Cloudflare Browser Rendering - a headless browser automation API for screenshots, PDFs, web scraping, and testing.

    121 GitHub stars~4.9k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Agents SDK

    hodgef/apiker

    Build AI agents on Cloudflare Workers using the Agents SDK. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 3 repos~3k tokens
    Backend & APIsAuto-check passed
  • Dev-Browser CLI Automation

    SawyerHood/dev-browser

    Browser automation with persistent named pages via the dev-browser CLI. Use when users ask to navigate websites, fill forms, take screenshots, extract web…

    6.7k GitHub starsUsed in 1 repo~455 tokens
    Productivity & AutomationAuto-check passed
  • Camoufox CLI

    Bin-Huang/camoufox-cli

    Anti-detect browser automation CLI & Skills for AI agents. An agent skill from Bin-Huang/camoufox-cli.

    350 GitHub starsUsed in 1 repo~4.5k tokens
    Productivity & AutomationAuto-check passed

More from team-mirai/mirai-gikai

All 10 skills in this repo
  • Agent Browser

    team-mirai/mirai-gikai

    agent-browser CLIを使ったブラウザ操作のガイド。Webページの操作、スクレイピング、スクリーンショット取得などブラウザ自動化が必要なときに参照する。「ブラウザで開いて」「Webページを操作して」「スクリーンショットを撮って」と言われたらこのスキルを使う。

    212 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Land

    team-mirai/mirai-gikai

    PR をランディングする。コンフリクトを監視・解決し、チェックを待ち、グリーンに なったら squash-merge する。land、merge、PR を完了まで導くことを依頼された ときに使用する。

    212 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Linear

    team-mirai/mirai-gikai

    Linear と対話するためのスキル。Linear MCP サーバー(mcplinear ツール)を 優先的に使用し、MCP でカバーされない生の GraphQL 操作(イントロスペクション、 ファイルアップロードなど)は lineargraphql クライアントツールにフォールバックする。

    212 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Linear

    team-mirai/mirai-gikai

    Linearタスクのステータス管理(In Progress / In Review への自動遷移). An agent skill from team-mirai/mirai-gikai.

    212 GitHub stars~407 tokensUpdated today
    Auto-check passed
  • Parallel PR

    team-mirai/mirai-gikai

    複数の独立PRをチーム×worktreeで並列作成する。タスク一覧を受け取り、worktree準備→チーム組成→エージェント起動→CI確認→クリーンアップまで一気に実行する。

    212 GitHub stars~767 tokensUpdated today
    Auto-check passed
  • Push

    team-mirai/mirai-gikai

    現在のブランチの変更を origin に push し、対応する pull request を作成 または更新する。push、更新の公開、pull request の作成を依頼されたときに使用する。

    212 GitHub stars~724 tokensUpdated today
    Auto-check passed

Questions about PR Screenshot

What does PR Screenshot do?

UI変更を含むPRで、agent-browserでスクリーンショットを撮影し、R2にアップロードしてPR本文に貼り付ける. PR Screenshot is an agent skill from team-mirai/mirai-gikai.

When should I use PR Screenshot?

PR Screenshot fits situations like: tasks that involve Browser automation.

How do I install PR Screenshot in Claude Code?

Run `npx skills add team-mirai/mirai-gikai --skill pr-screenshot -a claude-code`. Or copy the skill folder (.claude/skills/pr-screenshot in team-mirai/mirai-gikai) into .claude/skills/pr-screenshot in your project. Claude Code loads it when a task matches its description.

How do I install PR Screenshot in Codex?

Run `npx skills add team-mirai/mirai-gikai --skill pr-screenshot -a codex`. Or copy the skill folder (.claude/skills/pr-screenshot in team-mirai/mirai-gikai) into .agents/skills/pr-screenshot in your project. Codex loads it when a task matches its description.

Can I use PR Screenshot in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add team-mirai/mirai-gikai --skill pr-screenshot -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-screenshot, .gemini/skills/pr-screenshot, .github/skills/pr-screenshot and .opencode/skills/pr-screenshot in your project.

What does PR Screenshot need to run?

Going by SKILL.md and its folder, PR Screenshot needs the command-line tools its instructions call (npx, git, jq, gh, curl and pnpm). Our summary lists: Node.js.

Does PR Screenshot access the network?

SKILL.md names 1 domain. In commands or code: pub-xxx.r2.dev; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is PR Screenshot safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does PR Screenshot use?

PR Screenshot is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Screenshot use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Screenshot?

Skills that share tags, products or a category with PR Screenshot: Cloudflare Browser Rendering (cloudflare/moltworker, 9.9k stars), Test Fumadocs Wrangler (clabernetes/clabernetes, 143 stars), Cloudflare Browser Rendering (einverne/dotfiles, 121 stars) and Agents SDK (hodgef/apiker, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Screenshot?

team-mirai (a GitHub organization) maintains it in team-mirai/mirai-gikai, which has 212 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 11, 2026.

Source: team-mirai/mirai-gikai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.