Agent skill · practicalswan

netlify-blobs

Store and retrieve unstructured objects, file uploads, and cache-like state on Netlify using the @netlify/blobs key/value API from Functions, Edge Functions, and Build Plugins. Use when a task involves saving user file or image uploads, persisting form or contact-form submissions, storing generated output from Background Functions (sitemaps/processed media/bulk-email results), building read-only asset stores, adding client-side blob expiration, or wiring file-based blob uploads at deploy time. Not for per-user, transactional, or relational data (counters/balances/sessions) — reach for Netlify DB there instead.

What it needs

About 8k tokens when loaded.

What this skill does

Netlify Blobs Modern import — reach for this: Install: npm install @netlify/blobs. Fetch API is required (built into Node 18+); otherwise pass a custom fetch. Two ways to open a store — use the options-object form when you need consistency or a custom fetch (the string form cannot pass them): siteID, token, deployID, and region are set automatically inside Functions, Edge Functions, and Build Plugins — do not pass them manually there. Choosing the store type — READ THIS FIRST getStore(name) — site-scoped. Persists across deploys and is shared across ALL deploy contexts. Code on a Deploy Preview reads, overwrites, and deletes production data. Never seed throwaway data or run destructive tests from a preview. getDeployStore(name) — scoped to one deploy; isolated from production. Use this for throwaway/per-deploy data, or use a context-specific store name for isolation. Blobs have no built-in access control — the serving function is the gate. Default to private: gate reads behind an authenticated function rather than exposing blobs publicly. Never accept an arbitrary caller-supplied key against a store holding sensitive data. Common tasks Persist a user upload with metadata (set) Edge Function form is identical but imports Context from @netlify/edge-functions. Persist JSON (setJSON) Read a blob (get) — always null-check Pass type for other formats: get(key, { type: "json" "arrayBuffer" "blob" "stream" "text" }). Atomic conditional write Write only if the key is new: Write only if the entry matches a known ETag (compare-and-swap): Do not build counters, balances, or read-modify-write logic on a blob key — even with onlyIfMatch retries. That is transactional data; use Netlify DB. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills practicalswan/netlify-blobs

View the source on GitHub

Browse the @skills marketplace