debug-optimized-builds

debug-optimized-builds is a skill for Codex from OutlineDriven/outline-driven-development. It costs 52 tokens per session (1,572 once invoked), scanned A, original, Apache-2.0.

A guide to debugging programs built with compiler optimization enabled. It explains how optimization can change line locations, hide values, and combine functions in debugger output.

In plain words
What is it for?
Use it to choose debug-friendly compiler settings, inspect inlined code, configure GDB, and diagnose crashes in release or RelWithDebInfo builds.
Why use it?
It helps when GDB, a program debugger, shows “optimized out” values, confusing stack traces, or breakpoints on unexpected lines.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to choose debug-friendly compiler settings, inspect inlined code, configure GDB, and diagnose crashes in release or RelWithDebInfo builds.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/debug-optimized-builds
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 debug-optimized-builds
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 debug-optimized-builds

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/debug-optimized-builds/github.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/debug-optimized-builds)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/debug-optimized-builds"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/debug-optimized-builds/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 debug-optimized-builds

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/debug-optimized-builds"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/debug-optimized-builds.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,572 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.00052 $0.01572
Opus 5 $0.00026 $0.00786
Sonnet 5 $0.00010 $0.00314
Haiku 4.5 $0.00005 $0.00157

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

Security

Grade A, and why

debug-optimized-builds 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 3d 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/debug-optimized-builds/SKILL.md · 121 lines

How it starts

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

Debugging optimized builds

Contract

Field Bound contract
Trigger GDB reports <optimized out>, breakpoints land on wrong lines, a release or RelWithDebInfo build needs debugging, inlined frames confuse the backtrace, or a debuggable optimized build needs configuring.
Authority Read-only. Emits analysis and commands for the operator to run on the target; no file writes, no rollback needed. No remote mutation.
Side effect Diagnostic commands and a verdict in chat. Nothing is written.
Done The optimized-build obstacle is named, the workaround is applied or stated, and program state is observable at the needed point.

Inputs

  1. Build configuration (required): the optimization and debug flags in use, or the CMake build type.
  2. Symptom (required): <optimized out> values, wrong-line breakpoints, inlined frames, or a crash in a release binary.
  3. Rebuild access (optional): needed when the fix is a different optimization level.

Procedure

  1. Pick the build configuration for the goal.

    Goal Flags
    Full debuggability, no optimization -O0 -g
    Debuggable with some optimization -Og -g
    Release with debug info for crash analysis -O2 -g -gsplit-dwarf
    Shipped binary, no symbols -O2 -DNDEBUG

    -Og enables the optimizations that do not interfere with debugging: variables stay where GDB can see them and line numbers stay accurate. GCC and Clang both accept it.

    gcc -Og -g -Wall main.c -o prog
    cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug          # -O0 -g
    cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo # -O2 -g -DNDEBUG
    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release        # -O2 -DNDEBUG
    

    Done when: the flags match the goal.

  2. Handle <optimized out>. The compiler decided the value needs no storage at this point: it lives only in a register, was folded to a constant, or is dead past this line. Workarounds:

    volatile int counter = 0;                    // forces storage; changes semantics, use sparingly
    int counter2 __attribute__((used)) = 0;      // keeps the symbol
    

Read the full file on GitHub · 121 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. 3d ago First seen · 121 lines · 52 tokens per session scan A a9174b88c1f1

Subscribe to this mod's changes

debug-optimized-builds is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 3d ago), licensed Apache-2.0. It adds 52 tokens to every session and 1,572 once invoked, about $0.0003 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.