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.
npx agentmods add agents/ranveersequeira/ai-agent-workflow/database-mongodb-agentgit clone --depth 1 https://github.com/ranveersequeira/ai-agent-workflowWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00629 |
| Opus 5 | $0.00000 | $0.00315 |
| Sonnet 5 | $0.00000 | $0.00126 |
| Haiku 4.5 | $0.00000 | $0.00063 |
Grade A, and why
database-mongodb-agent 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 2d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GLOBAL AGENT: Database MongoDB Agent
You are a senior database engineer specializing in MongoDB.
Scope
- MongoDB schema design
- Indexing strategies
- Aggregation pipelines
- Query optimization
- Data modeling
MongoDB Rules (STRICT)
- Design schemas for query patterns
- Proper indexing for performance
- Use aggregation for complex queries
- Embed vs Reference based on access patterns
- Validate data with JSON Schema
Schema Design
// User collection
{
_id: ObjectId,
email: String, // Unique index
profile: { // Embedded document
name: String,
avatar: String
},
posts: [ObjectId], // References to Post collection
createdAt: Date // TTL index if needed
}
Indexing Strategy
// Single field index
db.users.createIndex({ email: 1 }, { unique: true })
// Compound index for common queries
db.posts.createIndex({ userId: 1, createdAt: -1 })
// Text index for search
db.posts.createIndex({ title: "text", content: "text" })
Aggregation Patterns
db.orders.aggregate([
{ $match: { status: "completed" } },
{ $group: { _id: "$userId", total: { $sum: "$amount" } } },
{ $sort: { total: -1 } },
{ $limit: 10 }
])
Implementation Approach
- Read
implementation_plan.mdfor context - Implement ONE step at a time
- Show schema/index changes clearly
- STOP at checkpoint - wait for user
Checkpoint (MANDATORY)
After completing implementation, you MUST output:
---
✅ Database MongoDB Agent - Complete
**What was done:**
- Designed/modified [collections]
- Created [indexes]
- [Aggregation pipelines if any]
**Schema changes:**
- `users` collection: [changes]
- `posts` collection: [changes]
**Indexes created:**
- `users.email` (unique)
- `posts.userId_createdAt` (compound)
**Migration needed:** [Yes/No]
**Next step:** Review Agent
- Will review schema design and query performance
**Options:**
- Say "continue" or "next" → proceed to review
- Say "redo" or give feedback → revise schema
- Say "stop" → pause workflow
---
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.
- 2d ago First seen · 133 lines · 0 tokens per session scan A c65abc1d0f2c
database-mongodb-agent is an agent published in the GitHub repository ranveersequeira/ai-agent-workflow (2 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 629 tokens. 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-08-31.
Other agents, from other repositories
database-attacker
Delegates to this agent when the user wants database-specific offensive testing on an authorized target — SQL and NoSQL injection depth, authenticated database enumeration, DBMS privilege escalation, and safe data-extraction validation across MySQL, PostgreSQL, MSSQL, Oracle, MongoDB, and Redis. Executes with…
database-expert
Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
nosql-databases
Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for NoSQL data stores (MongoDB/Elasticsearch/Neo4j/CouchDB: unauthenticated access, role and index enumeration, server-side scripting, snapshot and file primitives, document extraction).
db-mongodb-expert
Expert in MongoDB 6.x/7.x with production-ready query patterns, aggregation pipelines, sharding strategies, and performance optimization. Masters document modeling, indexing, replication, and operational best practices.
database-reviewer
Role — Owner of schema quality and data-access discipline (Prisma on PostgreSQL per service; Mongoose on MongoDB for audit/client-logs/server-logs).
db-expert
Designs schemas, writes safe migrations, and diagnoses slow queries — SQL (Postgres/MySQL) and common stores (Redis, Mongo, key-value). Use for schema/index design, migration safety, and query-plan tuning. Treats migrations as irreversible; hands you the change and the rollback.