Skip to content
Agentmart
Submit a tool

mongodb-netlify

Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments.

Skill by prachwal-archive

IndexedMIT★ 1
Write a review

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/prachwal-archive-mongodb-netlify

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.

We use your email only for this newsletter. Privacy

About

Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments. Covers connection reuse, pool settings, Stable API, query safety, and serverless operational patterns.

Use cases: backend, cloud

No 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/mongodb-netlify

What's inside

Skill name
mongodb-netlify
Description
Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments. Covers connection reuse, pool settings, Stable API, query safety, and serverless operational patterns.
License
MIT
Instructions
41 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • connection.md · references/
  • query-safety.md · references/

SKILL.md (first lines)

# MongoDB Netlify Skill

Use this skill when a Netlify app or API uses MongoDB, especially MongoDB Atlas with the Node.js driver inside Netlify Functions.

## Core goals

- Reuse `MongoClient` instances safely across warm invocations.
- Keep connection counts predictable in serverless workloads.
- Validate all input before it reaches MongoDB queries or updates.
- Keep reads and writes explicit, typed, and bounded.

## Recommended stack

- Use the official `mongodb` Node.js driver unless the project already standardizes on an ODM such as Mongoose.
- Prefer MongoDB Atlas for hosted deployments.
- Use the Stable API options when connecting to Atlas to reduce breakage when Atlas upgrades server versions.

## Netlify-specific guidance

- Create the `MongoClient` once at module scope and reuse it across warm invocations.
- Keep pool sizes intentionally small for public APIs that may scale horizontally.
- Store the URI in a Netlify runtime environment variable with Functions scope.
- Align Atlas region and Netlify function region when latency matters.
- Use `netlify-serverless` for execution-model choices and `netlify-database-security` for generic secret policy.

## Reference files

### [`references/connection.md`](references/connection.md)
**MongoClient setup and pool sizing** — Module-scope `MongoClient` with Stable API options (`strict: true`, `deprecationErrors: true`), `requireEnv()` fail-fast pattern, pool sizing table for serverless (low-traffic / moderate / burst / background), typed collection access with `WithId<T>`, `ObjectId` parse error handling, rules for idempotent `connect()` calls.

### [`references/query-safety.md`](references/query-safety.md)
**Injection prevention and safe queries** — MongoDB operator injection example (raw body as filter → bypass), field allowlisting for sort/filter with `Set` + type narrowing, safe `updateOne` via validated schema (never `$set: req.body`), projection to exclude sensitive fields, aggregation pipeline safety, `ObjectId.isValid()` guard, rules.

## External references

- [MongoDB Node.js driver: choose a connection target](https://www.mongodb.com/docs/drivers/node/current/connect/connection-targets/)
- [MongoDB Node.js driver: connection options](https://www.mongodb.com/docs/drivers/node/current/fundamentals/connection/connection-options/)
- [MongoDB Node.js driver: connection pools](https://www.mongodb.com/docs/drivers/node/v6.x/connect/connection-options/connection-pools/)
- [Netlify environment variables and functions](https://docs.netlify.com/functions/environment-variables/)

From prachwal-archive/web-ui-skills, MIT.

More from prachwal-archive/web-ui-skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Apr 9, 2026 (6 months ago)
Last release
Apr 23, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from prachwal-archive

Cite this page

mongodb-netlify skill. Agent Mart. https://agentmart.dev/skills/prachwal-archive-mongodb-netlify (last updated 2026-10-24)