cui-java-cdi
CommunityMaster 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
@RegisterForReflectionand 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
- Use constructor injection (never field injection)
- Make injected fields
final - Select appropriate scope (@ApplicationScoped for stateless)
- Avoid @Singleton unless eager initialization required
- Use Instance<T> for optional dependencies
- Add qualifiers for disambiguation
Create Secure Docker Image
- Use minimal base image (UBI, distroless)
- Run as non-root user
- Configure health checks
- Set resource limits
- Use multi-stage builds
- Scan for vulnerabilities
Dependency Matrix
Required Modules
None requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.