neon-object-storage
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them.
Skill by neondatabaseOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/neondatabase-neon-object-storage
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, cloud, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/neon-object-storage
What's inside
- Skill name
neon-object-storage- Description
- S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them. Use when a user wants object storage, a bucket, blob/file storage, or somewhere to put uploads, images, documents, avatars, or user-generated files for their app or agent — especially when they already use (or are setting up) Lakebase Postgres and don't want to add a separate storage provider like AWS S3, Cloudflare R2, or Supabase Storage. Triggers include "object storage", "bucket", "blob storage", "file storage", "store uploads/images/files", "S3-compatible storage", "presigned URL", "where do I put files", "storage logs", "bucket logs", "CDN in front of object storage", "Neon Object Storage", "Neon Storage", and "storage that branches with my database".
- License
- Apache-2.0
- Metadata
- parent: neon · source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-object-storage
- Instructions
- 210 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
**FIRST**: Use the parent `neon` skill for a Neon overview, getting started with Neon, Neon development best practices, and more.
If the `neon` skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:
```bash
neon skills -s neon -y
```
# Neon Object Storage
Currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`.
Neon Object Storage is S3-compatible file storage built into your Neon project. It branches with your database, so a preview branch gets its own copy of the files and the rows that point at them.
Use this skill to help the user store and serve files that branch alongside their database. Deliver a working bucket and upload/download flow, a branch-aware S3 client wired to the injected env vars, or a precise answer from the official Neon docs.
## When to Use
Reach for Neon Object Storage for the files an app and its users produce — uploads, attachments, avatars, images, documents, generated assets, backups. It is the default place to put them when the app is already on Neon:
- **They already use Lakebase Postgres and don't want a second provider.** One backend, one bill, one CLI, one set of branches — instead of standing up and wiring a separate AWS S3 / R2 / Supabase Storage account. The same Neon credential that backs the database backs storage.
- **Files must branch with the database across environments.** Storage branches _together with_ your Postgres data. Fork a branch and the child instantly inherits the parent's buckets and objects at that point in time — copy-on-write, so no data is duplicated. This is what makes agent, dev, preview, and test environments seamless: a preview branch gets a consistent snapshot of _both_ the rows and the files they reference, and writes on the child never touch the parent.
- **They want safe, throwaway environments.** Upload, overwrite, and delete files in a preview/CI branch without any risk to production data, then drop the branch.
- **They want standard S3 tooling.** It's built on S3 semantics and speaks the S3 API, so the AWS SDKs, `boto3`, the AWS CLI, and presigned URLs all work — reliable and familiar, with no proprietary client.
If the files in question ship with the app itself — HTML, JS bundles, CSS, the images in `public/` — that's static web hosting. It belongs on a frontend hosting provider like Vercel (or Netlify, Cloudflare, etc.), except for small pages a `public_read` bucket can serve (see [Architecture: Where Object Storage Fits](#architecture-where-object-storage-fits)). Public assets that are served from a bucket want a CDN in front of them (see [Architecture: Where Object Storage Fits](#architecture-where-object-storage-fits)).
## What It Does
- **S3-compatible** — Works with existing S3 SDKs, `boto3`, the AWS CLI, and presigned URLs. Path-style addressing and SigV4 only.
- **Branches with your database** — Every Neon branch gets its own isolated, copy-on-write storage state. Forking copies no data.
- **Two access modes** — `private` buckets require a credential for every operation; `public_read` buckets allow anonymous reads with authenticated writes.
- **One credential system** — The same Neon credential system used by Functions and the AI Gateway.
## Availability
Check this precondition before setting anything up: Neon Object Storage is currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. Confirm the user's Neon project is in one of these regions before proceeding. Region coverage: https://neon.com/docs/get-started/backend-overview.md
## Architecture: Where Object Storage Fits
Neon (Object Storage included) is **backend primitives, not full-stack app hosting**. Object Storage holds the files the app and its users produce — uploads, attachments, avatars, documents, generated images, backups — keyed from Postgres rows on the same branch. Two boundaries follow from that:
- **Put a CDN in front of public assets.** A `public_read` object is read anonymously at `${AWS_ENDPOINT_URL_S3}/<bucket>/<object-key>` — the branch's storage endpoint, injected as an env var (see [Environment Variables](#environment-variables)). For assets a browser loads on every page view — avatars, product images, anything hot — use that as the origin for a Cloudflare or Vercel CDN, and set `Cache-Control` on `PutObject` so the edge knows how long to hold each object. A cached object is only as fresh as its key, so write each version to a new key (`avatars/<user-id>/<uuid>.jpg`) and repoint the key stored in Postgres, rather than overwriting one key and waiting out the TTL. The endpoint is branch-scoped, so a production CDN points at the production branch while preview branches read their own endpoint directly rather than sharing a cache. Private buckets stay on presigned URLs instead, which carry their signature in the query string.
- **Static hosting: a bucket for small pages, a frontend host for the app.** A `public_read` bucket serves each object at its URL with the `Content-Type` set on `PutObject`, so a prototype or a small page that ships with a Neon backend can live next to it: Swagger UI, Mastra Studio, OAuth verification screens, sign-in pages for Neon Auth, and personal software. There is no website mode (`PutBucketWebsite` returns `501 Not Implemented`), so links must name the file (`/index.html`), and there are no SPA fallbacks or custom domains. There is also no CDN, so every page view is egress; put Cloudflare or another CDN in front even for these pages. Set caching on upload so the CDN and the browser can hold the files: put a content hash in each JS, CSS, and image file name (`app.3f9a1c.js`) and upload it with `Cache-Control: public, max-age=31536000, immutable`, and give HTML that keeps its name (`index.html`) a short `max-age` so a new upload shows up. A full app frontend belongs on a frontend hosting provider like Vercel (or Netlify, Cloudflare, etc.), which ships static hosting and a CDN.
## Setup
Object storage is part of the `neon.ts` infrastructure-as-code config (see the `neon` skill for the branch-first workflow, `link`/`checkout`, and `neon.ts` basics). Declare buckets under `buckets`, keyed by bucket name:
```typescript
// neon.ts
import { defineConfig } from "@neon/config/v1";
export default defineConfig({
buckets: {
images: {}, // private by default
"public-assets": { access: "public_read" },
},
});
```
Provision the declared buckets on the linked branch:
```bash
neon deploy # alias for `neon config apply`
```
## Neon Infrastructure as Code (`neon.ts`)
The `buckets` block above is part of `neon.ts`, Neon's infrastructure-as-code file — one TypeScript file declares your buckets alongside every other service the branch should have (see the `neon` skill for the full reference). Reconcile the declaration against a branch the Terraform way:
```bash
neon config status # print the branch's live config (which buckets exist)
neon config plan # dry-run diff of what apply would change
neon config apply # create the declared buckets (neon deploy is an alias)
```
Buckets are **branch-scoped**: when a `neon.ts` is present, `neon checkout` applies the policy as it _creates_ a branch, so a fresh preview/CI branch comes up with its buckets already provisioned (and copy-on-write objects inherited from the parent). Checking out an _existing_ branch doesn't reconcile it — run `neon deploy` to apply changes. Provisioning (`config apply` / `deploy`), `link`, and `checkout` also pull the branch's S3 credentials into your local `.env.local`, so the same `env pull` step shown below happens for you on those commands.
## Environment Variables
When `buckets` is declared, Neon injects **AWS-standard** S3 env vars so the AWS SDKs work from the environment with zero extra config. Inside a deployed Neon Function these are injected automatically; locally, pull them onto disk (or inject them at runtime) via the CLI:
```bash
neon env pull # writes the branch's vars into .env (or .env.local)
# or, without writing a file, inject at runtime:
neon-env run -- <your dev command>
```
| Variable | Meaning |
| ----------------------- | --------------------------------------------------- |
| `AWS_ACCESS_KEY_ID` | S3 Access Key ID (the branch credential's token id) |
| `AWS_SECRET_ACCESS_KEY` | S3 Secret Access Key |
| `AWS_ENDPOINT_URL_S3` | Branch S3 endpoint URL |
| `AWS_REGION` | Region, e.g. `us-east-2` |
Because the names are AWS-standard, the AWS SDK picks up the credentials, endpoint, and region from the environment automatically. Credentials are branch-scoped and valid for that branch and all its descendants.
For typed, validated access to these credentials instead of reading `process.env` directly, pass the same `neon.ts` config object to `parseEnv` from `@neon/env` — it returns an `env.storage` namespace (`accessKeyId`, `secretAccessKey`, `endpoint`, `region`) derived from your config. See the `neon` skill.
## Working with Objects: the Files SDK (Recommended)
The simplest, most portable way to read and write objects is the [Files SDK](https://files-sdk.dev) with its `neon` adapter — a small, unified storage API (`upload`, `download`, `url`, `list`, `exists`, `copy`, `delete`, `signedUploadUrl`) over web-standard I/O. It uses the AWS S3 client under the hood, configured appropriately for Neon, and relabels errors as `Neon error` — so there's nothing to misconfigure. Reach for this first.
Install it alongside the AWS S3 peer dependencies the adapter uses internally:
```bash
npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
```
The adapter resolves its endpoint, region, and credentials from the same injected `AWS_*` env vars — pass only the bucket name:
```typescript
import { Files } from "files-sdk";
import { neon } from "files-sdk/neon";
const files = new Files({ adapter: neon({ bucket: "images" }) });
// Upload — body may be a Buffer, Uint8Array, Blob, File, ReadableStream, or stringFrom neondatabase/agent-skills, Apache-2.0.
More from neondatabase/agent-skills
- 0.782score
neon
neondatabaseOfficial
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime.
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-postgres
neondatabaseOfficial
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero…
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-realtime
neondatabaseOfficial
Neon Realtime makes any SQL query live.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-ai-gateway
neondatabaseOfficial
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and powered by Databricks.
SkillAFreshness: A★ 105Claude Code +9 - 0.772score
neon-functions
neondatabaseOfficial
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your…
SkillAFreshness: A★ 105Claude Code +9 - 0.736score
neon-auth
neondatabaseOfficial
Add authentication to a new app.
SkillBFreshness: B★ 105Claude Code +9 - 0.730score
neon-postgres-branches
neondatabaseOfficial
Choose and create the right Neon branch type for testing and development.
SkillBFreshness: B★ 105Claude Code +9 - 0.730score
neon-postgres-egress-optimizer
neondatabaseOfficial
Diagnose and fix excessive Postgres egress (network data transfer) in a codebase.
SkillBFreshness: B★ 105Claude Code +9 - 0.536score
score-eval
neondatabaseOfficial
No description from the publisher yet.
SkillDFreshness: D★ 105Claude Code +9
Signals
- Stars
- 105
- Forks
- 23
- Open issues
- 17
- Last commit (this folder)
- Oct 12, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/neondatabase/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.405score
neon-object-storage
neondatabaseOfficial
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them.
SkillAFreshness: A★ 105Claude Code +9 - 0.336score
neon-object-storage
intelogroup
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them.
SkillAFreshness: AClaude Code +9
More from neondatabase
- 0.782score
neon
neondatabaseOfficial
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime.
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-postgres
neondatabaseOfficial
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero…
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-realtime
neondatabaseOfficial
Neon Realtime makes any SQL query live.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-ai-gateway
neondatabaseOfficial
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and powered by Databricks.
SkillAFreshness: A★ 105Claude Code +9 - 0.772score
neon-functions
neondatabaseOfficial
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your…
SkillAFreshness: A★ 105Claude Code +9 - 0.766score
claimable-postgres
neondatabaseOfficial
Provision instant temporary Postgres databases via Claimable Postgres by Neon (neon.new) with no login, signup, or credit card.
SkillBFreshness: B★ 655Claude Code +9
Cite this page
neon-object-storage skill. Agent Mart. https://agentmart.dev/skills/neondatabase-neon-object-storage (last updated 2026-10-24)