What problem does it solve? Building long-running Go services requires coordinating dependency wiring, startup ordering, graceful shutdown, and signal handling. This Skill guides AI agents to structure applications with uber-go/fx correctly, avoiding common mistakes like blocking OnStart hooks, init()-based side effects, and flat provider lists in main(). ## Core Features & Use Cases - Application Wiring: Use fx.New, fx.Provide, fx.Invoke, fx.Supply, and fx.Annotate (name/group/As tags) to build the dependency graph at the composition root. - Lifecycle & Modules: Register fx.Lifecycle OnStart/OnStop hooks, organize providers into fx.Module units with scoped decorators, and run signal-aware shutdown via app.Run() or manual Start/Stop. - Testing Patterns: Apply 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 a Go service's main.go accumulates dozens of fx.Provide calls for HTTP, database, and metrics concerns, use this Skill to reorganize them into cohesive modules with value groups for route registration and graceful shutdown hooks. ## Quick Start Ask the agent to wire your Go service with uber-go/fx, for example: "Refactor my main.go to use fx.Module for the HTTP and database layers with lifecycle hooks for graceful shutdown."