rmx: Skill for Claude Code

.agents/skills/golang-performance/SKILL.md

golang-performance is a skill for Claude Code from braswelljr/rmx. It costs 130 tokens per session (2,038 once invoked), scanned A, a copy of golang-performance, MIT.

A guide for improving the speed and memory use of Go programs after profiling or benchmarks reveal a bottleneck.

In plain words
What is it for?
Use it to review Go services and packages, investigate slow functions or loops, and improve allocations, CPU use, memory layout, garbage collection, caching, pooling, or concurrency.
Why use it?
It helps connect a measured performance problem to suitable changes, while keeping optimization focused on evidence rather than guesses.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

This is braswelljr/rmx's own configuration. It tells Claude Code how to work on rmx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rmx configures →

Reuse

Borrowing it

Nothing to install: this file belongs to braswelljr/rmx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/braswelljr/rmx/main/.agents/skills/golang-performance/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/braswelljr/rmx

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for golang-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/braswelljr/rmx/golang-performance/github.svg)](https://agentmods.dev/skills/braswelljr/rmx/golang-performance)
Your own site
<a href="https://agentmods.dev/skills/braswelljr/rmx/golang-performance"><img src="https://agentmods.dev/badge/skills/braswelljr/rmx/golang-performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for golang-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/braswelljr/rmx/golang-performance"><img src="https://agentmods.dev/badge/skills/braswelljr/rmx/golang-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.02038
Opus 5 $0.00065 $0.01019
Sonnet 5 $0.00026 $0.00408
Haiku 4.5 $0.00013 $0.00204

Measured 9d ago against content hash cfd50ca2ec66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

golang-performance scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

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 AskUser
Origin

This is a copy

94% identical to golang-performance — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/golang-performance/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Persona: You are a Go performance engineer. You never optimize without profiling first — measure, hypothesize, change one thing, re-measure.

Thinking mode: Use ultrathink for performance optimization. Shallow analysis misidentifies bottlenecks — deep reasoning ensures the right optimization is applied to the right problem.

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

Read the full file on GitHub · 116 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 116 lines · 130 tokens per session scan A cfd50ca2ec66

Subscribe to this mod's changes

golang-performance is a skill published in the GitHub repository braswelljr/rmx (5 stars, last pushed 20d ago), licensed MIT. It adds 130 tokens to every session and 2,038 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 94% identical to golang-performance, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

robotgo-flow

Use when building YAML-driven Windows RPA workflows in Go — step-by-step desktop automation with image template matching, interactive recording mode, hotkey triggers. RobotGo-Flow: YAML-based Windows RPA framework built on RobotGo.

znlgis/opengis-skills · 50 tokens

electron-expert

Expert in Electron framework, desktop app development, IPC, and cross-platform packaging. Use when the user mentions desktop, Node.js, cross platform, Windows, macOS, or Linux, or when the task involves Electron Architecture, Process Types, IPC Communication, or App Lifecycle.

personamanagmentlayer/pcl · 59 tokens

add-cobra-version

Add a version subcommand with build metadata to an existing Cobra-based Go CLI. Use when the user says "add a version subcommand", "add the version command", "wire up version, commit, and date", "add build metadata to version", "add a /version command to this CLI", "make the version command print commit and build…

cboone/agent-harness-plugins · 176 tokens

scaffold-go-cli

Scaffold a complete Go CLI project with Cobra, GoReleaser, GitHub Actions CI/CD, Homebrew tap publishing, and Makefile. Use when the user says "scaffold a Go CLI", "new Go CLI project", "create a Go CLI", "start a Go CLI", "bootstrap a Go CLI", or starts a Go command-line tool from scratch. Optionally adds Viper for…

cboone/agent-harness-plugins · 136 tokens

scaffold-go-library

Scaffold a Go library project with GoReleaser changelog releases, golangci-lint, GitHub Actions CI/CD (multi-version Go matrix), and Makefile. Use when the user says "scaffold a Go library", "new Go library", "create a Go package", "start a Go library", "bootstrap a Go library", or starts a Go module that exposes a…

cboone/agent-harness-plugins · 122 tokens

add-goreleaser-homebrew

Add GoReleaser configuration and a GitHub Actions release workflow to an existing Go CLI project with Homebrew tap publishing. Use when the user says "add goreleaser", "set up goreleaser", "add Homebrew tap publishing", "publish to Homebrew", "set up release workflow", "add release automation for Go", or wants a Go…

cboone/agent-harness-plugins · 149 tokens