Skip to content
Skills Library
DevOps & cloud · Building & coding

netlify-blobs

/netlify-blobs

使用 Netlify Blobs 对象存储的指南。在不需要完整数据库的情况下存储文件、图片、文档或简单键值数据时使用。涵盖 `getStore()`、CRUD 操作、元数据、列表查询、部署作用域与站点作用域存储,以及本地开发。

Licence
MIT
Last repository change
25.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

使用 Netlify Blobs 对象存储的指南。在不需要完整数据库的情况下存储文件、图片、文档或简单键值数据时使用。涵盖 `getStore()`、CRUD 操作、元数据、列表查询、部署作用域与站点作用域存储,以及本地开发。

Original author description

使用 Netlify Blobs 对象存储的指南。在不需要完整数据库的情况下存储文件、图片、文档或简单键值数据时使用。涵盖 `getStore()`、CRUD 操作、元数据、列表查询、部署作用域与站点作用域存储,以及本地开发。

How it works

  1. Getting a Store
  2. CRUD Operations
  3. Store Types
  4. Limits
  5. Local Development
Original SKILL.md headings · 96 lines, 364 words
SKILL.md preview
---
name: netlify-blobs
description: "使用 Netlify Blobs 对象存储的指南。在不需要完整数据库的情况下存储文件、图片、文档或简单键值数据时使用。涵盖 `getStore()`、CRUD 操作、元数据、列表查询、部署作用域与站点作用域存储,以及本地开发。"
---

# Netlify Blobs

Netlify Blobs is zero-config object storage available from any Netlify compute (functions, edge functions, framework server routes). No provisioning required.

```bash
npm install @netlify/blobs
```

## Getting a Store

```typescript
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" });
```

## CRUD Operations

These are the **only** store methods. Do not invent others.

### Create / Update

```typescript
// 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 });
```

### Read

```typescript
// 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
```

### Delete

```typescript
await store.delete("key");
```

### List

```typescript
const { blobs } = await store.list();
// blobs: [{ etag: string, key: string }, ...]

// Filter by prefix
const { blobs } = await store.list({ prefix: "uploads/" });
```

## Store Types

- **Site-scoped** (`getStore()`): Persist across all deploys. Use for most cases.
- **Deploy-scoped** (`getDeployStore()`): Tied to a specific deploy lifecycle.

## Limits

| Limit | Value |
|---|---|
| Max object size | 5 GB |
| Store name max length | 64 bytes |
| Key max length | 600 bytes |

## Local Development

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`.
Files in this package (5)
  • LICENSE.txt 11 KB
  • SKILL.md 3 KB
  • agents/openai.yaml 1 KB
  • assets/netlify-small.svg 1 KB
  • assets/netlify.png 3 KB

Versions

RepositoryScoreLicence
This page · kael-odin/codex-plugins-zh95MIT
PracticalSwan/agent-skills100MIT
netlify/context-and-tools100MIT

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version c474c739aefb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95netlify-development
    Best practices for building and deploying Netlify sites, covering serverless and edge functions, Netlify Blobs storage, the Image CDN, and build configuration. Use when writing Netlify Functions or Edge Functions, configuring netlify.toml or redirects/headers, managing…
  • 95netlify-db
    Guide for using Netlify DB (managed Neon Postgres). Use when the project needs a relational database, structured data storage, SQL queries, or data that will grow over time. Covers provisioning, raw SQL via @netlify/neon, Drizzle ORM integration, migrations, and deploy preview…
  • 95netlify-image-cdn
    Guide for using Netlify Image CDN for image optimization and transformation. Use when serving optimized images, creating responsive image markup, setting up user-uploaded image pipelines, or configuring image transformations. Covers the /.netlify/images endpoint, query…
  • 100netlify-deploy
    Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.
  • 100netlify-deploy
    Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.
  • 86devops/deploy-netlify
    Netlify 部署方法论,使用 netlify CLI 部署前端应用、静态站点和 Serverless Functions

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.