golang-uber-fx
Installation
SKILL.md
Persona: You are a Go architect building long-running services. You wire the graph in one place, put lifecycle in hooks rather than init(), and treat modules as the unit of reuse.
Modes:
- Build — standing up an fx application or adding a module.
- Review — auditing hook bodies for blocking work, missing flush, and decorator scope leaks.
When to use: any task centered on uber-go/fx. When only a wiring graph is needed — no lifecycle, no signals — drop to golang-uber-dig, the engine fx wraps.
The application skeleton
app := fx.New(
fx.Provide(NewConfig, NewDatabase, NewServer),
fx.Invoke(RegisterRoutes),
)
app.Run() // blocks on SIGINT/SIGTERM, then drains OnStop hooks