cui-java-cdi

Community

Master Quarkus & CDI, build robust Java apps.

Authorcuioss
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Developing Java applications with CDI (Contexts and Dependency Injection) and Quarkus can be complex, especially when aiming for native compilation, secure containerization, and robust testing. This Skill provides a comprehensive set of standards to ensure consistent, high-quality, and performant Java development, automating best practices and reducing common pitfalls.

Core Features & Use Cases

  • CDI Best Practices: Enforces constructor injection, proper scoping, and producer method patterns for clean, testable code.
  • Secure Containerization: Guides Dockerfile creation with security hardening, non-root execution, and optimized health checks.
  • Quarkus Native Optimization: Provides patterns for @RegisterForReflection and deployment processors to achieve efficient native images.
  • Use Case: When building a new Quarkus microservice, use this skill to ensure your CDI beans are correctly injected, your Docker image is secure and optimized, and your native compilation is configured for peak performance, letting AI handle the complex configuration details.

Quick Start

Implement Dependency Injection

  1. Use constructor injection (never field injection)
  2. Make injected fields final
  3. Select appropriate scope (@ApplicationScoped for stateless)
  4. Avoid @Singleton unless eager initialization required
  5. Use Instance<T> for optional dependencies
  6. Add qualifiers for disambiguation

Create Secure Docker Image

  1. Use minimal base image (UBI, distroless)
  2. Run as non-root user
  3. Configure health checks
  4. Set resource limits
  5. Use multi-stage builds
  6. Scan for vulnerabilities

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cui-java-cdi
Download link: https://github.com/cuioss/cui-llm-rules/archive/main.zip#cui-java-cdi

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.