Creator · samber
Last updated · Aug 24, 2026
golang-performance
Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need
Sandbox only
Install targets
Codex install prompt
Install the "golang-performance" agent skill from https://github.com/samber/cc-skills-golang/tree/main/skills/golang-performance. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (→ See `samber/cc-skills-golang@golang-benchmark` skill) or debugging workflow (→ See `samber/cc-skills-golang@golang-troubleshooting` skill). After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"samber-golang-performance","task":"Install golang-performance","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Coding and developer agents
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + OpenAI Agents + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add samber/cc-skills-golang --skill golang-performance
Maintenance
fresh
Pushed today
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
3.1K
82/100 Quality · 71/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
Trust, audit, and install readiness at a glance
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Human review before install
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
3.1K GitHub stars
Repo activity
3.1K stars, 204 forks
Maintenance
Pushed today
License
MIT
Install
npx skills add samber/cc-skills-golang --skill golang-performance
Install safety
standard package or runtime install path
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Review before production
- The skill references other skills (golang-benchmark, golang-troubleshooting) that are not included in this repository, which may lead to incomplete guidance if those skills are not available in the agent's environment.
- Quality score needs review
- Permission surface needs review: shell or command execution, filesystem or document access
- Dependency/runtime risk: command execution surface, external package install surface
Install readiness
Install path available
- Install path is available
- Repository evidence is available
- License is declared
- No Agent Proven outcome evidence yet
Agent-readable metadata
Machine-readable decision data for this skill.
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
View technical data+
Agent-readable metadata
Machine-readable decision data for this skill.
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
- Research agents workflows
- Claude Code teams
- teams that value GitHub adoption signals
- Search sources
Suited agents
Install decision
- Command
- npx skills add samber/cc-skills-golang --skill golang-performance
- Policy
- review
- Human review
- yes
Trust and risk
- Trust
- 63/100
- Audit
- 81/100
- Risk level
- Needs review
Outcome loop
- Endpoint
- /api/agent/outcome
- Event ID
- resolve
- Outcomes
- 5
Install command
npx skills add samber/cc-skills-golang --skill golang-performanceDo not use when
- teams that need a vendor-supported SLA
- production agents without a repository review
- The skill references other skills (golang-benchmark, golang-troubleshooting) that are not included in this repository, which may lead to incomplete guidance if those skills are not available in the agent's environment.
- No OpenAgentSkill engagement data yet
- High-risk permission hints: Shell or command execution
Alternative
Frontend Design
171.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
Taste Skill: Anti-Slop Frontend
79.7K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
Canvas Design
171.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
Anthropic Brand Guidelines
171.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
49/100 · Avoid automatic install
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Shell or command execution
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Network access
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Filesystem access
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Database access
Skill may inspect schemas, query databases, or work with persistent stores.
- High-risk permission hints: Shell or command execution
- Dependency or permission surface needs review
Agent resolve plan
Let an agent verify fit before installing.
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20golang-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20golang-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/samber-golang-performance/install
Agent should check
- Task fit and alternatives from Resolve API.
- Audit score, trust score, and safety policy warnings.
- Install target compatibility for Codex, Claude Code, Cursor, or CLI.
Copy prompt
Task: Use golang-performance in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20golang-performance%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/samber-golang-performance/install
Install command: npx skills add samber/cc-skills-golang --skill golang-performance
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Give an agent the install path, not another directory page.
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/samber-golang-performance/install
LLM text format
/api/skills/samber-golang-performance/install?format=text
Find alternatives
/api/skills/search?q=golang-performance&limit=3
Agent prompt
Use golang-performance for this task. Review https://www.openagentskill.com/api/skills/samber-golang-performance/install, then install with: npx skills add samber/cc-skills-golang --skill golang-performanceRegistry metadata
Agent-readable profile for automatic skill selection.
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/samber-golang-performance
LLM text
/api/registry/manifest/samber-golang-performance?format=text
Install alias
/api/registry/install/samber-golang-performance
Recommend
/api/registry/recommend?task=Use%20golang-performance%20in%20an%20agent%20workflow&limit=3
Agent fit
Research agents
Use-case tags
Platforms
Claude Code, OpenAI Agents
Audit report
Needs review · 81/100
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Primary pick for Research agents
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Research agents
Trust label
Production-ready
Install path
Command ready
Use when
- Research agents workflows
- Claude Code teams
- teams that value GitHub adoption signals
Evidence
- 3,056 GitHub stars
- recent repository activity
- install command or GitHub repo available
- 82/100 quality profile
review first
- The skill references other skills (golang-benchmark, golang-troubleshooting) that are not included in this repository, which may lead to incomplete guidance if those skills are not available in the agent's environment.
- No OpenAgentSkill engagement data yet
Implementation path
- 1Install it in a sandbox agent and run one Research agents task end to end.
- 2Compare output quality, latency, and failure behavior against at least one alternative.
- 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.
Trust profile
Sandbox only
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS3.1K GitHub stars
Stars/forks activity
INFO3.1K stars, 204 forks; issue activity unavailable in current metadata
Recent maintenance
PASSPushed today
License clarity
PASSMIT
Good signals
- AI review approved
- Install path is available
- Repository evidence is available
- Recently maintained repository
- Meaningful GitHub adoption signal
- Install command has no obvious high-risk pattern
- Outcome loop is ready but needs first real agent run
Review before install
- The skill references other skills (golang-benchmark, golang-troubleshooting) that are not included in this repository, which may lead to incomplete guidance if those skills are not available in the agent's environment.
- Quality score needs review
- Permission surface needs review: shell or command execution, filesystem or document access
- Dependency/runtime risk: command execution surface, external package install surface
- Permission surface: shell or command execution, filesystem or document access
- No real agent outcome reports yet
- Human review required before unattended installation
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Strong candidate for agent workflows
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Use this skill in these scenarios
Investigate faster
Research agents
I need my agent to research a topic, compare sources, and produce a concise report.
Build and ship code
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Workflow fit
Add it to a complete workflow
Inspect, patch, and verify code
Coding review agent
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
Research report agent
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Operate and verify web apps
Browser QA agent
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Compare before you install
Similar skills that may fit this task.
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Taste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Canvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Anthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
Overview
--- name: golang-performance description: "Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (→ See `samber/cc-skills-golang@golang-benchmark` skill) or debugging workflow (→ See `samber/cc-skills-golang@golang-troubleshooting` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang. metadata: author: samber version: "1.3.0" openclaw: emoji: "🏎" homepage: https://github.com/samber/cc-skills-golang requires: bins: - go - benchstat install: - kind: go package: golang.org/x/perf/cmd/benchstat@latest bins: [benchstat] allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch Bash(benchstat:*) Bash(fieldalignment:*) Bash(staticcheck:*) Bash(curl:*) Bash(fgprof:*) Bash(perf:*) WebSearch AskUserQuestion EnterWorktree ExitWorktree paths: - "**/*.go" ---
**Persona:** You are a Go performance engineer. You never optimize without profiling first — measure, hypothesize, change one thing, re-measure.
**Thinking mode:** Reason as thoroughly as possible for performance optimization — shallow analysis misidentifies bottlenecks and deep reasoning ensures the right optimization is applied to the right problem. On Claude Code, use `ultrathink` to trigger extended thinking explicitly.
**Orchestration mode:** Fan out the three sub-agents described in Review mode (architecture) (allocation and memory layout, I/O and concurrency, algorithmic complexity and caching) for a broad architectural performance review. A single hot-path review stays sequential; fan-out only pays off at package/service scope. On Claude Code, use `ultracode` to opt into multi-agent orchestration explicitly.
**Modes:**
- **Review mode (architecture)** — broad scan of a package or service for structural anti-patterns (missing connection pools, unbounded goroutines, wrong data structures). Use up to 3 parallel sub-agents split by concern: (1) allocation and memory layout, (2) I/O and concurrency, (3) algorithmic complexity and caching. - **Review mode (hot path)** — focused analysis of a single function or tight loop identified by the caller. Work sequentially; one sub-agent is sufficient. - **Optimize mode** — a bottleneck has been identified by profiling. Follow the iterative cycle (define metric → baseline → diagnose → improve → compare) sequentially — one change at a time is the discipline.
**Dependencies:**
- benchstat: `go install golang.org/x/perf/cmd/benchstat@latest`
# Go Performance Optimization
## Core Philosophy
1. **Profile before optimizing** — intuition about bottlenecks is wrong ~80% of the time. Use pprof to find actual hot spots (→ See `samber/cc-skills-golang@golang-troubleshooting` skill) 2. **Allocation reduction yields the biggest ROI** — Go's GC is fast but not free. Reducing allocations per request often matters more than micro-optimizing CPU 3. **Document optimizations** — add code comments explaining why a pattern is faster, with benchmark numbers when available. Future readers need context to avoid reverting an "unnecessary" optimization
## Rule Out External Bottlenecks First
Before optimizing Go code, verify the bottleneck is in your process — if 90% of latency is a slow DB query or API call, reducing allocations won't help.
**Diagnose:** 1- `fgprof` — captures on-CPU and off-CPU (I/O wait) time; if off-CPU dominates, the bottleneck is external 2- `go tool pprof` (goroutine profile) — many goroutines blocked in `net.(*conn).Read` or `database/sql` = external wait 3- Distributed tracing (OpenTelemetry) — span breakdown shows which upstream is slow
**When external:** optimize that component instead — query tuning, caching, connection pools, circuit breakers (→ See `samber/cc-skills-golang@golang-database` skill, [Caching Patterns](references/caching.md)).
## Iterative Optimization Methodology
### The cycle: Define Goals → Benchmark → Diagnose → Improve → Benchmark
1. **Define your metric** — latency, throughput, memory, or CPU? Without a target, optimizations are random 2. **Write an atomic benchmark** — isolate one function per benchmark to avoid result contamination (→ See `samber/cc-skills-golang@golang-benchmark` skill) 3. **Measure baseline** — `go test -bench=BenchmarkMyFunc -benchmem -count=6 ./pkg/... | tee /tmp/report-1.txt` 4. **Diagnose** — use the **Diagnose** lines in each deep-dive section to pick the right tool 5. **Improve** — apply ONE optimization at a time with an explanatory comment 6. **Compare** — `benchstat /tmp/report-1.txt /tmp/report-2.txt` to confirm statistical significance 7. **Commit** — paste the benchstat output in the commit body so reviewers and future readers see the exact improvement; follow the `perf(scope): summary` commit type 8. **Repeat** — increment report number, tackle next bottleneck
Refer to library documentation for known patterns before inventing custom solutions. Keep all `/tmp/report-*.txt` files as an audit trail.
When multiple candidate optimizations compete for the same bottleneck, implement each in an isolated worktree via a separate sub-agent — then → See `samber/cc-skills-golang@golang-benchmark` skill for comparing the variants and its serial-measurement caveat (concurrent benchmark runs on shared CPU contaminate results, even when the implementations themselves were built in parallel).
## Decision Tree: Where Is Time Spent?
| Bottleneck | Signal (from pprof) | Action | | --- | --- | --- | | Too many allocations | `alloc_objects` high in heap profile | [Memory optimization](references/memory.md) | | CPU-bound hot loop | function dominates CPU profile | [CPU optimization](references/cpu.md) | | GC pauses / OOM | high GC%, container limits | [Runtime tuning](references/runtime.md) | | Network / I/O latency | goroutines blocked on I/O | [I/O & networking](references/io-networking.md) | | Repeated expensive work | same computation/fetch multiple times | [Caching patterns](references/caching.md) | | Wrong algorithm | O(n²) where O(n) exists | [Algorithmic complexity](references/caching.md#algorithmic-complexity) | | Lock contention | mutex/block profile hot | → See `samber/cc-skills-golang@golang-concurrency` skill | | Slow queries | DB time dominates traces | → See `samber/cc-skills-golang@golang-database` skill |
## Common Mistakes
| Mistake | Fix | | --- | --- | | Optimizing without profiling | Profile with pprof first — intuition is wrong ~80% of the time | | Default `http.Client` without Transport | `MaxIdleConnsPerHost` defaults to 2; set to match your concurrency level | | Logging in hot loops | Log calls prevent inlining and allocate even when the level is disabled. Use `slog.LogAttrs` | | `panic`/`recover` as control flow | panic allocates a stack trace and unwinds the stack; use error returns | | `unsafe` without benchmark proof | Only justified when profiling shows >10% improvement in a verified hot path | | No GC tuning in containers | Set `GOMEMLIMIT` to 80-90% of container memory to prevent OOM kills | | `reflect.DeepEqual` in production | 50-200x slower than typed comparison; use `slices.Equal`, `maps.Equal`, `bytes.Equal` |
## Deep Dives
- [Memory Optimization](references/memory.md) — allocation patterns, backing array leaks, sync.Pool, struct alignment - [CPU Optimization](references/cpu.md) — inlining, cache locality, false sharing, ILP, reflection avoidance - [I/O & Networking](references/io-networking.md) — HTTP transport config, streaming, JSON performance, cgo, batch operations - [Runtime Tuning](references/runtime.md) — GOGC, GOMEMLIMIT, GC diagnostics, GOMAXPROCS, PGO - [Caching Patterns](references/caching.md) — algorithmic complexity, compiled patterns, singleflight, work avoidance - [Production Observability](references/observability.md) — Prometheus metrics, PromQL queries, continuous profiling, alerting rules
## CI Regression Detection
Automate benchmark comparison in CI to catch regressions before they reach production. → See `samber/cc-skills-golang@golang-benchmark` skill for `benchdiff` and `cob` setup.
## Cross-References
- → See `samber/cc-skills-golang@golang-benchmark` skill for benchmarking methodology, `benchstat`, and `b.Loop()` (Go 1.24+) - → See `samber/cc-skills-golang@golang-troubleshooting` skill for pprof workflow, escape analysis diagnostics, and performance debugging - → See `samber/cc-skills-golang@golang-data-structures` skill for slice/map preallocation and `strings.Builder` - → See `samber/cc-skills-golang@golang-concurrency` skill for worker pools, `sync.Pool` API, goroutine lifecycle, and lock contention - → See `samber/cc-skills-golang@golang-safety` skill for defer in loops, slice backing array aliasing - → See `samber/cc-skills-golang@golang-database` skill for connection pool tuning and batch processing - → See `samber/cc-skills-golang@golang-observability` skill for continuous profiling in production
Technical details
- Version
- 1.0.0
- License
- MIT
- Last updated
- Aug 24, 2026
- Published
- Aug 24, 2026
Decision snapshot
Primary pick
3,056 GitHub stars
Audit
Install review
Install and adoption review
- Security
- 73/100
- Maintenance
- 100/100
- Install
- 92/100
Agent-proven evidence
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
- Success rate
- —
- Recent failure
- —
- Outcomes
- 0
- Output quality
- —
- Failed
- 0
- Not relevant
- 0
- Installs
- 0
- Risk blocked
- 0
- Setup needed
- 0
- Production
- 0
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Add to agent workflow
Free and open source. Review the report before installing into production agents.
Growth loop
Share kit
Scenario-led draft for golang-performance, ready for a manual X post.
golang-performance: Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Cov... 3.1K stars https://www.openagentskill.com/skills/samber-golang-performance?ref=x
Optional reply with install command
Listing + install path for golang-performance: https://www.openagentskill.com/skills/samber-golang-performance?ref=x Install: npx skills add samber/cc-skills-golang --skill golang-performance
Listing source
Registry indexed
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
- Creator
- samber
- Source
- samber/cc-skills-golang
- Indexed by
- OpenAgentSkill community index
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
Claim this skill listing
This Registry indexed listing is attributed to samber but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Add the evidence badges to your README
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/samber-golang-performance)
[](https://www.openagentskill.com/skills/samber-golang-performance)
[](https://www.openagentskill.com/skills/samber-golang-performance/audit)
[](https://www.openagentskill.com/skills/samber-golang-performance)Author
samber
@samber
Tags
Platform fit
Health signals
- GitHub stars
- 3.1K
- Quality score
- 48/100
- Last GitHub push
- Aug 24, 2026
- Framework hints
- Unknown
- OpenAgentSkill views
- 0
- Install copies
- 0
- Outbound clicks
- 0
Community signal
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Trust & safety
Sandbox only
- GitHub adoption3.1K GitHub starsPASS
- Stars/forks activity3.1K stars, 204 forks; issue activity unavailable in current metadataINFO
- Recent maintenancePushed todayPASS
- License clarityMITPASS
- README/SKILL.md completenessMetadata includes enough usage and workflow contextPASS
- Dependency/runtime riskcommand execution surface, external package install surfaceCHECK
Related skills
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
171.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
79.7K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
171.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
171.2K Stars