Official agent skill

x86 C and C++ Performance Patterns

by intel in intel/intel-performance-skills

Spots and fixes known x86 C and C++ performance problems from source or profiler output, such as false sharing, missing restrict and narrow SIMD.

OfficialCustom licenceAuto-check passedDevelopment

Install x86 C and C++ Performance Patterns

skills CLI
$ npx skills add intel/intel-performance-skills --skill performance-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intel/intel-performance-skills performance-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intel/intel-performance-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/performance-patterns .claude/skills/performance-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
performance-patterns
GitHub stars
332
Token cost
~903 tokens
SKILL.md length
326 words
Files
33 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
Custom licence

At a glance

Spots and fixes known x86 C and C++ performance problems from source or profiler output, such as false sharing, missing restrict and narrow SIMD.

  • Works in 4 steps: Load the right file for your context → Identify the matching pattern → Read the pattern detail file → …
  • Reading a perf or VTune profile and finding which known pattern it shows
  • SKILL.md covers How to use this skill and Reusable library modules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

A catalog of well-known performance problems in x86, C and C++ code, each with detection signals and a step-by-step resolution. The skill routes by context: profiling output from perf, VTune or flamegraphs goes to triggers/from-profile.md, existing source with no profile goes to triggers/from-source.md, and writing new performance-sensitive or SIMD code goes to guidelines/new-code.md.

Patterns include serial accumulator loops, TTAS spinlocks, narrow SIMD that could be wider, false sharing, per-CPU statistics, missing vzeroupper or restrict, condition-variable thundering herd, mutex-to-rwlock changes, CPU dispatch, library version upgrades, fast CRC32C and known algorithms such as cosine similarity, Hamming and Jaccard distance, plus x86-simd-sort. When a pattern matches, the agent reads that pattern's file instead of fixing from memory, applies the fix and runs its verification method.

Several patterns can apply at once, so all plausible matches are checked first. Reusable library modules cover runtime CPU dispatch with target_clones or __builtin_cpu_supports, a zipper algorithm for widening vector registers, and CRC32C implementations in portable, SSE and AVX-512 variants.

When your agent uses it

  • Reading a perf or VTune profile and finding which known pattern it shows
  • Reviewing C or C++ source for false sharing or serial reduction loops
  • Writing a fast dot product, reduction or CRC32C routine
  • Adding runtime CPU dispatch to a function with several vectorized variants

Example prompts

  • “This perf annotate output shows a hot cmpxchg cluster. Which performance pattern fits?”
  • “Review this C++ reduction loop for performance problems before we ship it.”
  • “Write a CPU-dispatched dot product with an AVX-512 path and a portable fallback.”
  • “Our worker threads wake all waiters on every notify. Is this the thundering herd pattern?”

Requirements

  • C or C++ source, or profiler output from perf, VTune or flamegraphs
  • A compiler and benchmark setup to verify fixes

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Load the right file for your context
  2. Identify the matching pattern
  3. Read the pattern detail file
  4. Apply the fix and verify

What it can do on your machine

Read from SKILL.md and the folder at commit 3e33aec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

x86 C and C++ Performance Patterns loads about 903 tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 236 tokens; SKILL.md has 326 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~236
When it runs · the whole SKILL.md, loaded when a task matches
~903
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 326 words (~903 tokens).

“A growing catalog of well-known code patterns that cause performance problems, with detection signals and resolution playbooks for each.”

— opening of SKILL.md by intel, Custom licence
name
performance-patterns

Read the full SKILL.md on GitHub

Files

SKILL.md and 32 other files (references) in skills/performance-patterns of intel/intel-performance-skills.

  • SKILL.md
  • design.md
  • guidelines/new-code.md
  • library/cpu-dispatch.md
  • library/crc32c_avx512_vpclmulqdq.c
  • library/crc32c_portable.c
  • library/crc32c_sse42.c
  • patterns/cold-path-annotation.md
  • patterns/cv-thundering-herd.md
  • patterns/false-sharing.md
  • patterns/fast-crc32c-impl.md
  • patterns/fast-crc32c.md
  • patterns/library-version-upgrade.md
  • patterns/missing-restrict.md
  • patterns/missing-vzeroupper.md
  • patterns/mutex-to-rwlock.md
  • patterns/parallel-accumulator.md
  • patterns/per-cpu-stats.md
  • … and 15 more

Open the folder on GitHubat commit 3e33aec

Compare with similar skills

x86 C and C++ Performance Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

