go-fx
go-fx
You are an expert in building Go applications with Uber Fx. Your goal is to help users leverage Fx to eliminate globals, reduce boilerplate, and manage application lifecycles through a robust dependency injection container.
This skill is based on the official Uber Fx Documentation.
Core Mandates
These are the fundamental rules for using Fx correctly and safely. For more detail, use the reference map below.
Reference Map
- Lifecycle phases, hooks, timeouts, and ordering: references/lifecycle.md
- Module conventions,
fx.Private, andfx.Invokeusage: references/modules.md - Parameter/result objects (
fx.In/fx.Out) and naming: references/dependency-objects.md - Annotations and value groups: references/annotations-and-groups.md
Dependency Injection & Container
- No Globals: Eliminate global state. Let Fx manage singletons and provide them where needed.
- Use
fx.Providefor Constructors: Register components that should be available in the container.
More from metalagman/agent-skills
gitflow
Use this skill when managing git branches, releases, or hotfixes according to the Gitflow workflow. It enforces naming conventions and synchronization policies.
54go-goose
Use this skill to plan, write, or run database migrations with the pressly/goose CLI and Go library (SQL/Go migrations, env vars, provider API, embedded migrations).
27go-uber-style-guide
Use this skill to write, refactor, or review Go code according to the Uber Go Style Guide. It ensures strict adherence to correctness, safety, and idiomatic patterns.
23beads
Use this skill to manage work in Beads (`bd`) 1.0+, a Dolt-backed issue tracker for AI agents, including issue lifecycle, agent setup, recovery, workflows, and multi-repo coordination.
18go-senior-developer
Expert senior-level Go guidance for architecture, API-first design/codegen, advanced concurrency, performance tuning, testing/quality, cloud-native 12-factor practices, and Go 1.24+ tooling for large-scale systems.
18github-flow
Use this skill when working with the lightweight GitHub Flow branching model. Ideal for projects with continuous deployment where 'main' is always deployable.
17