From netlify-skills
Guides usage of Netlify Blobs for file/asset storage — CRUD, metadata, scoping, and local dev. Clarifies when Blobs is inappropriate vs Netlify Database.
How this skill is triggered — by the user, by Claude, or both
Slash command
/netlify-skills:netlify-blobsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Netlify Blobs is zero-config object storage for **files and assets**: images, documents, uploads, exports, cached binary artifacts. Available from any Netlify compute (functions, edge functions, framework server routes). No provisioning required.
Netlify Blobs is zero-config object storage for files and assets: images, documents, uploads, exports, cached binary artifacts. Available from any Netlify compute (functions, edge functions, framework server routes). No provisioning required.
Not for dynamic data. If the project needs to store records, user data, application state, or anything queryable, use Netlify Database instead — see netlify-database/SKILL.md. Reach for Blobs when the thing you're storing is a file or an asset blob, not a record.
npm install @netlify/blobs
If the prompt didn't already specify, ask the user a few short questions before scaffolding any blob storage — answers shape access patterns, scoping, and how the assets are served back to clients:
getStore()) persists across deploys — the right default for user data. Deploy-scoped (getDeployStore()) is tied to a single deploy and disappears when that deploy is replaced — use only when the lifecycle should match a deploy (e.g., per-deploy build artifacts).list({ prefix: ... }) patterns.If you don't have preferences here, tell me what the assets are and I'll pick sensible defaults — typically site-scoped with private access, served through an authenticated function.
import { getStore } from "@netlify/blobs";
const store = getStore({ name: "my-store" });
// Use "strong" consistency when you need immediate reads after writes
const store = getStore({ name: "my-store", consistency: "strong" });
These are the only store methods. Do not invent others.
// String or binary data
await store.set("key", "value");
await store.set("key", fileBuffer);
// With metadata
await store.set("key", data, {
metadata: { contentType: "image/png", uploadedAt: new Date().toISOString() },
});
// JSON data
await store.setJSON("key", { name: "Example", count: 42 });
// Text (default)
const text = await store.get("key"); // string | null
// Typed retrieval
const json = await store.get("key", { type: "json" }); // object | null
const stream = await store.get("key", { type: "stream" });
const blob = await store.get("key", { type: "blob" });
const buffer = await store.get("key", { type: "arrayBuffer" });
// With metadata
const result = await store.getWithMetadata("key");
// { data: any, etag: string, metadata: object } | null
// Metadata only (no data download)
const meta = await store.getMetadata("key");
// { etag: string, metadata: object } | null
await store.delete("key");
const { blobs } = await store.list();
// blobs: [{ etag: string, key: string }, ...]
// Filter by prefix
const { blobs } = await store.list({ prefix: "uploads/" });
getStore()): Persist across all deploys. Use for most cases.getDeployStore()): Tied to a specific deploy lifecycle.| Limit | Value |
|---|---|
| Max object size | 5 GB |
| Store name max length | 64 bytes |
| Key max length | 600 bytes |
Local dev uses a sandboxed store (separate from production). For Vite-based projects, install @netlify/vite-plugin to enable local Blobs access. Otherwise, use netlify dev.
Common error: "The environment has not been configured to use Netlify Blobs" — install @netlify/vite-plugin or run via netlify dev.
If a get/set call throws in a deployed function, don't guess at a fix or route around it — the exact error is in the function logs, and it almost always names the cause. Read it first. Common causes: the store isn't reachable from the calling context, a missing or mismatched store name, or a read-after-write timing gap (an immediate read of a just-written key — use consistency: "strong" when you need read-your-writes).
The store exposes only the documented methods above; there is no lower-level REST endpoint to fall back on. If the logs don't resolve it, report the exact error plus the affected site/deploy to the user and stop. Reaching around a failing store — direct https://api.netlify.com/... calls, reading auth tokens off disk, or inventing endpoints — can't work (those aren't supported surfaces) and risks corrupting or losing the very data you're trying to save.
npx claudepluginhub costrict-plugins-repo/anthropic-netlify-skills --plugin netlify-skills2plugins reuse this skill
First indexed Jul 3, 2026
Guides usage of Netlify Blobs for file/asset storage — CRUD, metadata, scoping, and local dev. Clarifies when Blobs is inappropriate vs Netlify Database.
Implements Vercel Blob for Next.js file uploads (images, PDFs, videos), client uploads with tokens, presigned URLs, listing/deleting, pathname organization, and fixes errors like BLOB_READ_WRITE_TOKEN or size limits.
Provides expert guidance on Vercel storage: Blob, Edge Config, Neon Postgres, Upstash Redis, Supabase, Prisma, KV, Postgres. Use for choosing, configuring, or integrating storage in Vercel apps.