golang-language
Core idioms, style guides, and best practices for writing idiomatic Go code. Use when writing Go code following official style guides and idiomatic patterns. (triggers: go.mod, golang, go code, idiomatic, gofmt, goimports, iota, golang style)
Best use case
golang-language is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Core idioms, style guides, and best practices for writing idiomatic Go code. Use when writing Go code following official style guides and idiomatic patterns. (triggers: go.mod, golang, go code, idiomatic, gofmt, goimports, iota, golang style)
Teams using golang-language should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/golang-language/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How golang-language Compares
| Feature / Agent | golang-language | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Core idioms, style guides, and best practices for writing idiomatic Go code. Use when writing Go code following official style guides and idiomatic patterns. (triggers: go.mod, golang, go code, idiomatic, gofmt, goimports, iota, golang style)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Golang Language Standards ## **Priority: P0 (CRITICAL)** ## Guidelines - **Formatting**: Run **`gofmt`** or **`goimports`** on save. Use **`gopls`** for LSP features. - **Naming**: Use **`camelCase`** for internal (unexported) and **`PascalCase`** for public (exported) symbols. - **Packages**: Use short, lowercase, singular names (e.g., **`http`**, **`user`**). Avoid `_` or `camelCase` in package names. - **Interfaces**: Small interfaces — 1-2 methods max. Define where used (consumer side), not where implemented. - **Errors**: Return **`error`** as the last return value. Handle errors **immediately** at the call-site. - **Slices**: Use **`make(slice, len, cap)`** to pre-allocate capacity and avoid redundant re-allocations. - **Enums**: Use a const block with iota for type-safe enumerations. - **Zero Values**: Leverage **`zero-value`** initialization over explicit `nil` checks where possible. ## Anti-Patterns - **No init**: Use constructors (NewService()), not init(). (not init() — it runs implicitly and makes testing harder) - **No Globals**: Use DI, not global mutable state. - **No `panic`**: Return errors, don't panic. - **No `_` ignored errors**: Always check and handle errors. - **No stutter**: `log.Error`, not `log.LogError`. ## Verification Workflow (Mandatory) After writing or modifying Go code: 1. **`mcp__ide__getDiagnostics`** — catch compile errors and gopls type diagnostics immediately 2. **`go vet ./...`** — catch common mistakes (printf mismatches, unreachable code, shadowed vars) 3. **`goimports -w .`** — fix imports and formatting in one pass ## References - [Idioms](references/idioms.md) - [Effective Go Summary](references/effective-go-summary.md)
Related Skills
next-intl-add-language
Add new language to a Next.js + next-intl application
answering-natural-language-questions-with-dbt
Writes and executes SQL queries against the data warehouse using dbt's Semantic Layer or ad-hoc SQL to answer business questions. Use when a user asks about analytics, metrics, KPIs, or data (e.g., "What were total sales last quarter?", "Show me top customers by revenue"). NOT for validating, testing, or building dbt models during development.
dbos-golang
DBOS Go SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing Go code with DBOS, creating workflows and steps, using queues, using the DBOS Client from external applications, or building Go applications that need to be resilient to failures.
golang-lo
Go >= 1.18 项目中希望用 samber/lo(Lodash 风格泛型库)简化集合/映射/字符串、错误处理、重试/节流/防抖、通道并发或指针空值场景时使用。
golang-enterprise-patterns
Enterprise-level Go architecture patterns including clean architecture, hexagonal architecture, DDD, and production-ready application structure.
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
Zig — Modern Systems Programming Language
## Overview
Stagehand — AI Browser Automation in Natural Language
You are an expert in Stagehand by BrowserBase, the AI-powered browser automation framework that lets you control web pages using natural language instructions. You help developers build web automations that act, extract data, and observe pages using plain English commands instead of brittle CSS selectors — powered by GPT-4o or Claude for visual understanding of page layouts.
Mojo — Python-Speed Systems Language for AI
## Overview
Malloy — Semantic Data Language
## Overview
Gleam — Type-Safe Language for the BEAM
## Overview
Elixir — Functional Language for Scalable Applications
You are an expert in Elixir, the functional programming language built on the Erlang VM (BEAM). You help developers build highly concurrent, fault-tolerant, and distributed systems using Elixir's process model, pattern matching, GenServer, supervision trees, Phoenix web framework, LiveView for real-time UI, and Ecto for database interactions — achieving massive concurrency with lightweight processes and "let it crash" reliability.