screenshot-strategy

screenshot-strategy is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 0 tokens per session (4,348 once invoked), scanned A, original, MIT.

A decision guide for choosing browser tools for screenshots, exploration and repeatable checks. It explains when to use an interactive browser session and when to use Playwright, a tool for scripted browser tests.

In plain words
What is it for?
Use it to choose tools for inspecting pages, logging in, taking screenshots, checking responsive layouts and running cross-browser or CI regression tests.
Why use it?
It prevents one-off visual checks from being confused with repeatable tests, and avoids using a measurement tool for ordinary browser interaction.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/before-after-screenshot.ts \.

Good fit Use it to choose tools for inspecting pages, logging in, taking screenshots, checking responsive layouts and running cross-browser or CI regression tests.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter
agentmods
npx agentmods add rules/yudefine/nuxt-supabase-starter/screenshot-strategy

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for screenshot-strategy

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/screenshot-strategy.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/screenshot-strategy)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/screenshot-strategy"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/screenshot-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 4,348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.04348
Opus 5 $0.00000 $0.02174
Sonnet 5 $0.00000 $0.00870
Haiku 4.5 $0.00000 $0.00435

Measured today against content hash e96df1e60d4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

screenshot-strategy 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 today.

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.

template/.cursor/rules/screenshot-strategy.mdc · 248 lines

How it starts

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

Runtime adapter boundary

The obligations, predicates, evidence schema, failure handling, and review timing in this source are shared. Concrete browser, dispatch, question, filesystem, and command mechanics are target-native and MUST come from the selected runtime fragment at the matching adapter path. A fragment declares only the capability it can prove; an absent or unverified capability remains blocked and MUST NOT be silently replaced by a neighbouring runtime.

Screenshot Strategy

所有截圖工作都應先判斷:這是一次性探索,還是需要可重現的回歸驗證。

工具選擇

先判斷一次性探索、人工驗收、可重現回歸、多 viewport、跨瀏覽器與量測需求,再由 target adapter 選擇已驗證的 browser carrier、reproducible runner 或 measurement surface。共通判準如下:

需求 共通選擇規則
一次性互動與人工驗收 target adapter 的 interactive browser carrier
多 viewport、跨瀏覽器、多分頁或需重拍的回歸 target adapter 的 reproducible browser runner
LCP/CLS/INP breakdown 或 heap measurement target adapter 的 measurement-only surface
不需要的上層 runtime / QA 平台 MUST NOT 取代已批准的 target carrier

Cloud / clean-browser fallback

遠端 provider、proxy、clean profile 與 CAPTCHA 能力都是 opt-in target capability。只有本機 carrier 確實不可用、目標允許公開資料且不需要私有登入態時,才可依 target adapter 的 consent flow 啟用;provider credential NEVER 寫入 repo。

給 user 開瀏覽器看頁面

agent 自驗、user 可見 headed navigation 與 measurement 是三種不同用途,必須使用 target adapter 明確聲明的 surface。任何 unavailable surface 都保持 blocked;NEVER 用 uncontrolled default browser 代替。

決策樹

  1. 需要多 viewport / responsive?→ reproducible browser runner
  2. 需要跨瀏覽器或可重拍回歸?→ reproducible browser runner
  3. 需要一次性互動?→ target adapter 的 interactive browser carrier
  4. 純 performance / heap measurement?→ target adapter 的 measurement-only surface

存放方式

screenshots/<environment>/<topic>/
  • <environment>local / staging / production
  • <topic>:依用途分兩類,MUST 嚴格區分(見下節)
  • 評估報告可放 review.md

Read the full file on GitHub · 248 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. today Changed · -110 lines e96df1e60d4f
  2. 5d ago First seen · 358 lines · 0 tokens per session scan A f072bc9db29e

Subscribe to this mod's changes

screenshot-strategy is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,348 tokens. 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-09-03.