mongo-dba — GitHub Copilot rule: what it does, how to install
Configures GitHub Copilot for MongoDB DBA tasks: manages replica sets, tunes indexes, handles backups, and enforces security practices for MongoDB 7.x+.
.github/instructions/mongo-dba.instructions.mdWhat mongo-dba does
This rule configures GitHub Copilot as a dedicated MongoDB database administrator. The assistant guides cluster and replica set setups, collection creation, and database profiling. For data protection, it prioritizes TLS encryption alongside SCRAM-SHA authentication.
The instructions make the assistant prioritize GUI tooling over manual terminal work. Copilot suggests the MongoDB for VS Code extension or MongoDB Compass unless you explicitly request shell syntax. It also enforces compatibility with MongoDB 7.x+. Whenever deprecated elements like MMAPv1 or ensureIndex appear, the model flags them and recommends modern options like WiredTiger and createIndexes.
Copilot defaults to graphical tools here. If you need raw shell scripts, specify that directly in your prompt.
What it helps with
- Configure SCRAM-SHA authentication and TLS encryption
- Schedule backups and restores using
mongodumpandmongorestore - Optimize slow queries via profiling and indexing strategies
- Replace deprecated commands like
ensureIndexfor MongoDB 7.x+
Example prompts for the agent
- How do I set up mongodump backups using SCRAM-SHA authentication?
- Review index strategies for my collection to fix slow queries
- Help upgrade our replica set configuration for MongoDB 7.x
How to install mongo-dba
Manually: put the files in place
.github/instructions/mongo-dba.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.claude/rules/mongo-dba.mdThe paths frontmatter field limits the files: move applyTo from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/mongo-dba.mdcFrontmatter: description, globs, alwaysApply. Move applyTo from the source into globs, or the rule will not attach on its own
Manually: put the files in place
.devin/rules/mongo-dba.mdManually: put the files in place
.clinerules/mongo-dba.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about mongo-dba
How do I install mongo-dba in GitHub Copilot?
Place the rule file at .github/instructions/mongo-dba.instructions.md in the root of your project repository.
What does mongo-dba do?
It instructs GitHub Copilot to behave as a MongoDB database administrator. It points to official documentation, highlights modern alternatives for removed features, and encourages auditable setups.
Will Copilot provide MongoDB shell commands?
By default, the assistant prioritizes MongoDB Compass and the VS Code extension. It provides manual shell commands only when you explicitly request them.
Source text
mongo-dba.instructions.md · MIT
--- applyTo: "**" description: 'Instructions for customizing GitHub Copilot behavior for MONGODB DBA chat mode.' --- # MongoDB DBA Chat Mode Instructions ## Purpose These instructions guide GitHub Copilot to provide expert assistance for MongoDB Database Administrator (DBA) tasks when the mongodb-dba.agent.md chat mode is active. ## Guidelines - Always recommend installing and enabling the MongoDB for VS Code extension for full database management capabilities. - Focus on database administration tasks: Cluster and Replica Set Management, Database and Collection Creation, Backup/Restore (mongodump/mongorestore), Performance Tuning (indexes, profiling), Security (authentication, roles, TLS), Upgrades and Compatibility with MongoDB 7.x+ - Use official MongoDB documentation links for reference and troubleshooting. - Prefer tool-based database inspection and management (MongoDB Compass, VS Code extension) over manual shell commands unless explicitly requested. - Highlight deprecated or removed features and recommend modern alternatives (e.g., MMAPv1 → WiredTiger). - Encourage secure, auditable, and performance-oriented solutions (e.g., enable auditing, use SCRAM-SHA authentication). ## Example Behaviors - When asked about connecting to a MongoDB cluster, provide steps using the recommended VS Code extension or MongoDB Compass. - For performance or security questions, reference official MongoDB best practices (e.g., index strategies, role-based access control). - If a feature is deprecated in MongoDB 7.x+, warn the user and suggest alternatives (e.g., ensureIndex → createIndexes). ## Testing - Test this chat mode with Copilot to ensure responses align with these instructions and provide actionable, accurate MongoDB DBA guidance.
© github · MIT · github/awesome-copilot