brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
stackblitz-local-dev-loopEstablish a reproducible local development and browser-test loop for a WebContainer host, including isolation-header assertions, single-boot behavior under HMR, and cleanup checks. Use when a StackBlitz integration works manually but lacks dependable regression coverage. Trigger with "test WebContainers locally", "StackBlitz dev loop", or "WebContainer Play…
Independent GitHub snapshot · Automated classification · Original documentation governs
name: stackblitz-local-dev-loop description: >- Establish a reproducible local development and browser-test loop for a WebContainer host, including isolation-header assertions, single-boot behavior under HMR, and cleanup checks. Use when a StackBlitz integration works manually but lacks dependable regression coverage. Trigger with "test WebContainers locally", "StackBlitz dev loop", or "WebContainer Playwright test". argument-hint: "[project-path] [test-command]" allowed-tools: Read, Glob, Grep, WebFetch, Write, Edit version: 1.7.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT tags:
This skill turns a manually tested WebContainer host into a repeatable local loop. It separates pure file-tree and state-machine tests from browser integration tests that require SharedArrayBuffer, Service Workers, WebAssembly, and real response headers.
Use Read, Glob, and Grep to locate runtime construction, HMR boundaries, response headers, unit tests, and browser tests. Use WebFetch only for current official StackBlitz or WebContainers documentation. Use Write or Edit for minimal user-requested tests and configuration.
FileSystemTree without booting WebContainers.crossOriginIsolated before boot.teardown() does not invalidate an instance still owned by the current page.Use synthetic public dependencies by default. If the browser test requires licensed or private-package access, bind credentials through the CI secret store, restrict the test environment, redact logs, and skip with an explicit reason when authorized credentials are unavailable.
Do not weaken browser security flags, disable isolation checks, commit credentials, or make a flaky integration test silently optional. Changes to shared CI browsers, production headers, or licensed secrets require explicit authorization.
Return the test-layer map, exact assertions, browsers exercised, commands run, HMR and cleanup evidence, skips with reasons, changed files, and remaining platform limitations.
| Condition | Response |
|---|---|
| DOM simulator cannot boot | Move runtime behavior to a real browser test; keep only pure logic in unit tests. |
| HMR causes a second boot | Hoist and cache the boot promise at the application's stable ownership boundary. |
| CI lacks isolation | Inspect the served response and proxy chain; do not launch with unsafe browser flags. |
| Browser support differs | Record the exact supported/beta behavior rather than declaring universal compatibility. |
Given a Vite host with Playwright, add a pure FileSystemTree unit test and one Chromium smoke test that asserts crossOriginIsolated, observes one boot, receives a preview URL, and cleans up after navigation.