Agent skill

Golang Patterns

by xu-xiang in xu-xiang/everything-claude-code-zh

构建健壮、高效且可维护 Go 应用程序的惯用法(Idiomatic Go)、最佳实践与规范. An agent skill from xu-xiang/everything-claude-code-zh.

MITAuto-check passed

Install Golang Patterns

skills CLI
$ npx skills add xu-xiang/everything-claude-code-zh --skill golang-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xu-xiang/everything-claude-code-zh golang-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ja-JP/skills/golang-patterns .claude/skills/golang-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
golang-patterns
GitHub stars
2k
Token cost
~2.9k tokens
SKILL.md length
109 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

构建健壮、高效且可维护 Go 应用程序的惯用法(Idiomatic Go)、最佳实践与规范. An agent skill from xu-xiang/everything-claude-code-zh.

  • Works in 3 steps: 简单与清晰 → 让零值(Zero Value)变得有用 → 接受接口(Interface),返回结构体(Struct)
  • SKILL.md covers 何时启用, 核心原则, 错误处理模式(Error Handling Patterns) and 并发处理模式(Concurrency Patterns), plus 4 more sections
  • Calls go

What it does

Golang Patterns is an agent skill from xu-xiang/everything-claude-code-zh. 构建健壮、高效且可维护 Go 应用程序的惯用法(Idiomatic Go)、最佳实践与规范。

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Go. The repository describes itself as: everything-claude-code 中文翻译项目:完整的 Claude Code 配置集合(agents, skills, hooks, commands, rules, MCPs)。源自 Anthropic 黑客松获胜者的实战配置,助力中文工程师高效理解与使用 Claude Code。 The licence is MIT.

Example prompts

  • “/golang-patterns”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 简单与清晰
  2. 让零值(Zero Value)变得有用
  3. 接受接口(Interface),返回结构体(Struct)

What it can do on your machine

Read from SKILL.md and the folder at commit dfbf946. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Golang Patterns loads about 2.9k tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 109 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xu-xiang/everything-claude-code-zh at commit dfbf946, republished under its MIT licence (© xu-xiang). 109 words, ~2,940 tokens.

