performance-patterns

performance-patterns is a skill for Codex from 2233admin/performance-patterns-skill. It costs 213 tokens per session (1,519 once invoked), scanned A, original, MIT.

A guide to detecting and resolving performance problems in native C and C++ programs on Windows, Linux, WSL, and NVIDIA CUDA systems. CUDA is the technology used to run suitable work on NVIDIA graphics processors.

In plain words
What is it for?
Optimizing or diagnosing CPU and CUDA code with tools such as profilers, performance counters, flame graphs, and NVIDIA analysis utilities.
Why use it?
It helps identify whether slow execution comes from a known code pattern, the CPU, the GPU, the compiler, or the platform and profiling tools. The relevant investigation steps depend on the operating system and hardware.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Optimizing or diagnosing CPU and CUDA code with tools such as profilers, performance counters, flame graphs, and NVIDIA analysis utilities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/2233admin/performance-patterns-skill/performance-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 2233admin/performance-patterns-skill --skill performance-patterns
Clone the repo
git clone --depth 1 https://github.com/2233admin/performance-patterns-skill

Made for: 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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/2233admin/performance-patterns-skill/performance-patterns/github.svg)](https://agentmods.dev/skills/2233admin/performance-patterns-skill/performance-patterns)
Your own site
<a href="https://agentmods.dev/skills/2233admin/performance-patterns-skill/performance-patterns"><img src="https://agentmods.dev/badge/skills/2233admin/performance-patterns-skill/performance-patterns/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 performance-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/2233admin/performance-patterns-skill/performance-patterns"><img src="https://agentmods.dev/badge/skills/2233admin/performance-patterns-skill/performance-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 213 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,519 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.
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.00213 $0.01519
Opus 5.5 $0.00085 $0.00608
Sonnet 5.5 $0.00043 $0.00304
Haiku 4.5 $0.00021 $0.00152

Measured 1mo ago against content hash 03def9e54eb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-patterns 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (patterns/tests/run-mutex-to-rwlock-bench.ps1, scripts/collect-perf-env.ps1, scripts/collect-perf-env.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/performance-patterns/SKILL.md · 129 lines

How it starts

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

Performance patterns skill

A growing catalog of well-known code patterns that cause performance problems, with detection signals and resolution playbooks for each. The core pattern catalog focuses on x86 CPU code, with platform routing for Windows, WSL Linux, native Linux, and CUDA/NVIDIA environments.

The optimization knowledge is portable where the hardware is the same. What changes by platform is the mechanics: profiler vocabulary, compiler flags, debug-info format, synchronization primitives, CPU feature detection, and whether the bottleneck is CPU host code or CUDA device work.


Step 0 — Route the platform

If the user mentions WSL, Linux, CUDA, NVIDIA, GPU, Nsight, driver/toolkit mismatch, containers, or the platform is unclear, read references/platform-routing.md first.

Then load the platform-specific reference:

Platform / symptom Read
Windows native C/C++ CPU performance PORTING-NOTES.md
WSL Linux CPU performance references/wsl-linux.md, then references/linux-native.md
Native Linux CPU performance references/linux-native.md
CUDA/NVIDIA setup or GPU performance references/cuda.md

Use scripts/collect-perf-env.ps1 on Windows and scripts/collect-perf-env.sh inside WSL/native Linux when the environment is the problem or the user has not provided enough toolchain/profiler context.


How to use this skill

Step 1 — Load the right file for your context

Context Read this file
You have profiling output (VTune, AMD uProf, ETW/WPA, perf, flamegraph, Nsight summary, etc.) triggers/from-profile.md
You are reading existing source code and have no profiling data yet triggers/from-source.md
You are writing new performance-sensitive C/C++ or SIMD code guidelines/new-code.md

The trigger files cover all the same patterns; they are separated so you only load what is relevant. guidelines/new-code.md is a write-time checklist — load it instead of a trigger file when generating new code, not reviewing it.

Read the full file on GitHub · 129 lines

Files

What ships with it

37 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. 1mo ago First seen · 129 lines · 213 tokens per session scan A 03def9e54eb6

Subscribe to this mod's changes

performance-patterns is a skill published in the GitHub repository 2233admin/performance-patterns-skill (3 stars, last pushed 3mo ago), licensed MIT. It adds 213 tokens to every session and 1,519 once invoked, about $0.0009 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

linux-phone-porting

Use for every hardware bring-up or debug session that ports mainline Linux to a phone or tablet. Retail-unlock targets require an already-unlocked bootloader; locked retail bootloaders are out of scope. Exploit-booted and firmware-booted targets require a demonstrated boot path; the skill never provides unlock or…

angelwzr/linux-phone-porting · 73 tokens

sglang-diffusion-benchmark-profile

Use when benchmarking denoise latency or profiling a diffusion bottleneck in SGLang.

sgl-project/sglang · 26 tokens

agentsop-prompt-history-inspect

Tool skill — the first move in any LM-debugging session: dump the actual rendered prompt the framework sent to the model, before changing anything else. Activate when an LM call produced an unexpected output (wrong answer, schema violation, refusal, truncation, cost spike, latency spike, infinite loop, "model got…

agentsope/SkillAlchemy · 203 tokens

perf-analyze

Launch and operate this repo's perf-analyze workflow, which DIAGNOSES a TensorRT-LLM serving deployment without applying changes — benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill), nsys + ncu per-kernel…

NVIDIA/TensorRT-LLM · 159 tokens

agentsight-bugfix

A five-stage workflow for fixing bugs in AgentSight: understand the report, reproduce the problem, find its cause, make a small code change, and verify the result. AgentSight is a system that observes and analyses agent activity.

alibaba/anolisa · 67 tokens

cpp

Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…

crazyguitar/cppcheatsheet · 0 tokens