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

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00019 $0.00667
Sonnet 5.5 $0.00010 $0.00334
Haiku 4.5 $0.00005 $0.00167

Measured 2mo ago against content hash 7ff1ce88bd6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 2mo 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.

.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. 2mo ago 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 (54 stars, last pushed 2mo 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.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

compiler-optimizations-deep compared with skills from other repositories

compiler-optimizations-deep next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
compiler-optimizations-deepOutlineDriven/outline-driven-developmentSkill542mo agoApache-2.0A48Codex
cpp-proJeffallan/claude-skillsSkill13ktodayMITA79Claude Code
memory-safety-patternsrmyndharis/antigravity-skillsSkill2.1k23d agoMITA45Claude Code, Codex
gccmohitmishra786/low-level-dev-skillsSkill30410d agoMITA85Claude Code, Codex
cppcrazyguitar/cppcheatsheetSkill2976d agoMITA0Claude Code
cpp-debuggingdrvoss/everything-copilot-cliSkill49yesterdayMITA42Claude Code
agent-cpp-experttravisjneuman/.claudeSkill115yesterdayMITA88Claude Code