performance

performance is a skill for Claude Code, Codex from Insajin/autopus-adk. It costs 19 tokens per session (883 once invoked), scanned A, original, MIT.

A guide to measuring and improving the speed and resource use of Go programs. It explains benchmarks and profiling, which records where a program spends time or memory.

In plain words
What is it for?
Use it to write Go benchmarks, measure memory allocations, collect CPU and heap profiles, inspect goroutines, and evaluate optimization changes.
Why use it?
It replaces guesswork with measurements and helps identify slow functions, excessive memory allocation, and resource-heavy parts of an application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -bench=. -benchmem ./pkg/....

Good fit Use it to write Go benchmarks, measure memory allocations, collect CPU and heap profiles, inspect goroutines, and evaluate optimization changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Insajin/autopus-adk
agentmods
npx agentmods add skills/insajin/autopus-adk/performance

Made for: Claude Code, Codex.

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 performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/insajin/autopus-adk/performance.svg)](https://agentmods.dev/skills/insajin/autopus-adk/performance)
Your own site
<a href="https://agentmods.dev/skills/insajin/autopus-adk/performance"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00019 $0.00883
Opus 5 $0.00010 $0.00441
Sonnet 5 $0.00004 $0.00177
Haiku 4.5 $0.00002 $0.00088

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

Security

Grade A, and why

performance scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.omp/skills/performance/SKILL.md · 146 lines

How it starts

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

Performance Skill

Go 애플리케이션의 성능을 측정하고 최적화하는 스킬입니다.

벤치마크 작성

func BenchmarkFunction(b *testing.B) {
    // 셋업 (타이머에 포함되지 않음)
    data := prepareTestData()
    b.ResetTimer()

    for i := 0; i < b.N; i++ {
        Function(data)
    }
}

// 메모리 할당 추적
func BenchmarkFunction_Allocs(b *testing.B) {
    b.ReportAllocs()
    for i := 0; i < b.N; i++ {
        Function(input)
    }
}

실행:

go test -bench=. -benchmem ./pkg/...
go test -bench=BenchmarkFunction -count=5 -benchtime=3s ./...

pprof 프로파일링

CPU 프로파일

import _ "net/http/pprof"

// 서버에 추가
go func() {
    http.ListenAndServe("localhost:6060", nil)
}()
# 30초 CPU 프로파일 수집
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30

# 힙 메모리 프로파일
go tool pprof http://localhost:6060/debug/pprof/heap

# 고루틴 프로파일
go tool pprof http://localhost:6060/debug/pprof/goroutine

테스트에서 프로파일

go test -cpuprofile=cpu.out -memprofile=mem.out -bench=. ./...
go tool pprof -http=:8080 cpu.out

일반적인 최적화 패턴

메모리 할당 줄이기

// Before: 반복 할당
func process(items []Item) []Result {
    var results []Result
    for _, item := range items {
        results = append(results, transform(item))
    }
    return results
}

// After: 사전 할당
func process(items []Item) []Result {
    results := make([]Result, 0, len(items))
    for _, item := range items {
        results = append(results, transform(item))
    }
    return results
}

sync.Pool 활용

var bufPool = sync.Pool{
    New: func() interface{} {
        return new(bytes.Buffer)
    },
}

func process() {
    buf := bufPool.Get().(*bytes.Buffer)
    defer bufPool.Put(buf)
    buf.Reset()
    // buf 사용
}

문자열 연결

// Bad: O(n^2) 할당
s := ""
for _, item := range items {
    s += item.String()
}

// Good: O(n)
var b strings.Builder
for _, item := range items {
    b.WriteString(item.String())
}
s := b.String()

캐싱 전략

전략 용도 구현
In-memory 읽기 빈도 높은 소량 데이터 sync.Map, LRU 캐시
Redis 분산 캐시, 세션 go-redis
HTTP 캐시 API 응답 캐싱 ETag, Cache-Control

Read the full file on GitHub · 146 lines

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. 4d ago First seen · 146 lines · 19 tokens per session scan A 2730cc151e72

Subscribe to this mod's changes

performance is a skill published in the GitHub repository Insajin/autopus-adk (110 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 883 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

go

Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…

ericrisco/rsc-harness · 86 tokens

goga-cell-go

Golang rules for implementing CODEMANIFEST contracts.

qarium/goga · 14 tokens

swiftui-view-refactor

Refactor a SwiftUI view file for consistent property ordering, MV patterns, view model handling, and Observation usage; split an oversized body via same-file computed view properties or MARK-organized extensions. Use when asked to clean up a SwiftUI view's layout, reorder its properties, or standardize…

patrickserrano/lacquer · 103 tokens

watchos-development

Use when building or reviewing a watchOS app or WatchKit extension — app structure and independent-app configuration, Watch Connectivity / companion-app sync, complications and Smart Stack widgets, controls or Live Activities on watch, background refresh and networking limits, watchOS-specific SwiftUI design…

patrickserrano/lacquer · 71 tokens

golang

Go development environment. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized golang work when listed in TEAM.yaml or explicitly requested.

rogue-dev-studio/ai-agents-rogue · 41 tokens

swift-concurrency

Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3)…

patrickserrano/lacquer · 158 tokens