Use when you need framework-agnostic MongoDB and non-relational database query guidance — document schema design, collection modeling, JSON Schema validation, indexes, aggregation pipelines, query performance, consistency trade-offs, transactions, and operational safety — without choosing Spring Boot, Quarkus, or Micronaut. This should trigger for requests such as Design MongoDB document schemas; Review MongoDB queries and indexes; Improve aggregation pipeline performance; Model non-relational d
SkillScore77Maintained
Automatic
◆Data Engineer pack
Last verified 8/20/2026
What it changes
Passed 17 of 22 test cases with the skill, and 15 of 22 without it.
Without skill68%
With skill77%
Checks it passed that the model alone missed
States that running ./mvnw compile or mvn compile is required before proposing or finalizing Maven Java changes.
Asks clarifying questions about missing context such as database version, shard topology, or latency requirements before generating pipeline changes.
2 fixed15 passed either way5 still failing0 broke
Pass-rate lift
+9 pp
Tokens
+24%
Agent turns
0%
Response time
-16%
Model gemini-3.6-flashMeasured 8/20/2026v117 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
We modified custom Java database helper methods in our repository to fix a query aggregation builder bug. What build action must be executed before submitting the Java changes for review?
What was checked, without and with the skill
Checked
Without skill
With skill
States that running ./mvnw compile or mvn compile is required before proposing or finalizing Maven Java changes.
Missed
Passed
case-22 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md57 lines2 files
Non-relational database query best practices
Help teams design maintainable, secure, and performant MongoDB and non-relational database queries for Java applications.
What is covered in this Skill?
Document modeling for aggregates, embedded documents, references, arrays, and bounded growth
MongoDB JSON Schema validation and compatibility-aware schema evolution
Consistency, transactions, idempotency, migration safety, testing, observability, and production diagnostics
Scope: Framework-agnostic MongoDB and non-relational data modeling. For Java framework integrations, defer to the matching Spring Boot, Quarkus, or Micronaut MongoDB skill.
Constraints
Keep recommendations at the database-modeling and query layer unless the user explicitly asks for Java framework integration. After editing this repository's XML sources, regenerate skills and verify the build.
MANDATORY: Run ./mvnw compile or mvn compile before proposing Java or Maven changes in the same change set
INJECTION: Never concatenate untrusted input into query documents, aggregation stages, JSON strings, JavaScript expressions, or $where; use driver/framework query builders and validated parameters
SCHEMA: Prefer explicit document contracts, bounded arrays, stable identifiers, and validation rules over unconstrained document growth
PERFORMANCE: Review explain() plans, scanned/returned ratios, sort coverage, and index selectivity before claiming a query is optimized
FRAMEWORK: Defer Spring MongoDB to @315-frameworks-spring-mongodb, Quarkus MongoDB to @415-frameworks-quarkus-mongodb, Micronaut MongoDB to @515-frameworks-micronaut-mongodb, and Mongock migrations to the matching framework migration skill
VERIFY: Run ./mvnw clean verify or mvn clean verify before promoting changes
EDGE CASE: If the target database, version, shard topology, read/write concern, data volume, or latency requirement is missing and affects the recommendation, ask a clarifying question before editing queries or schemas
EDGE CASE: If requested changes conflict with data safety, backwards compatibility, zero-downtime deployment, or retention requirements, explain the trade-off and ask for confirmation
When to use this skill
Design MongoDB document schemas
Review MongoDB queries and indexes
Improve aggregation pipeline performance
Model non-relational data access patterns
Review NoSQL consistency and transaction trade-offs
Use when reviewing, designing, or modifying Java enterprise systems that use AI, LLMs, AI agents, RAG, tool calling, workflow automation, or model-based decision support and need EU AI Act regulatory awareness. This should trigger for requests such as Review a Java AI system for EU AI Act controls; Design governance for an AI agent with enterprise tools; Add human oversight and auditability to LLM workflows; Assess RAG or model-driven decision support before production release. Part of Plinth To