What problem does it solve? Structuring a long-running Go service with uber-go/fx involves many subtle decisions — where to start servers, how to group providers, how to swap fakes in tests — and getting them wrong causes hung startups, leaked goroutines, or untestable wiring. This Skill guides an AI agent to apply idiomatic fx patterns correctly. ## Core Features & Use Cases - Application wiring: Compose fx.New with fx.Provide, fx.Invoke, fx.Supply, and fx.Module so main() stays thin and modules own their providers and decorators. - Lifecycle management: Register fx.Hook OnStart/OnStop callbacks that return quickly, respect context cancellation, and shut down gracefully under StartTimeout/StopTimeout. - Annotations and groups: Use fx.Annotate with fx.As, fx.ResultTags, and group tags to bind interfaces and collect many handlers into one consumer slice. - Testing patterns: Use fxtest.New, fx.Populate, and fx.Replace to pull services from the graph and swap real dependencies for fakes without rewriting modules. - Use Case: When adding an HTTP server to an fx app, the Skill directs the agent to inject fx.Lifecycle into the constructor, start srv.Serve in a goroutine inside OnStart, and call srv.Shutdown(ctx) in OnStop. ## Quick Start Ask the agent to wire your Go service with uber-go/fx, for example: "Refactor my main.go to use fx modules for the HTTP server and database with graceful shutdown."