Download SKILL.mdSave it as .claude/skills/golang-patterns/SKILL.md (or your agent's skills folder).
name
golang-patterns
description
构建健壮、高效且可维护 Go 应用程序的惯用法(Idiomatic Go)、最佳实践与规范。

Go 开发模式(Go Development Patterns)

用于构建健壮、高效且可维护应用程序的惯用法与最佳实践。

何时启用

  • 编写新的 Go 代码时
  • 评审 Go 代码时
  • 重构现有 Go 代码时
  • 设计 Go 软件包(Package)/ 模块(Module)时

核心原则

1. 简单与清晰

Go 倾向于简单而非巧妙。代码应当直观且易读。

go
// Good: 清晰且直接
func GetUser(id string) (*User, error) {
    user, err := db.FindUser(id)
    if err != nil {
        return nil, fmt.Errorf("get user %s: %w", id, err)
    }
    return user, nil
}

// Bad: 过于巧妙
func GetUser(id string) (*User, error) {
    return func() (*User, error) {
        if u, e := db.FindUser(id); e == nil {
            return u, nil
        } else {
            return nil, e
        }
    }()
}
2. 让零值(Zero Value)变得有用

在设计类型时,应确保其零值无需显式初始化即可直接使用。

go
// Good: 零值很有用
type Counter struct {
    mu    sync.Mutex
    count int // 零值为 0,可直接使用
}

func (c *Counter) Inc() {
    c.mu.Lock()
    c.count++
    c.mu.Unlock()
}

// Good: bytes.Buffer 可以直接使用零值
var buf bytes.Buffer
buf.WriteString("hello")

// Bad: 需要初始化
type BadCounter struct {
    counts map[string]int // nil map 会引发 panic
}
3. 接受接口(Interface),返回结构体(Struct)

函数应当接收接口参数并返回具体类型。

go
// Good: 接收接口,返回具体类型
func ProcessData(r io.Reader) (*Result, error) {
    data, err := io.ReadAll(r)
    if err != nil {
        return nil, err
    }
    return &Result{Data: data}, nil
}

// Bad: 返回接口(无谓地隐藏了实现细节)
func ProcessData(r io.Reader) (io.Reader, error) {
    // ...
}

错误处理模式(Error Handling Patterns)

带有上下文的错误包装(Error Wrapping)
go
// Good: 使用上下文包装错误
func LoadConfig(path string) (*Config, error) {
    data, err := os.ReadFile(path)
    if err != nil {
        return nil, fmt.Errorf("load config %s: %w", path, err)
    }

    var cfg Config
    if err := json.Unmarshal(data, &cfg); err != nil {
        return nil, fmt.Errorf("parse config %s: %w", path, err)
    }

    return &cfg, nil
}
自定义错误类型
go
// 定义领域特定错误
type ValidationError struct {
    Field   string
    Message string
}

func (e *ValidationError) Error() string {
    return fmt.Sprintf("validation failed on %s: %s", e.Field, e.Message)
}

// 常见情况的哨兵错误(Sentinel errors)
var (
    ErrNotFound     = errors.New("resource not found")
    ErrUnauthorized = errors.New("unauthorized")
    ErrInvalidInput = errors.New("invalid input")
)
使用 errors.Is 与 errors.As 进行错误检查
go
func HandleError(err error) {
    // 检查特定错误
    if errors.Is(err, sql.ErrNoRows) {
        log.Println("No records found")
        return
    }

    // 检查错误类型
    var validationErr *ValidationError
    if errors.As(err, &validationErr) {
        log.Printf("Validation error on field %s: %s",
            validationErr.Field, validationErr.Message)
        return
    }

    // 未知错误
    log.Printf("Unexpected error: %v", err)
}
永不忽略错误
go
// Bad: 使用空白标识符忽略错误
result, _ := doSomething()

// Good: 处理错误或显式记录为何可以安全忽略
result, err := doSomething()
if err != nil {
    return err
}

// Acceptable: 当错误确实无关紧要时(罕见)
_ = writer.Close() // 尽力清理,错误已在别处记录

并发处理模式(Concurrency Patterns)

工作池(Worker Pool)
go
func WorkerPool(jobs <-chan Job, results chan<- Result, numWorkers int) {
    var wg sync.WaitGroup

    for i := 0; i < numWorkers; i++ {
        wg.Add(1)
        go func() {
            defer wg.Done()
            for job := range jobs {
                results <- process(job)
            }
        }()
    }

    wg.Wait()
    close(results)
}
用于取消(Cancellation)与超时(Timeout)的上下文(Context)
go
func FetchWithTimeout(ctx context.Context, url string) ([]byte, error) {
    ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
    defer cancel()

    req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
    if err != nil {
        return nil, fmt.Errorf("create request: %w", err)
    }

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        return nil, fmt.Errorf("fetch %s: %w", url, err)
    }
    defer resp.Body.Close()

    return io.ReadAll(resp.Body)
}
优雅停机(Graceful Shutdown)
go
func GracefulShutdown(server *http.Server) {
    quit := make(chan os.Signal, 1)
    signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)

    <-quit
    log.Println("Shutting down server...")

    ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
    defer cancel()

    if err := server.Shutdown(ctx); err != nil {
        log.Fatalf("Server forced to shutdown: %v", err)
    }

    log.Println("Server exited")
}
用于协同协程的 errgroup
go
import "golang.org/x/sync/errgroup"

func FetchAll(ctx context.Context, urls []string) ([][]byte, error) {
    g, ctx := errgroup.WithContext(ctx)
    results := make([][]byte, len(urls))

    for i, url := range urls {
        i, url := i, url // 捕获循环变量
        g.Go(func() error {
            data, err := FetchWithTimeout(ctx, url)
            if err != nil {
                return err
            }
            results[i] = data
            return nil
        })
    }

    if err := g.Wait(); err != nil {
        return nil, err
    }
    return results, nil
}
避免协程(Goroutine)泄漏
go
// Bad: 如果 context 被取消,会发生协程泄漏
func leakyFetch(ctx context.Context, url string) <-chan []byte {
    ch := make(chan []byte)
    go func() {
        data, _ := fetch(url)
        ch <- data // 如果没有接收者,将永远阻塞
    }()
    return ch
}

