Community코딩 & 개발github.com

Golang 스킬 오케스트레이터

Golang 코딩, 리뷰, 디버그, 설정 작업 시 컨텍스트를 분석하여 가장 관련성 높은 스킬들을 자동으로 로드하고, 충돌을 해소하며, 프로젝트 에이전트 설정 파일을 구성합니다.

Golang 스킬 오케스트레이터란 무엇인가요?

이 스킬은 Go 개발 작업을 위한 지능형 오케스트레이터입니다. 사용자가 Go 코딩, 리뷰, 디버깅, 설정과 같은 작업을 수행할 때, 작업 컨텍스트를 분석하여 가장 관련성 높은 스킬(예: gRPC 서비스 작성 시 golang-grpc, golang-testing, golang-error-handling)을 동시에 로드합니다. 또한 성능 vs 벤치마크 vs 트러블슈팅 같이 겹치는 스킬들을 명확히 구분하고, 프로젝트의 에이전트 설정 파일(CLAUDE.md, AGENTS.md, GEMINI.md, Cursor 규칙, Copilot 지시사항)을 자동으로 구성하여 해당 스킬을 강제로 트리거할 수 있습니다. Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼에서 사용 가능하며, gopls를 통한 코드 탐색을 지원합니다. 이 스킬은 samber/cc-skills-golang 저장소의 여러 하위 스킬들을 오케스트레이션하여 Go 개발자의 생산성을 극대화합니다.

지원 대상✓Claude Code✓Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/samber/cc-skills-golang/tree/main/skills/golang-how-to

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Persona: 당신은 Go 스킬 오케스트레이터입니다. 모든 Go 작업에 대해 관련 스킬을 식별하고 함께 로드하세요 — 작업이 단일 스킬에만 속하는 경우는 거의 없습니다.

모드:

  • 오케스트레이션 — 모든 Go 코딩, 리뷰, 디버그, 설정 작업에 대해 기본 스킬과 모든 적용 가능한 보조 스킬을 동시에 로드합니다.
  • 구분 — 두 스킬이 겹치는 것처럼 보이면 경계 테이블을 표시합니다. disambiguation.md를 참조하세요.
  • 구성 — golang-how-to 자체에 대한 항상 로드 지시문과 선택적 ## Required Go skills 블록을 프로젝트의 에이전트 설정 파일(CLAUDE.md, AGENTS.md 또는 이에 준하는 파일)에 작성합니다. project-config.md를 따르세요.

질문: 구성 모드에서는 환경의 질문 도구를 통해 사용자에게 질문하세요 — 일반 텍스트로 질문하지 마십시오. 한 번에 하나의 질문을 하고 답변을 기다리세요. 환경에 질문 도구가 없으면 동일한 옵션으로 일반 텍스트로 질문하세요.

의존성: gopls — go install golang.org/x/tools/gopls@latest; Claude Code의 내장 LSP 도구는 ENABLE_LSP_TOOL=1과 Go 언어 서버 연결도 필요합니다(gopls로 코드 탐색 참조).

스킬 로딩

각 작업에 대해 기본 스킬과 모든 적용 가능한 보조 스킬을 동시에 로드하세요. 기다리지 말고 — 시작할 때 함께 로드하십시오.

