golang-uber-fx

golang uber fx

samber ↓ 31k
Claude Code
View source ↗

What it does

  • pkg.go.dev/go.uber.org/fx
  • uber-go.github.io/fx
  • github.com/uber-go/fx
  • advanced.md — Supply/Replace/Decorate, optional deps, custom event logging, manual lifecycle, full Quick Reference
  • testing.md — fxtest patterns, fx.Replace, fx.Populate, isolated lifecycle tests, CI graph validation
  • → See samber/cc-skills-golang@golang-uber-dig skill for the underlying container, dig.In/dig.Out, and DI without lifecycle
  • → See samber/cc-skills-golang@golang-dependency-injection skill for DI concepts and library comparison

Requirements & configuration

  • fx re-exports dig's dig.In / dig.Out as fx.In / fx.Out. Use them when a constructor has 4+ dependencies, or when you need name/group/optional tags.
  • 2. Use lifecycle hooks instead of init() or goroutines launched from constructors — Start/Stop ordering depends on graph topology, but init() goroutines do not, which leads to races and leaks.

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

golang uber fx

Source

Repository: https://github.com/samber/cc-skills-golang

golang-uber-fx FAQ

What does the golang-uber-fx skill do?

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports `go.uber.org/fx`, or when wiring services with fx.New. For raw DI without lifecycle, see `samber/cc-skills-golang@golang-uber-dig` skill. pkg.go.dev/go.uber.org/fx uber-go.github.io/fx

What does golang-uber-fx require?

fx re-exports dig's dig.In / dig.Out as fx.In / fx.Out. Use them when a constructor has 4+ dependencies, or when you need name/group/optional tags. 2. Use lifecycle hooks instead of init() or goroutines launched from constructors — Start/Stop ordering depends on graph topology, but init() goroutines do not, which leads to races and leaks.

How do I install golang-uber-fx?

Run: npx -y skills add https://github.com/samber/cc-skills-golang --skill golang-uber-fx --agent claude-code — the source lives at github.com/samber/cc-skills-golang.

Maintain golang-uber-fx?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

golang-uber-fx on getagentictools
[![golang-uber-fx on getagentictools](https://getagentictools.com/badge/skills/samber-cc-skills-golang-golang-uber-fx.svg)](https://getagentictools.com/skills/samber-cc-skills-golang-golang-uber-fx?ref=badge)
npx agentictools info skills/samber-cc-skills-golang-golang-uber-fx

The second line is the CLI lookup for this page — handy in READMEs and docs.