// Good: 正确处理取消操作
func safeFetch(ctx context.Context, url string) <-chan []byte {
    ch := make(chan []byte, 1) // 有缓冲通道
    go func() {
        data, err := fetch(url)
        if err != nil {
            return
        }
        select {
        case ch <- data:
        case <-ctx.Done():
        }
    }()
    return ch
}

接口设计(Interface Design)

小而精简的接口
go
// Good: 单方法接口
type Reader interface {
    Read(p []byte) (n int, err error)
}

type Writer interface {
    Write(p []byte) (n int, err error)
}

type Closer interface {
    Close() error
}

// 根据需要组合接口
type ReadWriteCloser interface {
    Reader
    Writer
    Closer
}
在使用者处定义接口
go
// 在消费者包中定义,而不是在提供者包中
package service

// UserStore 定义了该服务所需的功能
type UserStore interface {
    GetUser(id string) (*User, error)
    SaveUser(user *User) error
}

type Service struct {
    store UserStore
}

// 具体实现可以在另一个包中
// 它不需要知道这个接口的存在
使用类型断言(Type Assertion)实现可选行为
go
type Flusher interface {
    Flush() error
}

func WriteAndFlush(w io.Writer, data []byte) error {
    if _, err := w.Write(data); err != nil {
        return err
    }

    // 如果支持,则调用 Flush
    if f, ok := w.(Flusher); ok {
        return f.Flush()
    }
    return nil
}

包(Package)结构

标准项目布局
text
myproject/
├── cmd/
│   └── myapp/
│       └── main.go           # 入口点
├── internal/
│   ├── handler/              # HTTP 处理器
│   ├── service/              # 业务逻辑
│   ├── repository/           # 数据访问
│   └── config/               # 配置
├── pkg/
│   └── client/               # 公共 API 客户端
├── api/
│   └── v1/                   # API 定义 (proto, OpenAPI)
├── testdata/                 # 测试固件
├── go.mod
├── go.sum
└── Makefile
包命名
go
// Good: 短小、全小写、无下划线
package http
package json
package user

// Bad: 冗长、大小写混合或冗余
package httpHandler
package json_parser
package userService // 冗余的 'Service' 后缀
避免包级状态
go
// Bad: 全局可变状态
var db *sql.DB

func init() {
    db, _ = sql.Open("postgres", os.Getenv("DATABASE_URL"))
}

// Good: 依赖注入
type Server struct {
    db *sql.DB
}

func NewServer(db *sql.DB) *Server {
    return &Server{db: db}
}

结构体设计

函数式选项模式(Functional Options Pattern)
go
type Server struct {
    addr    string
    timeout time.Duration
    logger  *log.Logger
}

type Option func(*Server)

func WithTimeout(d time.Duration) Option {
    return func(s *Server) {
        s.timeout = d
    }
}

func WithLogger(l *log.Logger) Option {
    return func(s *Server) {
        s.logger = l
    }
}

func NewServer(addr string, opts ...Option) *Server {
    s := &Server{
        addr:    addr,
        timeout: 30 * time.Second, // 默认值
        logger:  log.Default(),    // 默认值
    }
    for _, opt := range opts {
        opt(s)
    }
    return s
}

// 使用示例
server := NewServer(":8080",
    WithTimeout(60*time.Second),
    WithLogger(customLogger),
)
用于组合(Composition)的嵌入(Embedding)
go
type Logger struct {
    prefix string
}

func (l *Logger) Log(msg string) {
    fmt.Printf("[%s] %s\n", l.prefix, msg)
}

type Server struct {
    *Logger // 嵌入 - Server 获得了 Log 方法
    addr    string
}

func NewServer(addr string) *Server {
    return &Server{
        Logger: &Logger{prefix: "SERVER"},
        addr:   addr,
    }
}

// 使用示例
s := NewServer(":8080")
s.Log("Starting...") // 调用嵌入的 Logger.Log

内存与性能

