crush/skills/go-performance/SKILL.md
Analyze and optimize Go program performance. Use when asked to profile Go code, find performance bottlenecks, analyze memory allocations, detect memory leaks, write benchmarks, or optimize CPU/memory usage.
npx skillsauth add meowgorithm/dotfiles go-performanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
go tool pprof| Profile | Test Flag | HTTP Endpoint |
| --------- | ------------- | ------------------------ |
| CPU | -cpuprofile | /debug/pprof/profile |
| Heap | -memprofile | /debug/pprof/heap |
| Goroutine | - | /debug/pprof/goroutine |
# Generate from benchmarks
go test -bench=. -cpuprofile cpu.prof -memprofile mem.prof
# Analyze (interactive or one-liner)
go tool pprof -top -cum cpu.prof
go tool pprof -http=:8080 cpu.prof # web UI with flame graphs
# Memory analysis
go tool pprof -alloc_space -top mem.prof # bytes allocated
go tool pprof -alloc_objects -top mem.prof # allocation count (GC pressure)
# Compare profiles (find leaks/regressions)
go tool pprof -base old.prof new.prof
# Filter results
go tool pprof -focus='mypackage.*' cpu.prof
$GOPATH-base flag to find regressions between profilesEvery time we work on some performance issue, we should:
Then, we create a second benchmark, and a new production function with the changes we want.
This way we can quickly run and compare both benchmarks.
Once we're happy with the changes, we replace the old function and old benchmark with the new ones.
Commit messages should always have the benchmark results in them.
tools
Convert video files (MP4, MOV, WebM, GIF, MKV, AVI, etc.) into animated WebP images with control over fps, size, quality, loop count, and trimming. Use when the user wants to turn a video or screen recording into an animated WebP, create a lightweight demo loop, replace an animated GIF with a smaller WebP, or produce a short clip as a .webp.
development
Convert images between formats (PNG, JPEG, WebP, GIF, BMP, TIFF, AVIF, HEIC) with quality control and resizing. Use when the user needs to convert images, batch process multiple files, optimize image sizes, or convert to modern formats like WebP or AVIF.
tools
Use charmtone colors via the `charmtone` CLI or Go API (`github.com/charmbracelet/x/exp/charmtone`). Triggers when the user asks to use charmtone colors, generate color palettes, get hex values, create CSS/SCSS/Vim color variables, or work with the CharmTone palette in Go code. Also triggers on mentions of specific charmtone color names (Cherry, Charple, Julep, Hazy, etc.) or requests to pick/choose/apply charmtone colors.
testing
Stage and commit changes with a Conventional Commits message. Invoke with /commit "optional scope hint". Inspects the diff, picks an appropriate type and scope, writes a concise message, and commits. Does not push.