의도기본 스킬함께 로드할 스킬
API 설계, 패턴 선택golang-design-patternsgolang-structs-interfaces, golang-naming
타입, 함수, 패키지 이름 짓기golang-naminggolang-code-style
관용적 오류 처리golang-error-handlinggolang-safety (nil이 많은 코드)
고루틴, 채널, 동기화 작성golang-concurrencygolang-context (취소가 필요한 경우)
데드라인 전달 / 작업 취소golang-contextgolang-concurrency (고루틴이 있는 경우)
구조체 설계, 임베딩, 인터페이스 사용golang-structs-interfacesgolang-design-patterns
데이터베이스 쿼리 및 트랜잭션golang-databasegolang-error-handling, golang-security
gRPC 서비스 구축golang-grpcgolang-testing, golang-error-handling
GraphQL API 구축golang-graphqlgolang-testing, golang-error-handling
CLI 명령 트리 구축golang-spf13-cobragolang-cli, golang-spf13-viper (설정이 있는 경우)
플래그/환경변수/파일에서 설정 계층화golang-spf13-vipergolang-spf13-cobra
테스트 작성golang-testinggolang-stretchr-testify (testify 사용 시)
최적화 패턴 적용golang-performancegolang-benchmark (먼저 측정)
pprof / benchstat으로 측정golang-benchmarkgolang-performance (수정), golang-troubleshooting (근본 원인)
패닉 또는 예상치 못한 동작 디버그golang-troubleshootinggolang-safety, golang-benchmark (성능 관련인 경우)
프로덕션 모니터링golang-observabilitygolang-performance (SLO 위반 시)
보안 취약점 감사golang-securitygolang-safety, golang-lint
포맷팅 및 스타일 리뷰golang-code-stylegolang-naming, golang-lint
기존 코드 리팩터링 또는 재구성golang-refactoringgolang-naming, golang-code-style, golang-project-layout
golangci-lint 구성golang-lintgolang-code-style
godoc / README / CHANGELOG 작성golang-documentationgolang-naming
새 프로젝트 구조 설정golang-project-layoutgolang-design-patterns, golang-dependency-injection, golang-lint
CI/CD 파이프라인 설정golang-continuous-integrationgolang-lint, golang-security
라이브러리 선택golang-popular-libraries관련 라이브러리별 스킬
패키지 문서, 버전, 임포터, CVE 조회golang-pkg-go-devgolang-dependency-management
로컬 코드 탐색, 진단, 리팩터링 (정의, 참조, 이름 변경)golang-gopls—
새로운 Go 언어 기능 도입golang-modernizegolang-lint
samber/lo 사용 (슬라이스/맵 헬퍼)golang-samber-logolang-data-structures, golang-performance
samber/oops 사용 (구조화된 오류)golang-samber-oopsgolang-error-handling
log/slog 사용golang-samber-sloggolang-observability, golang-error-handling
의존성 주입 사용golang-dependency-injectiongolang-google-wire 또는 golang-uber-dig 또는 golang-uber-fx 또는 golang-samber-do

위의 모든 스킬 식별자는 samber/cc-skills-golang@<name>의 짧은 형태입니다.

gopls로 코드 탐색

gopls는 Go에 대한 의미론적 코드 인텔리전스를 제공합니다 — 정의로 이동, 참조 찾기, 진단, 패키지 API, 심볼 검색, 리팩터링. → samber/cc-skills-golang@golang-gopls 스킬에서 세 가지 접근 방식(자체 MCP 서버, 기본 LSP 도구, CLI), 전체 기능 매트릭스, 효율적인 읽기/편집 워크플로를 확인하세요.

gopls는 로컬 빌드에 존재하고 해석 가능한 코드만 추론합니다: 작업 공간과 go.sum에 정확히 고정된 모든 의존성(replace 지시문 포함). 로컬 빌드와 관련되지 않은 정보(버전 기록, 라이선스, 생태계 차원의 임포터, 아직 추가하지 않은 패키지)는 golang-pkg-go-dev (godig)를 사용하세요. 아래 godig vs gopls vs Context7 vs govulncheck 섹션에서 전체 경계를 확인하세요.

godig vs gopls vs Context7 vs govulncheck

네 가지 도구가 "이 의존성을 사용해도 괜찮은가"라는 질문에 답할 수 있으며, 보이는 것만큼 많이 겹치지 않습니다:

  • Context7은 범용, 다국어 문서 조회 도구입니다 — 더 구체적인 소스가 없을 때 유용합니다. Go 패키지나 모듈의 경우 godig이 거의 항상 더 나은 선택입니다: pkg.go.dev에서 구조화된, Go 특화 데이터를 직접 가져옵니다 — 정확한 버전, 시그니처가 있는 내보낸 심볼, 실행 가능한 예제, imported-by, 알려진 취약점 — Context7의 일반적인 스크래핑/큐레이팅 문서 대신, 이는 구조를 노출하지 않으며 덜 알려진 Go 모듈에서 지연되거나 누락될 수 있습니다. 의존성의 문서가 실제로 존재하지 않거나 pkg.go.dev에 색인되지 않은 경우에만 Context7을 사용하세요.
  • **godig**는 게시된 생태계에 대한 질문에 답합니다: 이미 go.mod에 있든 없든 모든 Go 패키지나 모듈 — 원격 pkg.go.dev API를 호출하며 로컬 체크아웃을 건드리지 않습니다. vulns 명령은 빌드가 실제로 취약한 코드 경로에 도달하는지 여부와 관계없이 패키지/버전에 대해 알려진 CVE를 보고합니다.
  • gopls (→ samber/cc-skills-golang@golang-gopls, MCP 서버, 기본 LSP 도구, 또는 CLI를 통해)는 특정 빌드에 대한 질문에 답합니다: 코드와 모든 의존성.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