已知大小时预分配切片(Slice)
go
// Bad: 切片多次扩容
func processItems(items []Item) []Result {
    var results []Result
    for _, item := range items {
        results = append(results, process(item))
    }
    return results
}

// Good: 单次分配内存
func processItems(items []Item) []Result {
    results := make([]Result, 0, len(items))
    for _, item := range items {
        results = append(results, process(item))
    }
    return results
}
使用 sync.Pool 处理频繁分配
go
var bufferPool = sync.Pool{
    New: func() interface{} {
        return new(bytes.Buffer)
    },
}

func ProcessRequest(data []byte) []byte {
    buf := bufferPool.Get().(*bytes.Buffer)
    defer func() {
        buf.Reset()
        bufferPool.Put(buf)
    }()

    buf.Write(data)
    // 处理过程...
    return buf.Bytes()
}
避免在循环中连接字符串
go
// Bad: 产生大量字符串内存分配
func join(parts []string) string {
    var result string
    for _, p := range parts {
        result += p + ","
    }
    return result
}

// Good: 使用 strings.Builder 进行单次分配
func join(parts []string) string {
    var sb strings.Builder
    for i, p := range parts {
        if i > 0 {
            sb.WriteString(",")
        }
        sb.WriteString(p)
    }
    return sb.String()
}

// Best: 使用标准库
func join(parts []string) string {
    return strings.Join(parts, ",")
}

Go 工具链集成

基本命令
bash
# 构建并运行
go build ./...
go run ./cmd/myapp

# 测试
go test ./...
go test -race ./...
go test -cover ./...

# 静态分析
go vet ./...
staticcheck ./...
golangci-lint run

# 模块管理
go mod tidy
go mod verify

# 格式化
gofmt -w .
goimports -w .
推荐的 Linter 配置(.golangci.yml)
yaml
linters:
  enable:
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - unused
    - gofmt
    - goimports
    - misspell
    - unconvert
    - unparam

linters-settings:
  errcheck:
    check-type-assertions: true
  govet:
    check-shadowing: true

issues:
  exclude-use-default: false

快速参考:Go 惯用法

惯用法说明
接受接口,返回结构体函数应当接收接口参数并返回具体类型
错误即值将错误视为一等公民(First-class Value),而非异常
不要通过共享内存来通信使用通道(Channel)进行协程间的协调
让零值变得有用类型应在无显式初始化的情况下即可正常工作
少量的拷贝好过少量的依赖避免不必要的外部依赖
清晰好过巧妙可读性优先于奇技淫巧
gofmt 虽然不是任何人的最爱,但它是每个人的朋友始终使用 gofmt/goimports 进行格式化
尽早返回优先处理错误,使快乐路径(Happy Path)保持较浅的缩进

应避免的反模式(Anti-patterns)

go
// Bad: 长函数中的裸返回(Naked returns)
func process() (result int, err error) {
    // ... 50 行代码 ...
    return // 返回了什么?
}

// Bad: 使用 panic 进行控制流管理
func GetUser(id string) *User {
    user, err := db.Find(id)
    if err != nil {
        panic(err) // 不要这样做
    }
    return user
}

// Bad: 在结构体中传递 context
type Request struct {
    ctx context.Context // context 应该是第一个参数
    ID  string
}

// Good: context 作为第一个参数
func ProcessRequest(ctx context.Context, id string) error {
    // ...
}

// Bad: 混合使用值接收者和指针接收者
type Counter struct{ n int }
func (c Counter) Value() int { return c.n }    // 值接收者
func (c *Counter) Increment() { c.n++ }        // 指针接收者
// 请选择一种风格并保持一致

请记住:Go 代码在最好的意义上应当是“枯燥”的 —— 可预测、一致且易于理解。如有疑疑虑,请保持简单。

© xu-xiang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/ja-JP/skills/golang-patterns of xu-xiang/everything-claude-code-zh.

Open the folder on GitHubat commit dfbf946

Compare with similar skills

