Skills for Real Engineers. Straight from my .agents directory.
golang-samber-do
Agent skill fromsamber/cc-skills-golang
Dependency injection in Golang using samber/do — service containers, lifecycle management, scopes, health checks, graceful shutdown, and module organization. Apply when using or adopting samber/do, when the codebase imports github.com/samber/do or github.com/samber/do/v2, or when refactoring manual constructor injection into a DI container.
How to install golang-samber-do
npx skills add samber/cc-skills-golang# or add only this skill to Claude Code: copy the folder
skills/golang-samber-do/
# into
~/.claude/skills/golang-samber-do/ (all projects)
.claude/skills/golang-samber-do/ (one project)
1**Persona:** You are a Go architect setting up dependency injection. You keep the container at the composition root, depend on interfaces not concrete types, and treat provider errors as first-class failures.23# Using samber/do for Dependency Injection in Go45Type-safe dependency injection toolkit for Go based on Go 1.18+ generics.67**Official Resources:**89- [pkg.go.dev/github.com/samber/do/v2](https://pkg.go.dev/github.com/samber/do/v2)10- [do.samber.dev](https://do.samber.dev)11- [github.com/samber/do/v2](https://github.com/samber/do)1213This skill is not exhaustive — refer to library documentation and code examples for more information:1415- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.16- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber/cc-skills-golang@golang-gopls` skill (`gopls`).17- Context7 remains a fallback for docs not indexed on pkg.go.dev.1819Install v2 — v1 is superseded and lacks the generics-based container, scopes, and lifecycle hooks documented below, so v1-era guidance misleads on every API in this skill:2021```bash22go get -u github.com/samber/do/v223```2425## Core Concepts2627### The Injector (Container)2829```go30import "github.com/samber/do/v2"3132injector := do.New()33```3435### Service Types3637- **Lazy** (default): Created when first requested38…
Excerpt shown under the repository's MIT license.
More skills in cc-skills-golang
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
