webapp-testing
Skill4 starsChanged 9 months agoUnlicenseView on GitHub
Use when browser-based evidence of a local web app's behavior is needed — reproducing a UI bug, demonstrating a flow, inspecting rendered DOM, or capturing screenshots, console logs, or video. Not for writing the project's E2E test suite (see testing-workflow). Triggers on: "reproduce this in the browser", "screenshot", "record a video", "check what actually renders", "browser console".
187 other projects use a version of this, 141 of them edited.
Adopted by
Most recently taken up by
- magicpro97/vibeflowedited, first seen Oct 4, 2026
- IGTA-Tech/claude-skills-researchedited, first seen Oct 3, 2026
- apiricrypto/satno-agent-skillstheir own version, first seen Oct 1, 2026
- productionx-in/Core-Skillsedited, first seen Sep 29, 2026
- BrightGold70/skillstheir own version, first seen Sep 29, 2026
- leishifu666/skillsedited, first seen Sep 29, 2026
Used with
Projects with it also use skill-share, raffle-winner-picker and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ArogyaReddySkillskill-share
A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.
Also in 20 projects that use this
ArogyaReddySkillraffle-winner-picker
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Also in 20 projects that use this
trendinuxSkilltwitter-algorithm-optimizer
Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.
Also in 12 projects that use this
bkootazSkillartifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Also in 34 projects that use this
guaderramaSkilllead-research-assistant
Identifies and qualifies potential leads by analyzing products/services, understanding ideal customer profiles, conducting intelligent web research using Bright Data MCP tools, and providing actionable outreach strategies. Use when researching leads, prospecting, qualifying contacts, analyzing companies, enriching lead data, or creating outreach campaigns.
Also in 26 projects that use this
mm-mazharSkillcache-components
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).
Also in 5 projects that use this
- +5 more from ArogyaReddy
Other versions187 projects use a version of this.
Word for word · 0
None found.
Edited · 141
- anthropics/skills★ 199k10% same
- ComposioHQ/awesome-claude-skills★ 77k10% same
- composio-community/awesome-codex-skills★ 17k10% same
- Prat011/awesome-llm-skills★ 1.8k10% same
- warpdotdev/oz-skills★ 82511% same
- LeastBit/Claude_skills_zh-CN★ 58613% same
- Prorise-cool/Claude-Code-Multi-Agent★ 30511% same
- shuyu-labs/WebCode★ 27810% same
- maslennikov-ig/claude-code-orchestrator-kit★ 25910% same
- JayZeeDesign/awesome-claude-skills★ 17110% same
131 more not listed
Wrote their own version · 46
- github/awesome-copilot★ 40ksame name
- Galaxy-Dawn/claude-scholar★ 5.7ksame name
- microsoft/FluidFramework★ 4.9ksame name
- spytensor/openmozi★ 423same name
- JetBrains/skills★ 360same name
- Prompthon-IO/agent-systems-handbook★ 315same name
- JasonxzWen/harness-hub★ 71same name
- inbharatai/claude-skills★ 37same name
- xopcai/xopc★ 37same name
- AutumnsGrove/ClaudeSkills★ 34same name
36 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository70 other files it gives its agents.
- agent/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- git-guardrails-claude-codeSkill
- setup-project-skillsSkill
- skill-creatorSkill
- websearchSkill
- writing-great-skillsSkill
- codebase-designSkill
- construction-craftSkill
- critical-partnerSkill
- data-intensiveSkill
- diagnosing-bugsSkill
- django-disciplineSkill
- docker-disciplineSkill
- documentation-lifecycleSkill
- domain-driven-designSkill
- enterprise-patternsSkill
- git-disciplineSkill
- legacy-codeSkill
- production-readinessSkill
- refactoring-passSkill
- resolving-merge-conflictsSkill
- tddSkill
- testing-workflowSkill
- ui-design-directionSkill
- django-allauthSkill
- djangoSkill
- dockerSkill
- drfSkill
- full-calendarSkill
- giteaSkill
- htmxSkill
- http-status-codesSkill
- hyperscriptSkill
- langchainSkill
- litestarSkill
- prestashopSkill
- pykeSkill
- python-asyncSkill
- tablerSkill
- cleanroom-rewriteSkill
- councilSkill
- court-jesterSkill
- domain-modelingSkill
- fix-prSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- humanifySkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- ponytail-auditSkill
- ponytail-debtSkill
- prototypeSkill
- qaSkill
- researchSkill
- restore-test-pyramidSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 182 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Write small, task-specific Python Playwright scripts that produce browser evidence: assertions on rendered state first, …
- Distinctive: line 22
Every run follows the same spine — the assertion step is not optional.
- Very specific: line 82
Always run helper scripts with
--helpfirst: Treat bundled scripts as black boxes unless the task genuinely requires customization. - Distinctive: line 98
Keep server lifecycle in the helper and only browser logic in your script.
- Very specific: line 217
Key rule: When adding 'unsafe-inline', replace the entire directive tuple.
- Distinctive: line 242
Use Playwright's built-in context recording.
- Very specific: line 283
Call video.save_as(...) when the filename matters, and always report the saved path.
“Common” is measured: kept by at least 6 in 10 of the 182 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Application Testing
Write small, task-specific Python Playwright scripts that produce browser evidence:
assertions on rendered state first, screenshots/logs/video as supporting artifacts.
This skill is the evidence tool — the project's E2E suite (tiers, Docker env, when E2E
runs) is owned by the testing-workflow skill; a script written here can graduate into
that suite, but suite rules live there.
Core workflow
Every run follows the same spine — the assertion step is not optional; a script that only looks and screenshots proves nothing:
- Target — static HTML file or running app? Server already running, or start one via the helper?
- Recon — navigate, wait for rendered state, inspect the actual DOM, choose selectors from what's really there.
- Interact — drive the requested flow.
- Assert — verify the expected state in code (
assert), not by eyeballing a screenshot. - Evidence — capture what the user needs: logs, screenshots, video (appendix), and report observed result + artifact paths.
- Teardown —
context.close()thenbrowser.close(), so artifacts are fully written.
Script template (copy, then adapt)
from playwright.sync_api import sync_playwright, expect
with sync_playwright() as pw:
browser = pw.chromium.launch(
headless=True,
args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"],
)
context = browser.new_context(viewport={"width": 1440, "height": 900})
page = context.new_page()
console_msgs = []
page.on("console", lambda m: console_msgs.append(f"[{m.type}] {m.text}"))
# 1-2. Navigate + recon
page.goto("http://localhost:5173")
page.wait_for_load_state("networkidle")
# 3. Interact
page.get_by_role("button", name="Create task").click()
page.locator("input[name='title']").wait_for(state="visible", timeout=8000)
page.locator("input[name='title']").fill("Buy milk")
page.get_by_role("button", name="Save").click()
# 4. Assert — the point of the whole script
expect(page.locator(".task-list")).to_contain_text("Buy milk")
js_errors = [m for m in console_msgs if m.startswith("[error]")]
assert not js_errors, f"Console errors: {js_errors}"
# 5. Evidence
page.screenshot(path="/tmp/webapp-testing/after-create.png", full_page=True)
# 6. Teardown
context.close()
browser.close()
print("PASS — screenshot at /tmp/webapp-testing/after-create.png")Helper scripts
scripts/with_server.py— starts one or more local servers, waits for readiness, runs your automation, cleans up. Server errors are echoed to the console (prefixed[server N]), so a failed startup is visible, not silent.
Always run helper scripts with --help first. Treat bundled scripts as black boxes
unless the task genuinely requires customization.
Single server:
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.pyMultiple servers:
python scripts/with_server.py \
--server "cd backend && python server.py" --port 3000 \
--server "cd frontend && npm run dev" --port 5173 \
-- python your_automation.pyKeep server lifecycle in the helper and only browser logic in your script. If the user already has a server running, use their URL — do not start a duplicate.
Reconnaissance-then-action
On dynamic apps, do not guess selectors from source alone.
- Navigate to the page.
- Wait for
page.wait_for_load_state("networkidle"). - Inspect rendered state with one or more of:
page.screenshot(path="/tmp/webapp-testing/inspect.png", full_page=True) page.content() page.locator("button").all() - Pick selectors from rendered output — prefer
get_by_role(...),text=..., stable IDs. - Perform the requested actions, with explicit waits for state changes
(
wait_for_selector(), locator.wait_for(), URL assertions).
Core pattern: waiting for HTMX/JS swaps
networkidle does not wait for HTMX content swaps or JS-driven re-renders — it fires
when the network is quiet, which can be before the swapped element exists. Wait for the
real target state:
# ❌ networkidle may fire before the swapped element exists:
page.locator("button[hx-post]").click()
page.wait_for_load_state("networkidle")
page.locator("input[name='opening_float']").fill("500")
# ✅ wait for the element the swap produces:
page.locator("button[hx-post]").click()
page.locator("input[name='opening_float']").wait_for(state="visible", timeout=8000)
page.locator("input[name='opening_float']").fill("500")The same rule covers fixed sleeps: wait_for_timeout(500) is a race condition with
slower machines — wait for the state, not the clock.
Pitfalls → correct pattern
| ❌ Pitfall | ✅ Instead |
| Inspecting the DOM before the rendered state settles | Recon after networkidle + element-level waits |
| Starting a second dev server when one is already running | Use the supplied URL |
| Screenshot-only "verification" | Assert on DOM state; screenshot is supporting evidence |
wait_for_timeout(...) for content to "probably" load | Wait for the specific selector/state |
| Enabling video after the page exists | Configure recording on the context first (appendix) |
Skipping context.close() | Close context before browser — artifacts finalize on close |
Playwright Python (sync) API gotchas
Triple-click to select all text
# ❌ Wrong — triple_click() does not exist on Locator:
locator.triple_click()
# ✅ Correct:
locator.click(click_count=3)Reading data attributes
basket_id = page.locator("[data-basket-id]").first.get_attribute("data-basket-id")
text = page.locator("button").first.inner_text()Typing text sequentially
# ❌ Deprecated:
locator.type("text", delay=80)
# ✅ Current:
locator.press_sequentially("text", delay=80)Debugging Content Security Policy (CSP) violations
Common CSP error patterns
| Error Message | Cause | Fix |
Applying inline style violates... 'style-src' | Element has style="..." attribute | Add 'unsafe-inline' to style-src (replace entire directive) |
Executing inline script violates... 'script-src' | <script>...</script> without hash/nonce | Add 'unsafe-inline' to script-src (replace entire directive) |
Loading the image 'https://...' violates... 'img-src' | External image domain not allowed | Add domain to img-src |
Loading the stylesheet 'https://...' violates... 'style-src' | External CSS not allowed | Add CDN domain to style-src |
'unsafe-inline' is ignored if either a hash or nonce value is present | Hash/nonce present alongside 'unsafe-inline' | Replace entire directive, don't append |
Capturing CSP violations
console_messages = []
page.on("console", lambda msg: console_messages.append(f"[{msg.type}] {msg.text}"))
# Filter for CSP violations after the run
csp_errors = [m for m in console_messages if "Content Security Policy" in m]Standard test CSP relaxations (django-csp)
# In test settings (settings_test.py):
if CONTENT_SECURITY_POLICY:
# Inline styles (Leaflet, Chart.js, etc.)
CONTENT_SECURITY_POLICY["DIRECTIVES"]["style-src"] = (
"'self'", "'unsafe-inline'", "cdn.jsdelivr.net", "fonts.googleapis.com"
)
# Inline scripts (config injection, analytics)
CONTENT_SECURITY_POLICY["DIRECTIVES"]["script-src"] = (
"'self'", "'unsafe-inline'", "'unsafe-eval'",
"https://unpkg.com", "https://cdn.jsdelivr.net"
)
# Map tiles, external images
CONTENT_SECURITY_POLICY["DIRECTIVES"]["img-src"] = (
"'self'", "data:", "https://*.tile.openstreetmap.org"
)Key rule: When adding 'unsafe-inline', replace the entire directive tuple.
Appending it alongside hashes makes CSP ignore 'unsafe-inline' entirely.
Examples
examples/element_discovery.py— inspect buttons, links, and inputs on a pageexamples/static_html_automation.py— automate a localfile://HTML targetexamples/console_logging.py— capture console logs during automationexamples/video_recording.py— record and name a browser-video artifact with an orange-dot pointer overlay, click ripple effect, and human-paced smooth pointer movement
Appendix: video recording
Video is the rare case. Record only when at least one of these is true:
- The user explicitly asks for a recording, walkthrough, demo, or repro artifact.
- The bug is transient or timing-sensitive: toasts, redirects, modal flashes, race conditions, focus loss, animation issues.
- The flow is multi-step and screenshots would hide how the state changed over time.
For everything else, assertions + a screenshot are the lighter default. Video supplements logs, assertions, and written findings — it never replaces them.
Recording pattern
Use Playwright's built-in context recording; keep Chromium headless.
from pathlib import Path
from playwright.sync_api import sync_playwright
artifact_dir = Path("/tmp/webapp-testing")
artifact_dir.mkdir(parents=True, exist_ok=True)
with sync_playwright() as pw:
browser = pw.chromium.launch(
headless=True,
args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"],
)
context = browser.new_context(
viewport={"width": 1440, "height": 900},
record_video_dir=str(artifact_dir / "raw-videos"),
record_video_size={"width": 1440, "height": 900},
)
page = context.new_page()
video = page.video # capture the handle early if you plan to rename
page.goto("http://localhost:5173")
page.wait_for_load_state("networkidle")
# ... interaction ...
final_video_path = artifact_dir / "login-repro.webm"
if video is not None:
video.save_as(final_video_path)
context.close()
browser.close()
print(f"Video saved to: {final_video_path}")Artifact rules
- Configure
record_video_dir/record_video_sizeonbrowser.new_context(...), not on the page; one fresh context per recorded flow. context.close()is mandatory — the video finalizes only when the context closes.- Call
video.save_as(...)when the filename matters, and always report the saved path.
Human-facing recordings
For demos and walkthroughs (not raw debugging): inject a lightweight overlay showing the
pointer as an orange dot with a click ripple effect (non-interactive:
pointer-events: none); move at the pace of a human — short pauses around key state
changes, smooth stepped motion via page.mouse.move(..., steps=...), no teleporting
between targets. See examples/video_recording.py for the full pattern.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

