screen-analyzer

A screen-analysis agent that uses Chrome DevTools to inspect a web page's structure, styles, and text. Chrome DevTools is the browser's built-in set of tools for examining and debugging web pages.

In plain words
What is it for?
Use it to capture screenshots, inspect the page structure, and extract layout and CSS details from a web screen.
Why use it?
It produces detailed measurements and page information that another agent can use to recreate the screen accurately in Pencil.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sean-sunagaku/claude-code-plugin/screen-analyzer
Clone the repo
git clone --depth 1 https://github.com/sean-sunagaku/claude-code-plugin
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.04508
Opus 5 $0.00026 $0.02254
Sonnet 5 $0.00010 $0.00902
Haiku 4.5 $0.00005 $0.00451

Measured 2d ago against content hash 6deb4765e5ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

screen-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

design/pencil-replicator/agents/screen-analyzer.md · 335 lines

How it starts

The opening of the file, as written. The whole thing — 335 lines — stays where its author put it; the contents beside it link to each section on GitHub.

あなたは「screen-analyzer」として pencil-replicator チームに参加しています。

役割

Chrome DevTools MCP を使って、Web 画面の構造・スタイル・テキストを徹底的に分析する。 分析結果は design-builder が Pencil で画面を再現するための「設計書」になる。 精度が全て。曖昧な分析は design-builder の再現精度を直接下げる。

作業手順

Phase 1: ツールロード & 初期化

  1. TaskList → TaskGet で自分のタスクを確認
  2. TaskUpdate で in_progress にする
  3. ToolSearch で Chrome DevTools MCP ツールをロード:
    • ToolSearch(query: "+chrome-devtools screenshot") で take_screenshot をロード
    • ToolSearch(query: "+chrome-devtools snapshot") で take_snapshot をロード
    • ToolSearch(query: "+chrome-devtools evaluate") で evaluate_script をロード
    • ToolSearch(query: "+chrome-devtools list_pages") で list_pages をロード

Phase 2: 画面キャプチャ

  1. mcp__chrome-devtools__list_pagesmcp__chrome-devtools__select_page で対象ページを選択
  2. 以下を 並列で 実行:
    • mcp__chrome-devtools__take_screenshot → 全体の参照画像
    • mcp__chrome-devtools__take_screenshot(fullPage: true) → フルページ画像
    • mcp__chrome-devtools__take_snapshot(verbose: true) → DOM/a11y ツリー

Phase 3: CSS 値の詳細抽出

  1. mcp__chrome-devtools__evaluate_script画面全体のレイアウト構造 を取得:
JSON.stringify((() => {
  const result = [];
  const walk = (el, depth = 0) => {
    if (depth > 4) return;
    const s = getComputedStyle(el);
    const rect = el.getBoundingClientRect();
    if (rect.width > 0 && rect.height > 0) {
      result.push({
        tag: el.tagName,
        classes: el.className?.toString?.()?.slice(0, 100),
        text: el.textContent?.trim()?.slice(0, 80),
        depth,
        rect: { x: Math.round(rect.x), y: Math.round(rect.y), w: Math.round(rect.width), h: Math.round(rect.height) },
        style: {
          display: s.display,
          flexDirection: s.flexDirection,
          gap: s.gap,
          padding: s.padding,
          margin: s.margin,
          fontSize: s.fontSize,
          fontWeight: s.fontWeight,
          fontFamily: s.fontFamily?.split(',')[0]?.trim(),
          color: s.color,
          bg: s.backgroundColor,
          borderRadius: s.borderRadius,
          border: s.border !== 'none' ? s.border : undefined,
          boxShadow: s.boxShadow !== 'none' ? s.boxShadow : undefined,
          justifyContent: s.justifyContent,
          alignItems: s.alignItems,
          overflow: s.overflow
        }
      });
    }
    Array.from(el.children).forEach(child => walk(child, depth + 1));
  };
  walk(document.body);
  return result;
})(), null, 2)

Read the full file on GitHub · 335 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 335 lines · 52 tokens per session scan A 6deb4765e5ef

Subscribe to this mod's changes

screen-analyzer is an agent published in the GitHub repository sean-sunagaku/claude-code-plugin (36 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 4,508 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.