Token导航 LogoToken导航TokenDH.com
效率只读clawhub未标认证来源可访问clear审计通过

goGO 工具

Agent Skill

go 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

49,915

周安装

2,039

GitHub Stars

2

下载量

15,986
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:go(GO 工具)
来源仓库:https://github.com/ivangdavila/go
安装命令:
openclaw skills install go
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install go

简介

编写可靠 Go 代码,避免 goroutine 泄漏与接口误用。

  • 适用于 OpenClaw 中提升后端服务开发效率与稳定性。
  • 可辅助处理并发控制、内存管理与依赖注入。go 属于效率类 Skill,可作为该场景下的辅助能力补充。
  • 安装命令为 openclaw skills install go,需配置 Go 工作区与模块路径。
  • 生产部署时应启用竞态检测与性能剖析工具。

SKILL.md

name
Go
slug
go
version
1.0.2
description
Write reliable Go code avoiding goroutine leaks, interface traps, and common concurrency bugs.
metadata
{"clawdbot":{"emoji":"🐹","requires":{"bins":["go"]},"os":["linux","darwin","win32"]}}

Quick Reference

TopicFile
Concurrency patternsconcurrency.md
Interface and type systeminterfaces.md
Slices, maps, stringscollections.md
Error handling patternserrors.md

Goroutine Leaks

  • Goroutine blocked on channel with no sender = leak forever—always ensure channel closes or use context
  • Unbuffered channel send blocks until receive—deadlock if receiver never comes
  • for range on channel loops forever until channel closed—sender must close(ch)
  • Context cancellation doesn't stop goroutine automatically—must check ctx.Done() in loop
  • Leaked goroutines accumulate memory and never garbage collect

Channel Traps

  • Sending to nil channel blocks forever—receiving from nil also blocks forever
  • Sending to closed channel panics—closing already closed channel panics
  • Only sender should close channel—receiver closing causes sender panic
  • Buffered channel full = send blocks—size buffer for expected load
  • select with multiple ready cases picks randomly—not first listed

Defer Traps

  • Defer arguments evaluated immediately, not when deferred function runs—defer log(time.Now()) captures now
  • Defer in loop accumulates—defers stack, run at function end not iteration end
  • Defer runs even on panic—good for cleanup, but recover only in deferred function
  • Named return values modifiable in defer—defer func() { err = wrap(err) }() works
  • Defer order is LIFO—last defer runs first

Interface Traps

  • Nil concrete value in interface is not nil interface—var p *MyType; var i interface{} = p; i != nil is true
  • Type assertion on wrong type panics—use comma-ok: v, ok := i.(Type)
  • Empty interface any accepts anything but loses type safety—avoid when possible
  • Interface satisfaction is implicit—no compile error if method signature drifts
  • Pointer receiver doesn't satisfy interface for value type—only *T has the method

Error Handling

  • Errors are values, not exceptions—always check returned error
  • err != nil after every call—unchecked errors are silent bugs
  • errors.Is for wrapped errors—== doesn't work with fmt.Errorf("%w", err)
  • Sentinel errors should be var ErrFoo = errors.New() not recreated
  • Panic for programmer errors only—return error for runtime failures

Slice Traps

  • Slice is reference to array—modifying slice modifies original
  • Append may or may not reallocate—never assume capacity
  • Slicing doesn't copy—a[1:3] shares memory with a
  • Nil slice and empty slice differ—var s []int vs s := []int{}
  • copy() copies min of lengths—doesn't extend destination

Map Traps

  • Reading from nil map returns zero value—writing to nil map panics
  • Map iteration order is random—don't rely on order
  • Maps not safe for concurrent access—use sync.Map or mutex
  • Taking address of map element forbidden—&m[key] doesn't compile
  • Delete from map during iteration is safe—but add may cause issues

String Traps

  • Strings are immutable byte slices—each modification creates new allocation
  • range over string iterates runes, not bytes—index jumps for multi-byte chars
  • len(s) is bytes, not characters—use utf8.RuneCountInString()
  • String comparison is byte-wise—not Unicode normalized
  • Substring shares memory with original—large string keeps memory alive

Struct and Memory

  • Struct fields padded for alignment—field order affects memory size
  • Zero value is valid—var wg sync.WaitGroup works, no constructor needed
  • Copying struct with mutex copies unlocked mutex—always pass pointer
  • Embedding is not inheritance—promoted methods can be shadowed
  • Exported fields start uppercase—lowercase fields invisible outside package

Build Traps

  • go build caches aggressively—use -a flag to force rebuild
  • Unused imports fail compilation—use _ import for side effects only
  • init() runs before main, order by dependency—not file order
  • go:embed paths relative to source file—not working directory
  • Cross-compile: GOOS=linux GOARCH=amd64 go build—easy but test on target

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

74.36%
按下载量换算11,887

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills