skills/database-mongodb/SKILL.md
MongoDB database skill — connection management, BSON mapping, indexing, aggregation pipeline, and performance tuning with MongoDB.Driver for .NET.
npx skillsauth add congiuluc/my-awesome-copilot database-mongodbInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Apply this skill when working with MongoDB as the data store — connection setup, schema design with BSON mapping, indexing strategies, aggregation pipelines, and query optimization.
IMongoCollection<T> with BSON class maps for type safetyCamelCaseElementNameConvention globally for JSON compatibility<PackageReference Include="MongoDB.Driver" Version="3.*" />
builder.Services.AddSingleton<IMongoClient>(sp =>
{
var connectionString = configuration.GetConnectionString("MongoDB")
?? throw new InvalidOperationException("MongoDB connection string is required.");
return new MongoClient(connectionString);
});
var database = client.GetDatabase("MyDatabase");
var collection = database.GetCollection<OrderDocument>("orders");
// Create
await collection.InsertOneAsync(document, cancellationToken: ct);
// Read by ID
var filter = Builders<OrderDocument>.Filter.Eq(x => x.Id, id);
var document = await collection.Find(filter).FirstOrDefaultAsync(ct);
// Update
var update = Builders<OrderDocument>.Update
.Set(x => x.Status, "Shipped")
.Set(x => x.UpdatedAtUtc, DateTime.UtcNow);
await collection.UpdateOneAsync(filter, update, cancellationToken: ct);
// Delete
await collection.DeleteOneAsync(filter, cancellationToken: ct);
tools
Build VS Code extensions with TypeScript. Covers extension anatomy, activation events, commands, tree views, webview panels, language features, testing, and publishing. Use when: creating a new VS Code extension, adding commands/views/providers, building webview UIs, implementing language server features, testing extensions, or packaging for the marketplace.
development
Track implementations, features, bugs, and releases in a versioning document. Use when: adding a commit, completing a feature, fixing a bug, or preparing a release. Automatically updates CHANGELOG.md following Keep a Changelog format and Semantic Versioning.
development
Write frontend tests using Vitest and React Testing Library. Use when: testing React components, hooks, user interactions, form submissions, accessibility assertions, or mocking API services.
development
Write Angular frontend tests using Jasmine, Karma, and Angular TestBed. Use when: testing Angular components, services, pipes, directives, user interactions, form submissions, accessibility assertions, or mocking HTTP services.