Skip to content
Skillv1.0.0

stackblitz-rate-limits

WebContainer resource limits: memory, CPU, file system size, process count. Use when working with WebContainers or StackBlitz SDK. Trigger: "webcontainer limits".

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-rate-limits/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill stackblitz-rate-limits. Copyright stays with the author (MIT).

StackBlitz Rate Limits

Overview

WebContainer resource limits: memory, CPU, file system size, process count.

Instructions

Step 1: WebContainer Resource Limits

Resource Limit Notes
Memory ~2GB Shared with browser tab
File system Ephemeral, in-memory Lost on page refresh
Processes Multiple concurrent Each consumes memory
Network HTTP only No raw TCP/UDP sockets
npm packages Most work Native addons not supported

Step 2: Handle Memory Pressure

// Monitor memory usage inside WebContainer
const proc = await wc.spawn('node', ['-e', `
  setInterval(() => {
    const mem = process.memoryUsage();
    const mbUsed = Math.round(mem.heapUsed / 1024 / 1024);
    if (mbUsed > 500) console.warn('High memory: ' + mbUsed + 'MB');
  }, 5000);
`]);

Step 3: Optimize File System Size

// Mount only essential files -- skip test files, docs, etc.
const productionFiles: FileSystemTree = {
  'package.json': { file: { contents: minimalPackageJson } },
  src: { directory: { /* only source files */ } },
  // Skip: tests/, docs/, .git/, large assets
};
await wc.mount(productionFiles);

Error Handling

Issue Cause Solution
Tab crashes OOM Reduce mounted files, fewer deps
Slow npm install Large deps Use --prefer-offline, fewer packages
Process killed Memory limit Monitor with memoryUsage()

Resources

Next Steps

For security, see stackblitz-security-basics.

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-ra-2ad564/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-ra-2ad564.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-stackblitz-ra-2ad564",
  "kind": "skill",
  "name": "stackblitz-rate-limits",
  "description": "WebContainer resource limits: memory, CPU, file system size, process count. Use when working with WebContainers or StackBlitz SDK. Trigger: \"webcontainer limits\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "ide",
      "webcontainers",
      "stackblitz",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "WebContainer resource limits: memory, CPU, file system size, process count. Use when working with WebContainers or StackBlitz SDK. Trigger: \"webcontainer limits\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/stackblitz-pack/skills/stackblitz-rate-limits/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/stackblitz-pack/skills/stackblitz-rate-limits/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/stackblitz-pack/skills/stackblitz-rate-limits/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit"
    ],
    "license": "MIT"
  },
  "instructions": "# StackBlitz Rate Limits\n\n## Overview\n\nWebContainer resource limits: memory, CPU, file system size, process count.\n\n## Instructions\n\n### Step 1: WebContainer Resource Limits\n\n| Resource | Limit | Notes |\n|----------|-------|-------|\n| Memory | ~2GB | Shared with browser tab |\n| File system | Ephemeral, in-memory | Lost on page refresh |\n| Processes | Multiple concurrent | Each consumes memory |\n| Network | HTTP only | No raw TCP/UDP sockets |\n| npm packages | Most work | Native addons not supported |\n\n### Step 2: Handle Memory Pressure\n\n```typescript\n// Monitor memory usage inside WebContainer",
  "cost": {
    "context_tokens": 407
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-stackblitz-ra-2ad564/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.