Back to Rules
Java

Quarkus Java Best Practices: Essential Cursor Rules Checklist for Developers

Claude Directory November 29, 2025
1 copies 3 downloads

Unlock efficient Quarkus development with this rewritten checklist of cursor rules: master clean code, native builds, security, testing, and performance optimization for Java apps.

Rule Content
- **Adopt Clean Code Standards**: Craft readable, performant Java code with full documentation, adhering to Quarkus guidelines, Jakarta EE, and MicroProfile for organized packages.
- **Organize Project Layout**: Arrange code logically into resources, services, repositories, entities, and config folders for maintainable structure.
- **Apply Naming Standards**: Use PascalCase for classes (e.g., UserService), camelCase for methods/variables (e.g., validateOrder), and UPPER_CASE for constants (e.g., MAX_TIMEOUT).
- **Harness Quarkus Features**: Activate Dev Mode for rapid iteration, employ annotations like @ApplicationScoped, @Inject, and @ConfigProperty, and integrate extensions for build-time enhancements.
- **Enable Native Compilation**: Set up GraalVM via quarkus-maven-plugin properties for low-memory, fast-startup executables.
- **Leverage Modern Java**: Incorporate Java 17+ elements such as records and sealed classes where beneficial.
- **Manage Dependencies**: Rely on Quarkus BOM to align versions seamlessly.
- **Incorporate MicroProfile Tools**: Add Config, Health, and Metrics for robust enterprise features.
- **Implement Reactive Flows**: Deploy Vert.x for event-driven or streaming scenarios.
- **Handle Configurations**: Define settings in application.properties/yaml, inject via @ConfigProperty, and use profiles (dev/test/prod).
- **Optimize Dependency Injection**: Favor CDI with @Inject, constructor/method injection, @Singleton for testable, modular designs.
- **Build Comprehensive Tests**: Employ JUnit 5, @QuarkusTest for integrations, RestAssured for APIs, and Testcontainers/in-memory DBs.
- **Boost Performance**: Tune quarkus.native.* for images, apply @CacheResult/@CacheInvalidate, use Mutiny/Vert.x for async I/O, and index DB queries.
- **Secure Applications**: Integrate Quarkus Security (OIDC/JWT), configure CORS, and add security headers via extensions.
- **Set Up Logging/Monitoring**: Configure Quarkus logging (JSON/SLF4J), MicroProfile Health/Metrics/OpenTracing, with structured logs at appropriate levels.
- **Document APIs**: Enable quarkus-smallrye-openapi with annotations for comprehensive OpenAPI specs.
- **Streamline Data Access**: Use Hibernate ORM + Panache for entities/repositories, manage relationships (OneToMany etc.), and add Flyway/Liquibase migrations.
- **Streamline Builds/Deployments**: Use Maven/Gradle plugins, multi-stage Dockerfiles, profiles/env vars, targeting GraalVM for containers.
- **Design RESTful APIs**: Follow HTTP methods/status codes strictly.
- **Embrace Microservices**: Exploit Quarkus for quick boots and low resource use.
- **Apply SOLID Principles**: Ensure tight cohesion, loose coupling in reactive/async processing with Vert.x/Mutiny.

Comments

More Rules

View all
AI/ML

GLM-4.7 Optimized Config & System Prompt Designer

Expert system prompt for designing high-performance configurations tailored to GLM-4.7's strengths in coding, reasoning, tool use, and multilingual tasks, backed by benchmarks like SWE-bench and τ²-Bench.

C
Community
AI/ML

GLM-4.7 Open-Source Coding Expert: Optimized System Prompt

Leverage GLM-4.7's top benchmarks in SWE-bench, LiveCodeBench, and more with this system prompt designed for generating clean, secure, open-source-ready code, stunning UIs, and agentic workflows.

C
Community
AI/ML

GLM-4.7 Optimized Coding Agent

This system prompt transforms an AI into GLM-4.7, a benchmark-leading coding agent excelling in agentic workflows, tool use, multilingual coding, and complex reasoning with verified best practices for production-ready open-source development.

C
Community
DevOps

Agentic Dev Loop: Autonomous Jira-Driven Coding Agent with GitHub CI Self-Healing

Ralph, a persistent autonomous AI agent, implements Jira tickets through an endless loop until 100% test success, with GitHub PRs, Jules AI reviews, and CI self-healing for reliable development workflows.

C
Claude Directory
AI/ML

Türk Hukuku Uzmanı AI Agent: Güvenilir Yasal Danışman System Prompt

Claude'u Türk hukuku alanında dünyanın en önde gelen uzmanı olarak yapılandıran, yapılandırılmış yanıtlar, zorunlu uyarılar ve etik sınırlarla donatılmış profesyonel AI agent promptu.

C
Community
Database

PostgreSQL Best Practices: Expert Subagent Guide

Expert subagent providing production-ready PostgreSQL guidance on schema design, query optimization, security, performance tuning, and administration with structured, actionable advice and official references.

C
Claude Directory