Mongodb Index Creation
Helps with MongoDB, creation as part of working with databases and data persistence workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add mongodb-index-creation npx -- -y @trustedskills/mongodb-index-creation
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"mongodb-index-creation": {
"command": "npx",
"args": [
"-y",
"@trustedskills/mongodb-index-creation"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill allows AI agents to create indexes in MongoDB databases. It facilitates faster query performance by enabling efficient data retrieval based on specified fields. The agent can define index types (e.g., single, compound, geospatial) and configure options like uniqueness constraints.
When to use it
- Slow Queries: When queries against a MongoDB collection are taking an unacceptable amount of time.
- Frequent Sorting/Filtering: When data is frequently sorted or filtered based on specific fields.
- Geospatial Data: When working with geographic data and needing to perform location-based searches.
- Data Integrity: To enforce uniqueness constraints on certain fields within a collection.
Key capabilities
- Create single field indexes
- Create compound (multi-field) indexes
- Define index types (e.g., ascending, descending)
- Enforce unique index constraints
Example prompts
- "Create an index on the 'name' field in the 'users' collection."
- "Build a compound index on 'city' and 'state' fields in the 'customers' collection, sorted by 'zipcode'."
- "Add a geospatial index to the 'locations' collection using the 'coordinates' field."
Tips & gotchas
- Ensure you have appropriate database connection credentials configured for the AI agent.
- Incorrectly designed indexes can negatively impact write performance; carefully consider which fields to index based on query patterns.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.