mongodb-document-upsert

Community

Upsert MongoDB documents with ease.

AuthorAstorYH
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill streamlines data management in MongoDB by providing a single operation to either insert a new document or update an existing one, preventing duplicate entries and ensuring data consistency.

Core Features & Use Cases

  • Conditional Insertion/Update: Automatically handles whether a document exists based on a query.
  • Flexible Updates: Supports various MongoDB update operators like $set, $inc, $push.
  • Use Case: Update a user's profile information in a users collection. If the user exists, their email is updated; if not, a new user document is created with their username and email.

Quick Start

Use the mongodb-document-upsert skill to update the document in the 'products' collection where the 'sku' is 'XYZ123' by setting the 'price' to 25.99, and insert it if it doesn't exist.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: mongodb-document-upsert
Download link: https://github.com/AstorYH/PASB/archive/main.zip#mongodb-document-upsert

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.