Index of every page on this site: llms.txt
All skills
fubits1 avatar

/playwright

@a024d57
by Iljafubits1/svelte-skills11 stars
2
Run it yourself

Playwright MCP usage rules, screenshots, code sandbox, Chrome data. Auto-invoke when using Playwright MCP tools.

Use this Skill: https://skilld.dev/gh/fubits1/svelte-skills/playwright

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈31 tokens for metadata: the name and description. ≈910 when used: this file.

Description uses 1.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈125 characters, or 1.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Playwright MCP

  • Ad-hoc screenshots (browser_take_screenshot): ALWAYS use filename with /tmp/ path. NEVER relative paths. NEVER save to the project directory. Every ad-hoc screenshot filename MUST start with /tmp/. Example: /tmp/tabs-before.png. Saving screenshots without /tmp/ prefix pollutes the project with untracked files. This applies to screenshots YOU take for debugging/verification: NOT to automated test screenshots, which follow their own conventions (e.g. tests/**/screenshots/).
  • ALWAYS verify changes in the browser using Playwright MCP. Navigate to the affected URL(s), take a screenshot, and visually confirm the page works. A DOM snapshot alone proves NOTHING: it cannot show canvas/WebGL/SVG rendering, layout, or visual state. ALWAYS take a screenshot. If you cannot visually confirm it works from the screenshot (e.g. WebGL canvas blank in headless), say so honestly, do NOT claim it's fixed.
  • ALWAYS Automate Playwright if you need to verify the same thing more than once.
  • ALWAYS Automate Playwright if you need to run a sequence of actions to verify.
  • run_code sandbox: use page.waitForTimeout(ms), never setTimeout.
  • NEVER delete Chrome user data dir (mcp-chrome-*). It has auth cookies.
  • If Playwright can't launch because Chrome is already running, kill the existing Chrome process yourself: don't ask the user.
  • CSS/layout changes: ALWAYS take before/after screenshots. Screenshot BEFORE making changes to establish a baseline, then screenshot AFTER to compare. This catches regressions instantly.
  • CSS/layout screenshots require CRITICAL EXAMINATION. Before taking the screenshot, write the specific visual criteria that must be true (e.g. "rows must be offset", "gap must be uniform"). After taking the screenshot, check EACH criterion individually and state pass/fail for each. Do NOT glance at the screenshot and say "looks good." If any criterion fails, STOP: do not proceed. When in doubt, take MORE screenshots at different widths, do NOT ask the user to verify for you.
  • When a visual bug is reported, INVESTIGATE before guessing fixes. Use browser_evaluate to measure actual element positions, sizes, and computed styles. Compare measured values against expected values. A 5-minute investigation with JS measurements beats hours of blind CSS tweaking. NEVER change formulas or constants without first understanding WHY the current values produce wrong results.
  • Use browser_evaluate to MEASURE, not just screenshot. When debugging layout issues, use JS to read actual getBoundingClientRect() positions, getComputedStyle() values, scrollHeight, clientWidth etc. Comparing measured numbers reveals the root cause instantly: screenshots only show symptoms. This is the difference between 5 minutes of investigation and hours of blind guessing.
  • PIXEL DRIFT DETECTION: When making CSS or HTML element changes, invoke frontend:pixel-perfect. It has the mandatory measurement workflow: measure BEFORE with browser_evaluate, apply change, measure AFTER, report a diff table. Screenshots supplement measurements: they are NOT the comparison. The numbers from getBoundingClientRect() and getComputedStyle() ARE the comparison. Never claim "looks the same" from eyeballing screenshots.
  • ALWAYS CHECK CONSOLE ERRORS. After EVERY navigation and EVERY interaction (click, select, submit), check for console errors. Use browser_evaluate to read errors or check the console log file from the navigation event. A page that renders but throws console errors is NOT working. Console errors are bugs until proven otherwise.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    The skill provides guidelines for automating browser tasks using Playwright. It includes instructions for visual verification through screenshots, executing code in sandboxed environments, and handling launch conflicts by automatically terminating existing browser processes. It also explicitly notes the presence of sensitive authentication cookies within the browser's profile directory.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

Signed by skilld at a024d57. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 5 months ago
user-invocable
true

README badge

README badge for fubits1/svelte-skills/playwright