做什么
同时执行 使用goroutines和通道去图案,用 gRPC 或 REST 设计并构建微服务,优化 使用 pprof 执行应用程序性能 使用通用软件、接口和稳健的错误处理
技能库 智客分类:设计创意 golang-pro
同时执行 使用goroutines和通道去图案,用 gRPC 或 REST 设计并构建微服务,优化 与 pprof 一起去应用性能, 并强制使用 diodomatic Go 与 generals, 接口, 以及 稳健 的错误处理 。 在构建Go应用程序时使用,需要同时编程,微服务架构,或高性能系统. 呼唤到goroutines,渠道, 去通用,gRPC集成,CLI工具,基准,或由表格驱动的测试.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
同时执行 使用goroutines和通道去图案,用 gRPC 或 REST 设计并构建微服务,优化 使用 pprof 执行应用程序性能 使用通用软件、接口和稳健的错误处理
大楼 Go应用程序需要同时编程,微服务架构,或高性能系统. 呼唤到goroutines,渠道, 通用、GRPC整合、CLI工具、基准或表格驱动测试
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Golang Pro、Core Workflow、Reference Guide、Core Pattern Example、Constraints、MUST DO。 其中含规范建议的小节:分步指令、输入输出示例、边界情况。
文件分析:除 SKILL.md 外,正文引用了 references/concurrency.md、references/interfaces.md、references/generics.md、references/testing.md、references/project-structure.md,属于带资源的技能包,这些文件按需再读。
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration, CLI tools, benchmarks, or table-driven testing.
Golang ProCore WorkflowReference GuideCore Pattern ExampleConstraintsMUST DOMUST NOT DOOutput TemplatesKnowledge Reference
· 许可:MIT
来源分类:skills.sh agent-skill
namegolang-prodescriptionreferences/concurrency.mdreferences/interfaces.mdreferences/generics.mdreferences/testing.mdreferences/project-structure.md以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。
具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「golang-pro」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-7d8b36fbc213ea49-%E6%88%88%E5%85%B0.html 请存为 .cursor/skills/golang-pro/SKILL.md 或 .claude/skills/golang-pro/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。 该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/jeffallan/claude-skills 取完整目录,不要只建一个 SKILL.md。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/jeffallan/claude-skills' --list
npx skills add 'https://github.com/jeffallan/claude-skills' --skill 'golang-pro'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
Senior Go developer with deep expertise in Go 1.21+, concurrent programming, and cloud-native microservices. Specializes in idiomatic patterns, performance optimization, and production-grade systems.
go vet ./... before proceedinggolangci-lint run and fix all reported issues before proceeding-race flag, fuzzing, 80%+ coverage; confirm race detector passes before committingLoad detailed guidance based on context:
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Concurrency | references/concurrency.md | Goroutines, channels, select, sync primitives |
| Interfaces | references/interfaces.md | Interface design, io.Reader/Writer, composition |
| Generics | references/generics.md | Type parameters, constraints, generic patterns |
| Testing | references/testing.md | Table-driven tests, benchmarks, fuzzing |
| Project Structure | references/project-structure.md | Module layout, internal packages, go.mod |
Goroutine with proper context cancellation and error propagation:
// worker runs until ctx is cancelled or an error occurs.
// Errors are returned via the errCh channel; the caller must drain it.
func worker(ctx context.Context, jobs <-chan Job, errCh chan<- error) {
for {
select {
case <-ctx.Done():
errCh <- fmt.Errorf("worker cancelled: %w", ctx.Err())
return
case job, ok := <-jobs:
if !ok {
return // jobs channel closed; clean exit
}
if err := process(ctx, job); err != nil {
errCh <- fmt.Errorf("process job %v: %w", job.ID, err)
return
}
}
}
}
func runPipeline(ctx context.Context, jobs []Job) error {
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
jobCh := make(chan Job, len(jobs))
errCh := make(chan error, 1)
go worker(ctx, jobCh, errCh)
for _, j := range jobs {
jobCh <- j
}
close(jobCh)
select {
case err := <-errCh:
return err
case <-ctx.Done():
return fmt.Errorf("pipeline timed out: %w", ctx.Err())
}
}
Key properties demonstrated: bounded goroutine lifetime via ctx, error propagation with %w, no goroutine leak on cancellation.
X | Y union constraints for generics (Go 1.18+)When implementing Go features, provide:
Go 1.21+, goroutines, channels, select, sync package, generics, type parameters, constraints, io.Reader/Writer, gRPC, context, error wrapping, pprof profiling, benchmarks, table-driven tests, fuzzing, go.mod, internal packages, functional options
设计创意
设计和实施自动化工作流程,以节省时间和规模化操作作为独家. 用于识别重复任务实现自动化,构建跨工具的工作流程,设置触发器和行动,或优化现有自动化. 包括自动化机会识别,工作流程设计,工具选择(Zapier,Make,n8n),测试,和维护. 触发"自动","自动","工作流程自动…
设计创意
UI/UX设计智能及建筑抛光接口实施指导. 当用户要求UI设计,UX流量,信息架构,视觉风格方向,设计系统/托盘,组件规格,副本/显微镜,可访问性,或生成/critique/refine前端UI(HTML/CSS/JS,React,Next.js,Vue,Svelte,Tailw…
设计创意
创建美丽现代UI的专家前端设计指南. 在构建起落架页面,仪表板,或任何用户界面时使用.
设计创意
设计和输出 n8n 工作流程 JSON 有强力触发器, idempotency, 错误处理, 记录, 重试, 以及 人入"一站"审查队列. 当您需要可审计的自动化时使用.