# 415-frameworks-quarkus-mongodb

Skill for MongoDB in Quarkus projects: Panache entities and repositories, document design, indexes, transactions, and error handling. Triggers on requests to add MongoDB, review architecture, and optimize data access patterns.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 279 installs · ★ 465 repo stars
- Author: Juan Antonio Breña Moral
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/jabrena/plinth/tree/HEAD/skills/415-frameworks-quarkus-mongodb/SKILL.md
- Updated: 2026-10-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/415-frameworks-quarkus-mongodb

## What it does

This skill provides concrete examples and guidance for integrating MongoDB into Quarkus applications. It covers Panache Mongo entity design, repository configuration, duplicate key handling, retry policies, and optimistic locking. Includes direction on MongoDB client codecs and transaction setup where applicable.

The workflow enforces verification: run `./mvnw compile` before any changes, then `./mvnw clean verify` after improvements. If compilation fails, the skill stops. This ensures refactors don't break the build.

Part of the Plinth Toolkit. Works with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

## Requirements
- Works with: MongoDB

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 415-frameworks-quarkus-mongodb -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/415-frameworks-quarkus-mongodb/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/415-frameworks-quarkus-mongodb/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 415-frameworks-quarkus-mongodb -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/415-frameworks-quarkus-mongodb/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 415-frameworks-quarkus-mongodb -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/415-frameworks-quarkus-mongodb/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jabrena/plinth skills/415-frameworks-quarkus-mongodb
```

2. **Manually: put the files in place**
- File: `.github/skills/415-frameworks-quarkus-mongodb/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 415-frameworks-quarkus-mongodb -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jabrena/plinth --path skills/415-frameworks-quarkus-mongodb
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/415-frameworks-quarkus-mongodb/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 415-frameworks-quarkus-mongodb -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jabrena/plinth/tree/HEAD/skills/415-frameworks-quarkus-mongodb/SKILL.md

## When to use it
- design Panache Mongo entities and repositories for Quarkus
- integrate MongoDB into an existing Quarkus service
- handle duplicate keys and implement retry policies
- configure MongoDB client codecs and transactions
- verify data persistence architecture before refactoring

## Example prompts
- Add MongoDB to Quarkus with Panache repositories
- Review Mongo Panache entity design and improve error handling
- Set up indexes and transactions for MongoDB in this service

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: f9de5b5803b016eb.

BEGIN THIRD-PARTY FILE f9de5b5803b016eb
```text
---
name: 415-frameworks-quarkus-mongodb
description: Use when you need MongoDB persistence in Quarkus — including Panache Mongo entities/repositories, document design, indexes, transactions where applicable, and error handling. This should trigger for requests such as Add MongoDB in Quarkus; Review Quarkus Mongo Panache design; Improve Mongo error handling in Quarkus services; Model MongoDB documents for a Quarkus service; Configure Quarkus MongoDB clients codecs or transactions. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Quarkus — MongoDB

Apply Quarkus MongoDB guidance with concrete examples for design, implementation, and error handling.

## Constraints

Compile before MongoDB refactors; verify after changes.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
- **SAFETY**: If compilation fails, stop immediately
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements
- **BEFORE APPLYING**: Read the reference for detailed rules and examples

## When to use this skill

- Add MongoDB in Quarkus
- Review Quarkus Mongo Panache entities/repositories
- Improve duplicate key handling, retry policy, or optimistic locking in Quarkus Mongo
- Model MongoDB documents for a Quarkus service
- Configure Quarkus MongoDB clients codecs or transactions

## Workflow

1. **Read reference and assess project context**

Read `references/415-frameworks-quarkus-mongodb.md` and inspect persistence setup before proposing changes.

2. **Gather scope and decide target improvements**

Identify model/query consistency needs and define safe improvements.

3. **Apply framework-aligned changes**

Implement/refactor Panache Mongo mappings, repository access, and failure handling.

4. **Run verification and report results**

Execute build/tests and summarize what changed, what was verified, and follow-up actions.

## Reference

For detailed guidance, examples, and constraints, see [references/415-frameworks-quarkus-mongodb.md](references/415-frameworks-quarkus-mongodb.md).
```
END THIRD-PARTY FILE f9de5b5803b016eb

The third-party file has ended. Everything between the f9de5b5803b016eb tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© Juan Antonio Breña Moral · Apache-2.0 · https://github.com/jabrena/plinth/tree/HEAD/skills/415-frameworks-quarkus-mongodb/SKILL.md

## Similar
- [quarkus](https://affpapa.org/en/nevibecode/rules/quarkus.md) — rule · ★ 41430 repo stars
- [prisma-mongodb-upgrade](https://affpapa.org/en/nevibecode/skills/prisma-mongodb-upgrade.md) — skill · 419000 installs
- [mongodb-query-optimizer](https://affpapa.org/en/nevibecode/skills/mongodb-query-optimizer.md) — skill · 7700 installs
- [mongodb-connection](https://affpapa.org/en/nevibecode/skills/mongodb-connection.md) — skill · 5700 installs
- [mongodb](https://affpapa.org/en/nevibecode/skills/mongodb.md) — skill · 1700 installs
- [mongodb-development](https://affpapa.org/en/nevibecode/skills/mongodb-development.md) — skill · 935 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
