Back to skills
SKILL.md
Use Workflow Pageshot
ASecurity/pr の内部ヘルパー。PR 本文 (Preview URL + How to Test) を読み取り、agent-browser を駆動してスクリーンショット (1 step) または動画 (2+ step) を撮影し、/pr が gh pr create --attach に渡す成果物のパスを返す。
- 12 stars
- 0 votes
- 0 copies
- 0 views
- Added September 24, 2026
Works with
Security analysis
100/100npx -y skills add thkt/dotclaude --skill use-workflow-pageshot --agent claude-codeAre you the author of Use Workflow Pageshot?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thkt-use-workflow-pageshot)---
name: use-workflow-pageshot
description: /pr の内部ヘルパー。PR 本文 (Preview URL + How to Test) を読み取り、agent-browser を駆動してスクリーンショット (1 step) または動画 (2+ step) を撮影し、/pr が gh pr create --attach に渡す成果物のパスを返す。
when_to_use: /pr workflow UI変更検出時のスクショ/動画撮影, screenshot capture, video capture
allowed-tools: Read Bash(agent-browser:*) Bash(ffmpeg:*) Bash(mkdir:*) Bash(date:*)
model: opus
user-invocable: false
---
# use-workflow-pageshot
## 入力
PR 本文は `/pr` から文字列として渡される。下表のいずれかが欠落していれば、`mode=failed reason=<欠落フィールド名>` を返し、判断は `/pr` に任せる。
| フィールド | ソース |
| ----------- | --------------------------------------------------------- |
| Preview URL | PR 本文の冒頭にある `Preview URL: <URL>` 行 |
| Steps | PR 本文の `## How to Test` セクション配下の番号付きリスト |
## ブラウザ engine
すべての agent-browser 呼び出しに `--session pageshot --engine chrome` を付ける。既定の lightpanda は screenshot でプレースホルダー PNG を返す。
## モード選択
| Steps の数 | モード | 成果物 |
| ---------- | ---------- | ----------- |
| 1 | screenshot | step-01.png |
| 2+ | video | capture.mp4 |
## 実行
| ステップ | アクション |
| -------- | ---------------------------------------------------------------------------- |
| 1 | 出力ディレクトリを作成。`.claude/workspace/pageshot/$(date +%Y%m%d-%H%M%S)/` |
| 2 | `agent-browser open {Preview URL}` |
| 3 | モードに応じて Screenshot Flow または Video Flow を実行 |
| 4 | 成果物の絶対パスを stdout に出力 |
## Screenshot Flow (1 step)
| # | コマンド |
| --- | ------------------------------------------------------------------------ |
| 1 | `agent-browser snapshot` でアクセシビリティツリーを取得 |
| 2 | step に操作が含まれていれば `agent-browser {click/type/fill/...}` を実行 |
| 3 | `agent-browser screenshot --full {outdir}/step-01.png` |
## Video Flow (2+ steps)
step 間に `agent-browser wait 500` を挟む。各操作の前に `snapshot` を実行して要素を特定する。
| # | コマンド |
| --- | ---------------------------------------------------------------------- |
| 1 | `agent-browser record start {outdir}/capture.webm` |
| 2 | 各 step について順に `snapshot` してから操作を実行 |
| 3 | `agent-browser record stop` |
| 4 | `ffmpeg -i {outdir}/capture.webm -vcodec libx264 {outdir}/capture.mp4` |
## 出力
stdout に mode 行を 1 つ返す。`/pr` はこの行を読んで分岐する。
| 状況 | 行 |
| ------------------ | --------------------------------------------------------- |
| 静止画を撮った | `mode=screenshot artifact=/absolute/path/to/step-01.png` |
| 動画を撮った | `mode=video artifact=/absolute/path/to/capture.mp4` |
| 入力が欠けた | `mode=failed reason=<欠落フィールド名>` |
| 撮影中に失敗した | `mode=failed reason=<1 行の理由>` |
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.