x86 C and C++ Performance Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
x86 C and C++ Performance Patterns this skillintel/intel-performance-skills332—~903Automated safety check: PassCustom licence
ExecuTorch Binary Size Reductionpytorch/executorch5.1k—~793Automated safety check: PassCustom licence
Cppcrazyguitar/cppcheatsheet290—~1.8kAutomated safety check: PassMIT
Ripwire Optimization Remarks Triageredhat-et/ripwire2.4k—~3.1kAutomated safety check: NotesApache-2.0
Cpp Prodavila7/claude-code-templates32k7 repos~467Automated safety check: PassMIT
Interval Profiling Performance AnalyzerArabelaTso/Skills-4-SE253—~1.7kAutomated safety check: NotesApache-2.0

Similar skills

  • Measures and shrinks the ExecuTorch runtime binary by building a size test, analyzing it with bloaty and landing each reduction as its own pull request.

    5.1k GitHub stars~793 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Cpp

    crazyguitar/cppcheatsheet

    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.

    290 GitHub stars~1.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Contributor guide for reading clang optimization remarks while editing ripwire's own C++, deciding between a source change and a build change such as LTO or PGO.

    2.4k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Cpp Pro

    davila7/claude-code-templates

    Write idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms.

    32k GitHub starsUsed in 7 repos~467 tokens
    DevelopmentAuto-check passed
  • Profile programs at the function/method level to identify performance hotspots, bottlenecks, and optimization opportunities.

    253 GitHub stars~1.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • PlotJuggler Live Verification

    PlotJuggler/PlotJuggler

    Confirms that a change to PlotJuggler 4 really works in the running app by proving the rebuild, launching with real data and measuring the result.

    6.2k GitHub stars~956 tokensUpdated 6 days ago
    Testing & QAAuto-check passed

More from intel/intel-performance-skills

  • Linux perf Profiling Guide

    intel/intel-performance-skills

    Official

    Guides perf-based profiling of Linux programs through five flows: quick hardware counters, hotspot profiling, cache contention, core-scaling, and a report.

    332 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check: notes
  • Phoronix Test Suite Benchmarks

    intel/intel-performance-skills

    Official

    Installs, runs, parses and optimizes Phoronix Test Suite benchmarks, saving scores and comparing results before and after code changes.

    332 GitHub stars~2.4k tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about x86 C and C++ Performance Patterns

What does x86 C and C++ Performance Patterns do?

Spots and fixes known x86 C and C++ performance problems from source or profiler output, such as false sharing, missing restrict and narrow SIMD. A catalog of well-known performance problems in x86, C and C++ code, each with detection signals and a step-by-step resolution.md.

When should I use x86 C and C++ Performance Patterns?

x86 C and C++ Performance Patterns fits situations like: reading a perf or VTune profile and finding which known pattern it shows; reviewing C or C++ source for false sharing or serial reduction loops; writing a fast dot product, reduction or CRC32C routine; adding runtime CPU dispatch to a function with several vectorized variants.

How do I install x86 C and C++ Performance Patterns in Claude Code?

Run `npx skills add intel/intel-performance-skills --skill performance-patterns -a claude-code`. Or copy the skill folder (skills/performance-patterns in intel/intel-performance-skills) into .claude/skills/performance-patterns in your project. Claude Code loads it when a task matches its description.

How do I install x86 C and C++ Performance Patterns in Codex?

Run `npx skills add intel/intel-performance-skills --skill performance-patterns -a codex`. Or copy the skill folder (skills/performance-patterns in intel/intel-performance-skills) into .agents/skills/performance-patterns in your project. Codex loads it when a task matches its description.

Can I use x86 C and C++ Performance Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intel/intel-performance-skills --skill performance-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-patterns, .gemini/skills/performance-patterns, .github/skills/performance-patterns and .opencode/skills/performance-patterns in your project.

What does x86 C and C++ Performance Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: x86 C and C++ Performance Patterns is instructions for the agent only. Our summary lists: C or C++ source, or profiler output from perf, VTune or flamegraphs; A compiler and benchmark setup to verify fixes.

Does x86 C and C++ Performance Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is x86 C and C++ Performance Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does x86 C and C++ Performance Patterns use?

x86 C and C++ Performance Patterns has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does x86 C and C++ Performance Patterns use?

About 903 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.

What are the alternatives to x86 C and C++ Performance Patterns?

Skills that share tags, products or a category with x86 C and C++ Performance Patterns: ExecuTorch Binary Size Reduction (pytorch/executorch, 5.1k stars), Cpp (crazyguitar/cppcheatsheet, 290 stars), Ripwire Optimization Remarks Triage (redhat-et/ripwire, 2.4k stars) and Cpp Pro (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains x86 C and C++ Performance Patterns?

intel (a GitHub organization, an official publisher) maintains it in intel/intel-performance-skills, which has 332 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 28, 2026.

Source: intel/intel-performance-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.