AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Go Performance

skill-caraya-agent-skills-go-performance · by caraya

Go performance skill for profiling, benchmarking, optimization including goroutine efficiency, lock contention, and allocation patterns. Trigger phrases: Go performance, goroutine leak, CPU profile, memory allocation, lock contention, benchmarking, pprof, -bench.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-caraya-agent-skills-go-performance

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-caraya-agent-skills-go-performance)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Go Performance? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Go Performance

Use When

  • Profiling Go applications for CPU, memory, goroutine, or allocation issues.
  • Analyzing lock contention and goroutine efficiency.
  • Benchmarking and optimizing hot paths.

Profiling Tools

  1. Benchmarking
  • go test -bench=. -benchmem to run benchmarks and show memory allocations.
  • go test -bench=. -cpuprofile=cpu.prof to profile benchmark execution.
  • go tool pprof cpu.prof to analyze the profile interactively.
  1. Runtime profiling (pprof)
  • Add import _ "net/http/pprof" to enable profiling endpoint.
  • Access profiles at http://localhost:6060/debug/pprof/.
  • CPU profile: go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30.
  • Heap: go tool pprof http://localhost:6060/debug/pprof/heap.
  • Goroutines: curl http://localhost:6060/debug/pprof/goroutine.
  1. Memory and allocation analysis
  • go test -bench=. -memprofile=mem.prof then go tool pprof mem.prof.
  • Look for alloc bytes vs. bytes in use; high alloc suggests GC pressure.

Checklist

  1. CPU and hot paths
  • Profile to identify bottleneck functions (top of call graph).
  • Check for unnecessary allocations or repeated computations in hot paths.
  • Verify algorithm complexity is appropriate (avoid O(n²) operations).
  1. Memory and allocation
  • High allocation count in benchmarks suggests unnecessary allocations.
  • Use sync.Pool for frequently allocated/freed objects.
  • Preallocate slices and maps when size is known.
  1. Goroutine efficiency
  • Check goroutine count at rest vs. under load; look for leaks.
  • Use -race flag to detect concurrent access to shared memory.
  • Verify goroutine cleanup on application shutdown.
  1. Lock contention
  • Profile with mutex contention tracking: use pprof and look for sync.Mutex.Lock in call graph.
  • If high contention, consider finer-grained locking or lock-free data structures.
  • Use RWMutex if read-heavy; sync.Map for concurrent map access.
  1. Channel and concurrency patterns
  • Avoid goroutine-per-request at scale; use worker pools.
  • Ensure channels are properly closed; leaking goroutines waits on closed channels.

Output Requirements

For each finding provide:

  • Measurement (benchmark results, baseline latency/memory).
  • Profiling evidence (goroutine count, CPU profile, allocation trace).
  • Root cause (algorithm, allocation, lock, goroutine leak).
  • Optimization strategy and expected improvement (e.g., "Reduce allocations by X%").
  • Effort and risk assessment.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.