browser-diagnosis

browser-diagnosis is a cursor rule for Cursor from shapediver/AppBuilderSdk. It costs 36 tokens per session (469 once invoked), scanned A, original, MIT.

A set of project instructions for reproducing and investigating App Builder problems in a web browser, including Playwright, a browser testing tool.

In plain words
What is it for?
Use it to run the local app, inspect browser state, create temporary Playwright drivers, and count or compare PUT requests during an interaction.
Why use it?
It gives a repeatable way to diagnose UI interactions, selection problems, expired sessions, and unexpected network requests instead of relying on manual guesses.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to run the local app, inspect browser state, create temporary Playwright drivers, and count or compare PUT requests during an interaction.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/shapediver/appbuildersdk/browser-diagnosis
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.

Clone the repo
git clone --depth 1 https://github.com/shapediver/AppBuilderSdk

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 browser-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/rules/shapediver/appbuildersdk/browser-diagnosis/github.svg)](https://agentmods.dev/rules/shapediver/appbuildersdk/browser-diagnosis)
Your own site
<a href="https://agentmods.dev/rules/shapediver/appbuildersdk/browser-diagnosis"><img src="https://agentmods.dev/badge/rules/shapediver/appbuildersdk/browser-diagnosis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/rules/shapediver/appbuildersdk/browser-diagnosis"><img src="https://agentmods.dev/badge/rules/shapediver/appbuildersdk/browser-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 469 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.00036 $0.00469
Opus 5 $0.00018 $0.00234
Sonnet 5 $0.00007 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 2d ago against content hash 98d5230ed6a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

browser-diagnosis 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.

.cursor/rules/browser-diagnosis.mdc · 33 lines

What it actually says

Browser diagnosis (App Builder)

Dev server and models

  • pnpm start --port 3000http://localhost:3000/?slug=<slug>. Slug data in modelstorage.local.ts.
  • Platform token expires hourly; run pnpm run convert-slug-data when a session fails to load.
  • Testing-account models do not whitelist localhost — use the deployed URL.
  • Settings/theme: ?g=<file> from public/.

Throwaway Playwright

Write drivers as .mjs under test-results/scratch (wiped by e2e; keep copies in the scratchpad). Run from the project directory so @playwright/test resolves. Viewport 1280x720. Use Write/Edit for driver files (Python "\n" escapes have produced literal newlines inside string literals).

In-page (window.SDV)

  • Object.values(SDV.sessions)[0]parameters, outputs, customize
  • SDV.viewportsbusy for idle detection
  • SDV.EVENTTYPE_INTERACTION + SDV.addListenerSELECT_ON/OFF, HOVER_ON, MULTI_SELECT_*
  • Node InteractionData: restrictedManagers, interactionTypes (capability), interactionStates (current)

Count computations with page.on("request") filtered to PUT and /output; diff the body's parameter values against the previous request.

Pulse highlight effects make pixel counting unreliable; use events, parameter values, or public/example-simple-interaction-colors.json for snapshots.

Who committed? (async stacks)

Debounce in handleChange breaks stacks. Temporary console.log("[diag] ...", new Error().stack) in useParameterComponentCommons.handleChange, the custom parameter executor, and batchParameterValueUpdate; capture page.on("console"); then git checkout HEAD -- the instrumented files.

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 · 33 lines · 36 tokens per session scan A 98d5230ed6a3

Subscribe to this mod's changes

browser-diagnosis is a cursor rule published in the GitHub repository shapediver/AppBuilderSdk (16 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 469 once invoked, about $0.0002 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-09-10.