samber/golang-benchmark

Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber/cc-skills-golang@golang-performance` provides the optimization patterns.

samber/golang-cli

Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli. For cobra-specific APIs → See `samber/cc-skills-golang@golang-spf13-cobra` skill; for viper configuration layering → See `samber/cc-skills-golang@golang-spf13-viper` skill.

samber/golang-code-style

Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill).

samber/golang-concurrency

Golang concurrency patterns. Use when writing or reviewing concurrent Go code involving goroutines, channels, select, locks, sync primitives, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Also triggers when you detect goroutine leaks, race conditions, channel ownership issues, or need to choose between channels and mutexes.

samber/golang-context

Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or unexpired contexts, choosing between context.Background/TODO/WithoutCancel, or storing values in context. Not for code that merely accepts ctx as first parameter.

samber/golang-continuous-integration

CI/CD pipeline configuration using GitHub Actions for Golang projects — testing, linting, SAST, security scanning, code coverage, Dependabot, Renovate, GoReleaser, code review automation, and release pipelines. Use when setting up or improving Go project CI, configuring GitHub Actions workflows, adding linters or security scanners, automating dependency updates, or adding quality gates.

samber/golang-database

Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL, MariaDB, MySQL, or SQLite; for database testing; or for questions about database/sql, sqlx, or pgx. Does NOT generate database schemas or migration SQL.

samber/golang-data-structures

Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.

samber/golang-dependency-injection

Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go. For a specific DI library, → See `samber/cc-skills-golang@golang-google-wire`, `samber/cc-skills-golang@golang-uber-dig`, `samber/cc-skills-golang@golang-uber-fx`, or `samber/cc-skills-golang@golang-samber-do` skills.

samber/golang-dependency-management

Dependency management strategies for Golang projects — go.mod management, installing/upgrading packages, Minimal Version Selection, vulnerability scanning, outdated dependency tracking, binary size analysis, Dependabot/Renovate setup, conflict resolution, and go.work workspaces. Use when adding, removing, or upgrading Go dependencies, auditing vulnerabilities, resolving version conflicts, or setting up automated dependency updates.

samber/golang-design-patterns

Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more. Apply when explicitly choosing between architectural patterns, implementing functional options, designing constructor APIs, setting up graceful shutdown, applying resilience patterns, or asking which idiomatic Go pattern fits a specific problem.

samber/golang-documentation

Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llms.txt. Use when writing or reviewing doc comments, documentation, adding code examples, setting up doc sites, or discussing documentation best practices. Triggers for both libraries and applications/CLIs.

samber/golang-error-handling

Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops` skill; for slog handler ecosystem → See `samber/cc-skills-golang@golang-samber-slog` skill.

samber/golang-google-wire

Compile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, //go:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google/wire, when the codebase imports `github.com/google/wire`, or when wiring an application graph at compile time via `wire.Build`. For runtime DI with reflection, see `samber/cc-skills-golang@golang-uber-dig` skill.

samber/golang-gopls

Golang semantic code intelligence via `gopls`, the official Go language server — go-to-definition, find references, call/implementation hierarchy, workspace symbol search, package API discovery, diagnostics, safe rename, refactors (extract/inline/fill/rewrite code actions), formatting, and generated tests. Reaches an agent via gopls's own MCP server (`go_*` tools), Claude Code's native `LSP` tool, or the `gopls` CLI. Use when navigating or refactoring Go code — jumping to a definition, finding call sites before a rename, understanding a file's or package's dependencies, running diagnostics after an edit, or extracting/inlining/renaming. Not for the published ecosystem — packages not in your `go.mod`, versions, licenses, importers — → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`). Not for a whole-tree vulnerability audit → See `samber/cc-skills-golang@golang-security` skill (`govulncheck`).

samber/golang-graphql

Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports `github.com/99designs/gqlgen` or `github.com/graph-gophers/graphql-go`.

samber/golang-grpc

Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or working with streaming RPCs.

samber/golang-lint

Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code quality tooling, or choosing linters. Also use when the user mentions golangci-lint, go vet, staticcheck, or revive.

samber/golang-modernize

Modernize Golang code to use recent language features, standard library improvements, and idiomatic patterns. Trigger proactively when writing or reviewing Go code and old-style patterns are detected, or when encountering a deprecation warning. Also use when the user explicitly asks for modernization, a Go version upgrade, or a CI/tooling refresh.

samber/golang-naming

Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters/setters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package names (utils/helpers anti-patterns), or asking about Go naming best practices. Also trigger when the user mentions MixedCaps vs snake_case, ALL_CAPS constants, Get-prefix on getters, or error string casing. Do NOT use for general Go implementation questions that don't involve naming decisions.

관련 스킬