Debugging Recompositions
rosuH/EasyWatermark
A skill your agent uses to find which Jetpack Compose composables are recomposing and why, using Android Studio Layout Inspector recomposition counts and skip counts, the per-parameter Argument…
Debugging optimized builds skill for diagnosing issues in release code.
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-builds --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .claude/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.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/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .claude/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-buildsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-builds --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .agents/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .agents/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-builds --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .cursor/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .cursor/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mohitmishra786/low-level-dev-skills.git --path skills/debuggers/debug-optimized-builds--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-builds --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .gemini/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .gemini/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-buildsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .github/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .github/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills debug-optimized-builds --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/debuggers/debug-optimized-builds .opencode/skills/debug-optimized-builds && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "debug-optimized-builds" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/debuggers/debug-optimized-builds into .opencode/skills/debug-optimized-builds/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "debug-optimized-builds", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
debug-optimized-buildsDebugging optimized builds skill for diagnosing issues in release code.
Debug Optimized Builds is an agent skill from mohitmishra786/low-level-dev-skills. Debugging optimized builds skill for diagnosing issues in release code. Use when debugging RelWithDebInfo builds, using -Og for debuggable optimization, working with split-DWARF, applying GDB scheduler-locking, reading inlined frames, or understanding "value optimized out" messages. Activates on queries about debugging optimized code, RelWithDebInfo, -Og, inlined functions in GDB, value optimized out, GDB with -O2, or debugging release builds.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Debugging and App store release. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
cmakeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Debug Optimized Builds loads about 1.8k tokens when it runs. Until then it costs about 118 tokens; SKILL.md has 292 words of instructions outside code blocks.
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.
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.
The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 292 words, ~1,806 tokens.
.claude/skills/debug-optimized-builds/SKILL.md (or your agent's skills folder).Guide agents through debugging code compiled with optimization: choosing the right debug-friendly optimization level, reading inlined frames, diagnosing "value optimized out", using split-DWARF for faster debug builds, and applying GDB techniques specific to optimized code.
Goal?
├── Full debuggability, no optimization
│ → -O0 -g (slowest, all vars visible)
├── Debuggable, some optimization (recommended for most dev work)
│ → -Og -g (-Og keeps debug experience good)
├── Release build with debug info (shipped, debuggable crashes)
│ → -O2 -g -gsplit-dwarf (or -O2 -g1 for lighter info)
└── Full release (no debug symbols)
→ -O2 -DNDEBUG-Og: GCC's "debug-friendly optimization" — enables optimizations that don't interfere with debugging. Variables stay in registers where GDB can see them. Line numbers stay accurate. Best balance for development.
# GCC / Clang
gcc -Og -g -Wall main.c -o prog
# CMake build types
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(gdb) print my_variable
$1 = <optimized out>This means the compiler decided the variable's value doesn't need to be stored at this point — it might be:
Workarounds:
// 1. Mark variable volatile (prevents optimization away)
volatile int counter = 0;
// Use sparingly — changes semantics
// 2. Use GCC attribute
int counter __attribute__((used)) = 0;
// 3. Compile problematic TU at lower optimization
// In CMake:
set_source_files_properties(tricky.c PROPERTIES COMPILE_FLAGS "-O0")
// 4. Use -Og instead of -O2 for the whole build
// 5. Look at register values directly
// (gdb) info registers
// (gdb) p/x $rax # value may be in a registerWith optimization, frequently-called small functions get inlined. GDB shows these as extra frames:
(gdb) bt
#0 process_packet (data=0x7ff..., len=<optimized out>)
at network.c:45
#1 0x0000... in dispatch_handler (pkt=0x7ff...)
at handler.c:102
#2 (inlined by) event_loop () at main.c:78
#3 0x0000... in main () at main.c:200
# (inlined by) frames are virtual — they show the call chain
# that was inlined into the actual frame above# Navigate inlined frames
(gdb) frame 2 # jump to the inlined frame
(gdb) up # move up through frames (including inlined)
(gdb) down # move down
# Show all frames including inlined
(gdb) backtrace full
# Set breakpoint inside inlined function
(gdb) break network.c:45 # may hit multiple inlined call sites
(gdb) break process_packet # hits all inline expansionsOptimizers reorder instructions, so the "current line" in GDB may jump around:
# See which instructions map to which source lines
(gdb) disassemble /s function_name # interleaved source and asm
# Step by machine instruction (more accurate in optimized code)
(gdb) si # stepi — one machine instruction
(gdb) ni # nexti — one machine instruction (no step into)
# Show mixed source/asm at current point
(gdb) layout split # TUI mode: source + asm side by side
(gdb) set disassemble-next-line on
# Jump to specific address (when line stepping is unreliable)
(gdb) jump *0x400a2cWith optimization, threads may race in unexpected ways when stepping:
# Lock the scheduler — only the current thread runs while stepping
(gdb) set scheduler-locking on
# Modes:
# off — all threads run freely (default)
# on — only current thread runs while stepping
# step — only current thread runs while single-stepping
# (all run on continue)
# replay — for reverse debugging
# Common debugging session
(gdb) set scheduler-locking step # prevent other threads interfering with step
(gdb) break my_function
(gdb) continue
(gdb) set scheduler-locking on # lock while examining
(gdb) next
(gdb) set scheduler-locking off # unlock to continue normallySplit DWARF offloads debug info to .dwo files, reducing linker input:
# Compile with split DWARF
gcc -g -gsplit-dwarf -O2 -c file.c -o file.o
# Creates: file.o (object) + file.dwo (DWARF sidecar)
# Link — no debug info in final binary, just references
gcc -g -gsplit-dwarf file.o -o prog
# GDB finds .dwo files via the path embedded in the binary
gdb prog # works automatically if .dwo files are next to the binary
# Package all .dwo into a single .dwp for distribution
dwp -o prog.dwp prog # GNU dwp tool
gdb prog # with .dwp in same directory
# CMake
add_compile_options(-gsplit-dwarf)# Show where variables actually live (register vs stack)
(gdb) info locals # all locals (may show <optimized out>)
(gdb) info args # function arguments
# Force evaluation of an expression
(gdb) call (int)my_func(42) # call actual function to get value
# Watch a memory address directly (not a variable name)
(gdb) watch *0x7fffffffe430
# Print memory contents
(gdb) x/10xw $rsp # 10 words at stack pointer (hex)
(gdb) x/s 0x4008a0 # string at address
# Catch crashes without debug symbols
(gdb) bt # backtrace — shows addresses even without symbols
(gdb) info sharedlibrary # shows loaded libs for symbol resolution
# .gdbinit helpers for optimized debugging
# set print pretty on
# set print array on
# set disassembly-flavor intelskills/debuggers/gdb for full GDB session managementskills/debuggers/dwarf-debug-format for DWARF debug info detailsskills/debuggers/core-dumps for post-mortem debugging of optimized crashesskills/compilers/gcc for -Og, -g, and debug flag selection© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/debuggers/debug-optimized-builds of mohitmishra786/low-level-dev-skills.
Open the folder on GitHubat commit bdc5847
Debug Optimized Builds 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Debug Optimized Builds this skillmohitmishra786/low-level-dev-skills | 253 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Debugging RecompositionsrosuH/EasyWatermark | 1.9k | 1 repos | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| Trellis Session Insightmindfold-ai/Trellis | 15k | 4 repos | ~1.7k | Automated safety check: Pass | AGPL-3.0 | |
| Native Data FetchingCherryHQ/cherry-studio-app | 4k | 6 repos | ~2.9k | Automated safety check: Notes | MIT | |
| Debugging Executionsn8n-io/n8n | 207k | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| Aoti Debugpytorch/pytorch | 104k | 1 repos | ~1.7k | Automated safety check: Pass | Custom licence |
rosuH/EasyWatermark
A skill your agent uses to find which Jetpack Compose composables are recomposing and why, using Android Studio Layout Inspector recomposition counts and skip counts, the per-parameter Argument…
mindfold-ai/Trellis
Reach into past AI conversation history through the trellis mem CLI.
CherryHQ/cherry-studio-app
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
n8n-io/n8n
Debug failed or wrong-output workflow executions using executions tools.
pytorch/pytorch
Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.
herdrdev/herdr
Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.
mohitmishra786/low-level-dev-skills
Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.
mohitmishra786/low-level-dev-skills
Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.
mohitmishra786/low-level-dev-skills
Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.
mohitmishra786/low-level-dev-skills
Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.
mohitmishra786/low-level-dev-skills
Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.
mohitmishra786/low-level-dev-skills
GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.
Categories
Debugging optimized builds skill for diagnosing issues in release code. Debug Optimized Builds is an agent skill from mohitmishra786/low-level-dev-skills. Debugging optimized builds skill for diagnosing issues in release code.
Debug Optimized Builds fits situations like: debugging RelWithDebInfo builds; using -Og for debuggable optimization; working with split-DWARF; applying GDB scheduler-locking.
Run `npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a claude-code`. Or copy the skill folder (skills/debuggers/debug-optimized-builds in mohitmishra786/low-level-dev-skills) into .claude/skills/debug-optimized-builds in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a codex`. Or copy the skill folder (skills/debuggers/debug-optimized-builds in mohitmishra786/low-level-dev-skills) into .agents/skills/debug-optimized-builds in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill debug-optimized-builds -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug-optimized-builds, .gemini/skills/debug-optimized-builds, .github/skills/debug-optimized-builds and .opencode/skills/debug-optimized-builds in your project.
Going by SKILL.md and its folder, Debug Optimized Builds needs the command-line tools its instructions call (cmake).
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.
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.
Debug Optimized Builds is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Debug Optimized Builds: Debugging Recompositions (rosuH/EasyWatermark, 1.9k stars), Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars) and Debugging Executions (n8n-io/n8n, 207k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 253 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.
Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.