Agent skill
mongodb
Administer MongoDB databases. Configure replica sets, sharding, and backups. Use when managing MongoDB deployments.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/mongodb-bagelhole-devops-security-agen
Metadata
Additional technical details for this skill
- author
- devops-skills
- version
- 1.0
SKILL.md
MongoDB
Administer MongoDB NoSQL databases.
Installation & Setup
# Install
apt install mongodb-org
# Start service
systemctl start mongod
# Connect
mongosh
# Create user
use admin
db.createUser({
user: "admin",
pwd: "secret",
roles: ["root"]
})
Basic Operations
// Create database and collection
use mydb
db.users.insertOne({ name: "John", email: "[email protected]" })
// Query
db.users.find({ name: "John" })
db.users.find().sort({ name: 1 }).limit(10)
// Index
db.users.createIndex({ email: 1 }, { unique: true })
Replica Set
// Initialize replica set
rs.initiate({
_id: "myReplicaSet",
members: [
{ _id: 0, host: "mongo1:27017" },
{ _id: 1, host: "mongo2:27017" },
{ _id: 2, host: "mongo3:27017" }
]
})
Backup
# Backup
mongodump --out /backup/
# Restore
mongorestore /backup/
Best Practices
- Use replica sets in production
- Implement proper indexing
- Enable authentication
- Regular backups with mongodump
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?