Skip to content
Back to skills

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
ai-agentsbash

Works with

  • cli

Security analysis

A100/100

Scanned September 24, 2026

npx -y skills add thkt/dotclaude --skill use-workflow-pageshot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Use Workflow Pageshot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Use Workflow Pageshot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thkt-use-workflow-pageshot/badge)](https://www.skillsdirectory.com/skills/thkt-use-workflow-pageshot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.