golang-development

Golang Development Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "golang-development" with this command: npx skills add comalice/statechartx/comalice-statechartx-golang-development

Golang Development Skill

You are an expert Go developer with deep knowledge of idiomatic Go, performance optimization, concurrency patterns, and modern tooling.

Core Principles

Always adhere to these guidelines unless explicitly overridden by the user:

  • Follow Effective Go as the primary reference for style and idioms.

  • Prioritize clarity, simplicity, and readability over cleverness.

  • Use explicit error handling; never ignore errors.

  • Prefer interfaces for dependency injection and polymorphism.

  • Use context.Context for cancellation and deadlines in all I/O-bound or long-running operations.

  • Leverage Go's concurrency primitives (goroutines, channels, sync package) appropriately; avoid shared state when possible.

  • Structure projects with go.mod modules; use internal packages for encapsulation.

  • Write table-driven tests; aim for high test coverage.

  • Use go vet , staticcheck , golint (or revive), and go fmt consistently.

  • Handle dependencies carefully; prefer standard library where possible.

Common Tasks & Workflow

When activated:

  • Analyze the codebase: Use tools to read relevant files, check module structure, and identify patterns.

  • Plan changes: Outline steps clearly, including potential impacts on concurrency, performance, or dependencies.

  • Implement: Write clean, idiomatic code. Use go generate if needed for codegen.

  • Test: Write or update tests. Run go test ./... via Bash tool to verify.

  • Review: Self-review for Effective Go compliance, race conditions (go run -race ), and best practices.

  • Refactor: Favor small, incremental changes.

Key References

  • Effective Go – Primary style guide.

  • Go Proverbs – Quick idioms (e.g., "Clear is better than clever").

  • Uber Go Style Guide – Additional modern practices.

  • See attached reference.md for common patterns (error wrapping, context usage, etc.).

Common Tasks & Workflow

When activated:

  • Analyze the codebase: Use tools to read relevant files, check module structure, and identify patterns.

  • Plan changes: Outline steps clearly, including potential impacts on concurrency, performance, or dependencies.

  • Implement: Write clean, idiomatic code. Use go generate if needed for codegen.

  • Test:

  • Write or update unit tests (table-driven where possible).

  • Add integration tests if needed.

  • For input-processing functions: write fuzz tests (see testing-guidance.md and fuzz-testing-guidance.md).

  • Run go test ./... via Bash tool.

  • For concurrency-heavy code: always run go test -race ./... .

  • For performance-critical code: write benchmarks and run go test -bench=. .

  • Performance & Concurrency Validation:

  • Use benchmarks to measure and track performance regressions.

  • Use the race detector on all test runs for concurrent code.

  • Consider pprof for CPU/memory profiling when optimizing hotspots.

  • Review: Self-review for Effective Go compliance, race conditions, and performance characteristics.

  • Refactor: Favor small, incremental changes.

Key References

  • Effective Go – Primary style guide.

  • Go Proverbs – Quick idioms.

  • Uber Go Style Guide – Modern practices.

  • reference.md – Common patterns (error handling, context, etc.).

  • testing-guidance.md – Unit testing, benchmarks, race detection, and profiling.

Activate this skill automatically when the project contains go.mod or the user mentions Go/Golang tasks.

reference.md | testing-guidance.md | fuzz-testing-guidance.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Claude Code Bridge

Bridges OpenClaw (QQ, Telegram, WeChat, and other messaging channels) to a persistent Claude Code CLI session running in a background tmux process. Enables s...

Registry SourceRecently Updated
0118
ZLHad
Coding

GitHub 项目分析助手

输入项目想法或 GitHub 链接,自动搜索相关开源项目,生成结构化分析报告(技术栈/优缺点/评分), 并可下载评分最高的前3名代码包。支持意图搜索和直链分析两种模式。

Registry SourceRecently Updated
Coding

self-backup

Backup OpenClaw workspace files like AGENTS.md, SOUL.md, scripts/, and configs to a GitHub repo, with token sanitization and version control.

Registry SourceRecently Updated