Golang Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Golang Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Golang Patterns this skillxu-xiang/everything-claude-code-zh2k—~2.9kAutomated safety check: PassMIT
Add Redis Command to go-redisredis/go-redis22k—~1.4kAutomated safety check: PassBSD-2-Clause
Go Pedantrychromedp/chromedp13k—~3.7kAutomated safety check: PassMIT
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
AO Desktop App LauncherOrchestratorInc/agent-orchestrator13k—~2.4kAutomated safety check: PassApache-2.0
Go-Redis Release Preparationredis/go-redis22k—~1.1kAutomated safety check: PassBSD-2-Clause

Similar skills

  • Official

    Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.

    22k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • AO Desktop App Launcher

    OrchestratorInc/agent-orchestrator

    Launches, restarts and troubleshoots the real AO Electron desktop app from a checkout, with isolated or real local data and checks for stale processes.

    13k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Prepares a go-redis release locally: picks the next semver, gathers merged PRs, writes the RELEASE-NOTES entry and bumps versions, without publishing.

    22k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Starts a Dozzle dev server on a port derived from the current worktree so you can test by hand in a browser, without disturbing instances started elsewhere.

    15k GitHub stars~747 tokensUpdated today
    DevelopmentAuto-check passed

More from xu-xiang/everything-claude-code-zh

All 78 skills in this repo
  • Configure Ecc

    xu-xiang/everything-claude-code-zh

    Everything Claude Code 的交互式安装程序 — 引导用户选择并安装技能和规则到用户级或项目级目录,验证路径,并可选择优化已安装文件。

    2k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Continuous Learning V2

    xu-xiang/everything-claude-code-zh

    基于本能(Instinct)的学习系统,通过钩子(hooks)观察会话,创建带有置信度评分的原子本能,并将其演化为技能(Skills)、命令(Commands)或智能体(Agents)。v2.1 版本增加了项目作用域(project-scoped)的本能,以防止跨项目污染。

    2k GitHub stars~2.1k tokensUpdated 7 mo ago
    Auto-check passed
  • API Design

    xu-xiang/everything-claude-code-zh

    生产级 API 的 REST API 设计模式,包括资源命名、状态码、分页、过滤、错误响应、版本控制和速率限制. An agent skill from xu-xiang/everything-claude-code-zh.

    2k GitHub stars~2.7k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及适用于 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.1k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及针对 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed

Works with

Questions about Golang Patterns

What does Golang Patterns do?

构建健壮、高效且可维护 Go 应用程序的惯用法(Idiomatic Go)、最佳实践与规范. An agent skill from xu-xiang/everything-claude-code-zh. Golang Patterns is an agent skill from xu-xiang/everything-claude-code-zh.

How do I install Golang Patterns in Claude Code?

Run `npx skills add xu-xiang/everything-claude-code-zh --skill golang-patterns -a claude-code`. Or copy the skill folder (docs/ja-JP/skills/golang-patterns in xu-xiang/everything-claude-code-zh) into .claude/skills/golang-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Golang Patterns in Codex?

Run `npx skills add xu-xiang/everything-claude-code-zh --skill golang-patterns -a codex`. Or copy the skill folder (docs/ja-JP/skills/golang-patterns in xu-xiang/everything-claude-code-zh) into .agents/skills/golang-patterns in your project. Codex loads it when a task matches its description.

Can I use Golang Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xu-xiang/everything-claude-code-zh --skill golang-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-patterns, .gemini/skills/golang-patterns, .github/skills/golang-patterns and .opencode/skills/golang-patterns in your project.

What does Golang Patterns need to run?

Going by SKILL.md and its folder, Golang Patterns needs the command-line tools its instructions call (go).

Does Golang Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Golang Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Golang Patterns use?

Golang Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Golang Patterns use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Golang Patterns?

Skills that share tags, products or a category with Golang Patterns: Add Redis Command to go-redis (redis/go-redis, 22k stars), Go Pedantry (chromedp/chromedp, 13k stars), Fory Release (apache/fory, 4.6k stars) and AO Desktop App Launcher (OrchestratorInc/agent-orchestrator, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Golang Patterns?

xu-xiang (a GitHub user) maintains it in xu-xiang/everything-claude-code-zh, which has 1,978 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on March 5, 2026.

Source: xu-xiang/everything-claude-code-zh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.