mongodb-mongoose

mongodb-mongoose is a skill for Codex from PracticalSwan/agent-skills. It costs 43 tokens per session (2,892 once invoked), scanned A, original, MIT.

A guide to using MongoDB with Mongoose, a Node.js library that provides schemas and models for MongoDB documents. It also covers connections, migrations, and aggregation pipelines.

In plain words
What is it for?
Use it to design collections, create Mongoose models, add validation and middleware, write data-access code, manage migrations, and connect to Atlas.
Why use it?
It helps structure MongoDB data access in Node.js or Next.js applications and avoid common modelling and performance mistakes.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Good fit Use it to design collections, create Mongoose models, add validation and middleware, write data-access code, manage migrations, and connect to Atlas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/mongodb-mongoose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill mongodb-mongoose
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mongodb-mongoose

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/mongodb-mongoose/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/mongodb-mongoose)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/mongodb-mongoose"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/mongodb-mongoose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mongodb-mongoose

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/mongodb-mongoose"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/mongodb-mongoose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 367
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02892
Opus 5 $0.00022 $0.01446
Sonnet 5 $0.00009 $0.00578
Haiku 4.5 $0.00004 $0.00289

Measured yesterday against content hash f4c4d67cd365, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

mongodb-mongoose scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/seed-database.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

mongodb-mongoose/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mongodb Mongoose

Optimized for current MongoDB server releases, Mongoose 8.x+, Node.js 22+, and TypeScript 5.5+.

Comprehensive guidance for MongoDB database design, Mongoose ODM patterns, and Atlas integration for Node.js/Next.js applications.

  • Leverage native parallel subagent dispatch and 200k+ context windows where available.

When to Use This Skill

Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.

  • Designing MongoDB schemas and data models
  • Building Mongoose models with validation and middleware
  • Implementing the repository pattern for data access
  • Writing aggregation pipelines for complex queries
  • Managing MongoDB Atlas connections and configuration
  • Integrating MongoDB with Next.js API routes
  • Database migration strategies

Cross-Client Portability

This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.

  • GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
  • Claude Code: keep the folder in a local skills directory or a compatible plugin source.
  • Codex: install or sync the folder into $CODEX_HOME/skills/mongodb-mongoose and restart Codex after major changes.

MCP Availability And Fallback

Preferred MCP Server: MongoDB MCP

  • Fallback prompt: "Use the Mongodb Mongoose skill without MCP. Follow the documented local or manual fallback, show the selected tool surface, and report the verification evidence."
  • Use mongosh, MongoDB Atlas UI, local schema files, and Mongoose model inspection when the MCP server is unavailable.
  • Validate indexes, queries, and aggregation pipelines against a local or staging database before finalizing changes.
  • Do not claim an MCP operation was used when the active host does not expose it.

Anti-Patterns

  • Modeling documents like normalized tables by default: MongoDB performance depends on query-driven shape, not relational purity.
  • Returning full hydrated documents for every request: Over-fetching and hydration overhead accumulate quickly in API paths.
  • Adding middleware without write-path tests: Hooks can silently change create, update, and migration behavior.

Read the full file on GitHub · 399 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +1 lines f4c4d67cd365
  2. 2d ago Changed 4f3bce9f4b18
  3. 5d ago First seen · 398 lines · 43 tokens per session scan A cd039fd6d0fb

Subscribe to this mod's changes

mongodb-mongoose is a skill published in the GitHub repository PracticalSwan/agent-skills (13 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 2,892 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

api-design

Design and build professional APIs with REST, GraphQL, and gRPC. Master authentication, documentation, testing, and operational concerns.

pluginagentmarketplace/custom-plugin-backend · 29 tokens

testing

Backend testing strategies and test automation. Unit, integration, E2E, and load testing with best practices.

pluginagentmarketplace/custom-plugin-backend · 24 tokens

dynamic

Fullstack development with bkend.ai BaaS — authentication, database, API integration. Triggers: fullstack, BaaS, login, signup, database, web app.

ww-w-ai/bkit-claude-code · 38 tokens

emulate-seed

Generate emulate seed configs for stateful API emulation. Wraps Vercel's emulate tool for GitHub, Vercel, Google OAuth, Slack, Apple Auth, Microsoft Entra, AWS, Okta, Clerk, Resend, Stripe, and MongoDB Atlas APIs — full state machines, not mocks. Use when setting up test environments, CI pipelines, integration tests…

yonatangross/orchestkit · 86 tokens

plugin-test

A testing guide for Zhin.js plugins using Vitest, a JavaScript and TypeScript testing framework. It focuses on checking command and tool behavior, ordinary business logic, and the plugin package’s required structure.

zhinjs/zhin · 51 tokens

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens