Skip to content
Skillv1.0.0

stackblitz-debug-bundle

Collect WebContainer diagnostic info: boot state, file system, process list. Use when working with WebContainers or StackBlitz SDK. Trigger: "stackblitz debug".

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/stackblitz-pack/skills/stackblitz-debug-bundle/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill stackblitz-debug-bundle. Copyright stays with the author (MIT).

StackBlitz Debug Bundle

Overview

Collect WebContainer diagnostic info: boot state, file system, process list.

Instructions

Step 1: Check Boot State

async function diagnoseWebContainer(wc: WebContainer) {
  const report: Record<string, any> = {};

  // File system check
  try {
    const entries = await wc.fs.readdir('/');
    report.filesystem = { status: 'ok', rootEntries: entries.length };
  } catch (e: any) {
    report.filesystem = { status: 'error', message: e.message };
  }

  // Node.js check
  try {
    const proc = await wc.spawn('node', ['-e', 'console.log(JSON.stringify({version: process.version, arch: process.arch}))']);
    let output = '';
    proc.output.pipeTo(new WritableStream({ write(data) { output += data; } }));
    await proc.exit;
    report.node = JSON.parse(output);
  } catch (e: any) {
    report.node = { status: 'error', message: e.message };
  }

  // Memory check
  try {
    const proc = await wc.spawn('node', ['-e', 'console.log(JSON.stringify(process.memoryUsage()))']);
    let output = '';
    proc.output.pipeTo(new WritableStream({ write(data) { output += data; } }));
    await proc.exit;
    report.memory = JSON.parse(output);
  } catch { report.memory = 'unavailable'; }

  return report;
}

Step 2: Check Browser Support

function checkBrowserSupport() {
  return {
    sharedArrayBuffer: typeof SharedArrayBuffer !== 'undefined',
    crossOriginIsolated: window.crossOriginIsolated,
    serviceWorker: 'serviceWorker' in navigator,
    userAgent: navigator.userAgent,
  };
}

Error Handling

Check Expected Failed Action
SharedArrayBuffer defined Add COOP/COEP headers
crossOriginIsolated true Check all headers present
Node.js version v18+ WebContainer ships its own
Root FS entries > 0 Re-mount files

Resources

Next Steps

For resource limits, see stackblitz-rate-limits.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-stackblitz-de-79415f/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-stackblitz-de-79415f.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-stackblitz-de-79415f",
  "kind": "skill",
  "name": "stackblitz-debug-bundle",
  "description": "Collect WebContainer diagnostic info: boot state, file system, process list. Use when working with WebContainers or StackBlitz SDK. Trigger: \"stackblitz debug\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "ide",
      "webcontainers",
      "stackblitz",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Collect WebContainer diagnostic info: boot state, file system, process list. Use when working with WebContainers or StackBlitz SDK. Trigger: \"stackblitz debug\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/stackblitz-pack/skills/stackblitz-debug-bundle/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/stackblitz-pack/skills/stackblitz-debug-bundle/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/stackblitz-pack/skills/stackblitz-debug-bundle/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Bash(curl:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# StackBlitz Debug Bundle\n\n## Overview\n\nCollect WebContainer diagnostic info: boot state, file system, process list.\n\n## Instructions\n\n### Step 1: Check Boot State\n\n```typescript\nasync function diagnoseWebContainer(wc: WebContainer) {\n  const report: Record<string, any> = {};\n\n  // File system check\n  try {\n    const entries = await wc.fs.readdir('/');\n    report.filesystem = { status: 'ok', rootEntries: entries.length };\n  } catch (e: any) {\n    report.filesystem = { status: 'error', message: e.message };\n  }\n\n  // Node.js check\n  try {\n    const proc = await wc.spawn('node', ['-e', 'console.",
  "cost": {
    "context_tokens": 526
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-stackblitz-de-79415f/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.