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 jukeyman(0) 0 installs
Free
Sign in to install

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

See reviews

About

Imported from jukeyman/jukeyman-skills (skills/saas-packs--stackblitz-pack--stackblitz-debug-bundle/SKILL.md). Install upstream with npx skills add jukeyman/jukeyman-skills --skill saas-packs--stackblitz-pack--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/jukeyman-jukeyman-skills-saas-packs-stackblitz-pack-stac-865305/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.

jukeyman-jukeyman-skills-saas-packs-stackblitz-pack-stac-865305.ocm.jsonjson
{
  "ocm": "1",
  "id": "jukeyman-jukeyman-skills-saas-packs-stackblitz-pack-stac-865305",
  "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": "jukeyman",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "ide",
      "webcontainers",
      "stackblitz",
      "github"
    ],
    "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": "github",
      "repository": "https://github.com/jukeyman/jukeyman-skills",
      "path": "skills/saas-packs--stackblitz-pack--stackblitz-debug-bundle/SKILL.md",
      "ref": "99825ad3f3bcc6597ddcc7294a14e6e922f2b67b",
      "url": "https://github.com/jukeyman/jukeyman-skills/blob/99825ad3f3bcc6597ddcc7294a14e6e922f2b67b/skills/saas-packs--stackblitz-pack--stackblitz-debug-bundle/SKILL.md",
      "key": "jukeyman/jukeyman-skills/skills/saas-packs--stackblitz-pack--stackblitz-debug-bundle/SKILL.md"
    },
    "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/jukeyman-jukeyman-skills-saas-packs-stackblitz-pack-stac-865305/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.