goperf-skill

Recommendations and best practices for writing performant Go code from goperf.dev. Use this skill whenever the user is working in Go and care about speed, resources, or scale—including optimizing or reviewing APIs, services, or pipelines; reducing allocations, GC pressure, or memory; improving networking (HTTP, Transport, TCP, gRPC, connection reuse, 10k connections); tuning hot paths, sync.Pool, preallocation, or struct layout; or when they mention goperf, "Go performance", latency, throughput, or profiling. Use it even if they do not explicitly say "optimize" or "performance"—e.g. "my Go service is slow", "too many allocations", "HTTP client is opening too many connections", or "how do I make this faster" all warrant this skill.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "goperf-skill" with this command: npx skills add newtonmunene99/goperf-skill/newtonmunene99-goperf-skill-goperf-skill

Go Performance (goperf)

Overview

Apply measurement-driven Go performance patterns from the Go Optimization Guide. Measure first (benchmarks, pprof, escape analysis); then apply targeted patterns. Focus on production workloads: backend services, pipelines, and systems where latency and throughput matter.

Workflow

  1. Establish a baseline — Add or run benchmarks; profile under load with pprof (CPU, memory). Optimizing without numbers often targets the wrong place; a baseline makes the impact of changes observable and avoids wasted effort.
  2. Identify the bottleneck — Allocations/GC, I/O, scheduler, or networking. Use go build -gcflags="-m" ./pkg to see what escapes to the heap.
  3. Apply patterns from references — Use the appropriate reference file below; all recommendations are self-contained in this skill. Each reference is organized by section with tables and code examples; jump to the section that matches the bottleneck. For extended articles, see goperf.dev.

When to Read Which Reference

  • Memory, allocations, GC, concurrency, I/O, compiler flags, escape analysis → Read references/common-patterns.md (see its table of contents to find the right section).
  • HTTP, Transport tuning, connection reuse, 10k+ connections, TLS, DNS, load shedding, backpressure, TCP/HTTP/2/gRPC/QUIC → Read references/networking.md (see its table of contents to find the right section).

Quick Cues

  • Connection reuse (HTTP): Drain response body before closing (e.g. io.Copy(io.Discard, resp.Body) then resp.Body.Close()); otherwise the client will not reuse connections.
  • Escape analysis: Run go build -gcflags="-m" ./path/to/pkg to see which values move to the heap; reduce escapes on hot paths to lower GC pressure.

Edge cases and examples

  • Optimizing without data: Avoid suggesting pooling, prealloc, or GOGC changes until the user has (or is guided to) benchmarks or pprof evidence—suggestions without data often target the wrong bottleneck and add complexity without benefit. Recommend measuring first.
  • Networking: When suggesting Transport or connection changes, remind to drain response bodies for connection reuse and to tune timeouts and limits to match the workload; otherwise connections may not be reused or may be held too long.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated