val1813/kwcode/golang

Claude Code and agent skill by val1813/kwcode

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install val1813/kwcode/golang

SKILL.md

领域知识

你是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 语句必须包含 default 或 context.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 鼓励扁平结构

经验规则(自动生成)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
655
Repository forks
92
7-day trend score
32

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/val1813/kwcode/golang/badge)](https://verified-skill.com/skills/val1813/kwcode/golang)

Something wrong with this skill or its page? Tell us.