compiler-optimizations-deep

compiler-optimizations-deep is a skill for Codex from OutlineDriven/outline-driven-development. It costs 48 tokens per session (1,668 once invoked), scanned A, original, Apache-2.0.

A guide to investigating why a compiler does or does not make a program faster, including loop vectorisation, register spills, profile-guided optimisation, and post-link optimisation. A compiler turns source code into machine code, and optimisation changes that code to improve performance.

In plain words
What is it for?
Use it to analyse hot loops, compare optimisation levels or compilers, investigate slow generated code, and plan profile-guided or post-link optimisation work.
Why use it?
It replaces guesswork about compiler flags with evidence from generated assembly, optimisation remarks, profiles, and the exact build command.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to analyse hot loops, compare optimisation levels or compilers, investigate slow generated code, and plan profile-guided or post-link optimisation work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/compiler-optimizations-deep
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 OutlineDriven/outline-driven-development --skill compiler-optimizations-deep
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

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 compiler-optimizations-deep

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/compiler-optimizations-deep.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/compiler-optimizations-deep)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/compiler-optimizations-deep"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/compiler-optimizations-deep.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,668 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.00048 $0.01668
Opus 5 $0.00024 $0.00834
Sonnet 5 $0.00010 $0.00334
Haiku 4.5 $0.00005 $0.00167

Measured yesterday against content hash 7ff1ce88bd6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

compiler-optimizations-deep 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 yesterday.

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.

.devin/skills/compiler-optimizations-deep/SKILL.md · 86 lines

How it starts

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

Compiler optimizations, deep

Contract

Field Bound contract
Trigger A hot loop stayed scalar at -O3, assembly shows spills, -O3 runs slower than -O2, GCC and Clang produce different code for the same source, or a profile-guided or post-link optimization is being planned or produced no gain.
Authority Reversible local: writes only instrumented binaries, profiles, and remark files under a scratch directory named in the report; rollback is deleting that directory. No remote mutation.
Side effect Runs the compiler with remark flags, and when asked, an instrumented build and a training run. Project files are not modified.
Done Each symptom is attributed to a named pipeline stage with the compiler's own remark or output as evidence, and each fix is stated as a source change, a flag, or a workflow step the user can apply.

Inputs

  1. Source and the exact compile command (required): the flags decide which passes run.
  2. Compiler and version (required if not inferrable): clang --version or gcc --version. Grounded current stables are LLVM/Clang 23.1.0 and GCC 16.2; flags below are confirmed against Clang 23.1.0.
  3. The symptom (required): a loop that did not vectorize, spills in a function, a slower -O3, or a PGO or BOLT plan.
  4. A representative workload (required for PGO or BOLT): the input the production binary will see.

Procedure

  1. Place the symptom in the pipeline. After the frontend emits LLVM IR (or GIMPLE in GCC), the mid-level passes run (dead code elimination, GVN, loop-invariant code motion, inlining), then loop passes (unroll, vectorize), then codegen preparation, instruction selection, register allocation, and scheduling. Pass order matters: LICM must hoist an invariant before the vectorizer can prove the loop simple. Done when: the stage is named.

  2. For a loop that did not vectorize, ask the compiler why:

    clang -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize -c foo.c
    

Read the full file on GitHub · 86 lines

Files

What ships with it

1 file 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. yesterday First seen · 86 lines · 48 tokens per session scan A 7ff1ce88bd6e

Subscribe to this mod's changes

compiler-optimizations-deep is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 2d ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,668 once invoked, about $0.0002 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-06.

Related

Other skills, from other repositories

cpp-pro

Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…

Jeffallan/claude-skills · 79 tokens

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

rmyndharis/antigravity-skills · 45 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

cpp-debugging

Use when a C++ failure involves memory lifetime, undefined behavior, native crashes, or debugger-only state — debug with symbols, sanitizers, and platform-native debuggers before patching symptoms.

drvoss/everything-copilot-cli · 42 tokens

gcc

GCC compiler skill for C/C++ projects. Use when selecting optimization levels, warning flags, debug builds, LTO, sanitizer instrumentation, or diagnosing compilation errors with GCC. Covers flag selection for debug vs release, ABI concerns, preprocessor macros, profile-guided optimization, and integration with build…

mohitmishra786/low-level-dev-skills · 85 tokens

cuopt-developer

Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.

NVIDIA/skills · 47 tokens