/guicedee-cdi:guicedee-cdifrom guicedee-cdi
Bridges Jakarta CDI annotations (@Inject, @Named, @ApplicationScoped, @Qualifier) into Guiced/Guice containers. Maps CDI scopes to Guice equivalents and provides a BeanManager adapter backed by the Guice injector.
Ships in guicedee-cdi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Lightweight Jakarta CDI bridge for Guiced applications.
Maps CDI annotations (@Inject, @Named, @ApplicationScoped, @Qualifier) to their Guice equivalents, provides a BeanManager adapter backed by the Guice injector, and registers itself as the Jakarta CDIProvider — so CDI-annotated code runs seamlessly inside a Guice-managed container.
guiced.net:cdi dependency.@jakarta.enterprise.context.ApplicationScoped
public class GreetingService {
public String greet(String name) {
return "Hello, " + name + "!";
}
}
@Inject:
public class WelcomeResource {
@jakarta.inject.Inject
private GreetingService greeter;
}
module-info.java:
module my.app {
requires com.guicedee.cdi;
}
IGuiceContext.registerModuleForScanning.add("my.app");
IGuiceContext.instance().inject();
| CDI Annotation | Guice Equivalent |
|---|---|
@jakarta.inject.Inject | @com.google.inject.Inject |
@jakarta.inject.Named | Names.named() |
@jakarta.inject.Singleton | Guice SINGLETON scope |
@jakarta.enterprise.context.ApplicationScoped | Guice SINGLETON scope |
@jakarta.inject.Qualifier | Guice binding annotation |
CDI.current()
→ JakartaCDIProvider.getCDI()
→ GuicedCDI.select(Class<T>)
→ IGuiceContext.get(Class<T>) // Guice injector lookup
The GuiceCDIBeanManager provides a simplified bean lookup API:
@Inject
private GuiceCDIBeanManager beanManager;
MyService svc = beanManager.getBean(MyService.class);
MyService svc = beanManager.getBean(MyService.class, "primary"); // @Named
boolean exists = beanManager.containsBean(MyService.class);
| SPI | Purpose |
|---|---|
BindScopeProvision | @Singleton, @ApplicationScoped → SINGLETON |
InjectionPointProvision | @Inject, @Named, @PostConstruct detection |
BindingAnnotationsProvision | @Qualifier as binding annotation |
NamedAnnotationProvision | jakarta.inject.Named → Names.named() |
InjectorAnnotationsProvision | jakarta.inject.Inject recognition |
The built-in BindScopeProvision maps @Singleton and @ApplicationScoped to a singleton in the local injector. It does not replicate objects across nodes or automatically implement CDI request/session lifetimes. Custom scopes need an actual Scope binding and application-owned entry/exit.
The shaded Guice implementation supports a scope annotation on an injected constructor parameter or field. This wraps the existing binding scope and caches by consuming injection group, scope annotation, and dependency key. Method-injection and provider-method parameters do not have this local-scope behavior. Register custom scope meta-annotations through ScopeAnnotationProvider and concrete scope bindings through BindScopeProvider; a meta-annotation alone is insufficient.
requires com.guicedee.cdi;.provides needed in your application module.opens to com.google.guice.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub guicedee/ai-rules --plugin guicedee-cdi