golang

forgoty 的头像作者 forgoty

遵循惯用模式、标准库约定和Go最佳实践编写、测试和维护Go代码。在处理Go/Golang项目、编写Go代码或审查Go实现时使用。

📖 中文导读:遵循惯用模式、标准库约定和Go最佳实践编写、测试和维护Go代码。在处理Go/Golang项目、编写Go代码或审查Go实现时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: golang description: Write, test, and maintain Go code following idiomatic patterns, standard library conventions, and Go best practices. Use when working with Go/Golang projects, writing Go code, or reviewing Go implementations.

Go Programming

Write idiomatic, maintainable, and testable Go code following the Go community's established patterns and conventions.

Quick Start

This Skill provides Go-specific coding rules that complement general programming principles. Before any Go coding task:

  1. Read GOLANG-RULES.md for all Go-specific rules
  2. STRICTLY follow this rules while producing or reviewing a source code
  3. RESPECT rules by severity: Critical → High → Medium → Low
  4. Follow idiomatic Go patterns (simplicity, clarity, composition)

When to Use This Skill

  • Writing new Go packages, services, or applications
  • Refactoring existing Go code to be more idiomatic
  • Implementing Go interfaces and type systems
  • Writing table-driven tests with testify
  • Reviewing Go code for style and best practices
  • Structuring Go projects and import organization
  • Working with Go concurrency patterns (goroutines, channels)

Rule Categories Overview

The GOLANG-RULES.md file contains detailed Go-specific rules in these categories: