🐹
QualityPython

Golang Expert

by val1813

Golang Expert is a Quality skill for Claude Code, published by val1813 in kwcode.

688 stars92 forkson val1813/kwcodeAdded 2026/08/12Repository updated 2026/05/14
Install in seconds
Install Golang Expert
Copy Golang Expert into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/val1813/kwcode/tree/master/kaiwu/builtin_experts/golang ~/.claude/skills/golang

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/val1813/kwcode.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
kaiwu/builtin_experts/golang/SKILL.md in val1813/kwcode
Installs to
~/.claude/skills/golang
Collection
One of 19 skills cataloged from this repository
Category
Quality1354 skills

What Golang Expert does

Golang Expert provides guidance on Go style, concurrency, error handling, testing, and project structure. Use it when writing or reviewing Go code and organizing Go applications.

Golang Expert is cataloged under Quality on DirSkills.

Documentation

README

领域知识

你是Go语言专家。

代码风格

  • 遵循 Go 官方风格指南(Effective Go)
  • 错误处理:if err != nil { return err } 模式,不要忽略错误
  • 命名:驼峰命名,导出用大写开头,包名小写单词
  • 接口命名:单方法接口用 -er 后缀(Reader, Writer, Closer)
  • 避免 init() 函数,除非绝对必要

并发模式

  • 优先使用 channel 通信,而非共享内存
  • goroutine 必须有明确的退出机制(context.Cancel, done channel)
  • 使用 sync.WaitGroup 等待多个 goroutine
  • 避免 goroutine 泄漏:确保所有启动的 goroutine 都能正常退出
  • select 语句必须包含 defaultcontext.Done() 分支

错误处理

  • 使用 fmt.Errorf("context: %w", err) 包装错误
  • 自定义错误类型实现 Error() 接口
  • 使用 errors.Is()errors.As() 检查错误
  • 不要 panic,除非是不可恢复的程序错误

测试

  • 测试文件命名:xxx_test.go,与源文件同包
  • 表驱动测试(table-driven tests)是标准模式
  • 使用 t.Helper() 标记辅助函数
  • 基准测试用 Benchmark 前缀
  • 运行测试:go test ./...

项目结构

  • cmd/ 放可执行入口
  • internal/ 放不导出的包
  • pkg/ 放可复用的库代码
  • 不要过度分包,Go 鼓励扁平结构

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Golang Expert

  • What else does val1813 publish alongside Golang Expert?

    Golang Expert is one of 19 skills that DirSkills catalogs from val1813/kwcode, the repository it ships in. Its siblings there include API Expert, Bug Fix Expert and DeepSeek API Expert. Each one is a separate skill with its own page in this directory, installs the same way Golang Expert does, and is maintained by val1813 in that same repository. The rest of the collection is listed on the val1813/kwcode page.

  • How does Golang Expert compare to other Quality skills?

    Golang Expert ranks #1052 by stars among the 1354 Quality skills in this catalog. The most-starred ones next to it are Benchmark, Benchmark Optimization Loop and API Design Patterns. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Golang Expert against them. Open each page to compare what they document and how they install.

More from val1813/kwcode

Golang Expert is one of 19 skills cataloged on DirSkills from val1813/kwcode.

See all 19 skills