gdb

gdb is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 93 tokens per session (1,540 once invoked), scanned A, original, MIT.

Guidance for using GDB, a debugger for C and C++ programs, to pause execution, inspect state, and investigate failures.

In plain words
What is it for?
Use it to set breakpoints, step through code, inspect variables and memory, debug remote targets, replay recorded execution, and examine core dumps.
Why use it?
It helps find the cause of crashes, hangs, incorrect values, and difficult multithreaded bugs instead of relying only on log messages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 198repo +5 2mo ago A scan Socket: passSnyk: passSkillSpector: pass 93 tokens original MIT

Good fit Use it to set breakpoints, step through code, inspect variables and memory, debug remote targets, replay recorded execution, and examine core dumps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/gdb
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 mohitmishra786/low-level-dev-skills --skill gdb
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, 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 gdb

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gdb/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gdb)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gdb"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gdb/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 gdb

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gdb"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gdb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,540 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
  • Socket pass 18 Mar 2026
  • Snyk pass 21 Feb 2026
  • 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.00093 $0.01540
Opus 5 $0.00046 $0.00770
Sonnet 5 $0.00019 $0.00308
Haiku 4.5 $0.00009 $0.00154

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

Security

Grade A, and why

gdb 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 9d 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.

skills/debuggers/gdb/SKILL.md · 187 lines

How it starts

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

GDB

Purpose

Walk agents through GDB sessions from first launch to advanced workflows: crash diagnosis, reverse debugging, remote debugging, and multi-thread inspection.

Triggers

  • "My program segfaults / crashes — how do I debug it?"
  • "How do I set a breakpoint on condition X?"
  • "How do I inspect memory / variables in GDB?"
  • "How do I debug a remote embedded target?"
  • "GDB shows ?? frames / no source"
  • "How do I replay a bug deterministically?" (record/replay)

Workflow

1. Prerequisite: compile with debug info

Always compile with -g (GCC/Clang). Use -Og or -O0 for most debuggable code.

gcc -g -Og -o prog main.c

For release builds: use -g -O2 and keep the binary with symbols (strip separately with objcopy).

2. Start GDB

gdb ./prog                          # load binary
gdb ./prog core                     # load with core dump
gdb -p 12345                        # attach to running process
gdb --args ./prog arg1 arg2         # pass arguments
gdb -batch -ex 'run' -ex 'bt' ./prog  # non-interactive (CI)

3. Essential commands

Command Shortcut Effect
run [args] r Start the program
continue c Resume after break
next n Step over (source line)
step s Step into
nexti ni Step over (instruction)
stepi si Step into (instruction)
finish Run to end of current function
until N Run to line N
return [val] Force return from function
quit q Exit GDB

4. Breakpoints and watchpoints

break main                          # break at function
break file.c:42                     # break at line
break *0x400abc                     # break at address
break foo if x > 10                 # conditional break
tbreak foo                          # temporary breakpoint (fires once)
rbreak ^mylib_.*                    # regex breakpoint on all matching functions

watch x                             # watchpoint: break when x changes
watch *(int*)0x601060               # watch memory address
rwatch x                            # break when x is read
awatch x                            # break on read or write

info breakpoints                    # list all breakpoints
delete 3                            # delete breakpoint 3
disable 3                           # disable without deleting
enable 3

Read the full file on GitHub · 187 lines

Files

What ships with it

2 files 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. 9d ago First seen · 187 lines · 93 tokens per session scan A 3f0043a3b255

Subscribe to this mod's changes

gdb is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (198 stars, last pushed 2mo ago), licensed MIT. It adds 93 tokens to every session and 1,540 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

debugging

Systematically diagnose and fix software bugs by analyzing error messages, stack traces, logs, and runtime behavior across multiple languages. Use when the user requests debugging or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 41 tokens

log-analyzer

Parse agent log files to identify error patterns, rate limit hits, timeout clusters, tool failures, and component-level error counts. Produces a structured anomaly report. Cron-compatible — silent if no issues, alert digest if anomalies found. Also computes per-tool failure rates from a Hermes profile state.db…

moonlight-lupin/agent-skills · 69 tokens

error-handler

Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead, timeout), error budgets/SLOs with burn rate alerts, and production incident triage. Use when user asks to implement error…

EliasOulkadi/shokunin · 125 tokens

performance-profiler

Performance profiling and optimization for web apps — Core Web Vitals (LCP, INP, CLS), Lighthouse audits, bundle analysis, backend profiling (CPU, memory, DB queries), N+1 detection, caching strategies (Redis, CDN, HTTP), and performance budgets. Use when user asks to improve performance, run Lighthouse audit, profile…

EliasOulkadi/shokunin · 118 tokens

scientific-debugging

A method for debugging software by observing the problem, forming possible explanations, running small experiments, and then fixing and checking the result.

VidyFoo/antigravity-skill-engine · 36 tokens

diagnosing-ml-failures

Isolate the root cause of ML performance drops, inconsistent evaluations, prediction errors, and training-serving mismatches across data, labels, splits, pipelines, models, metrics, and runtime behavior. Use when investigating a reproducible failure or regression, not routine model selection or general performance…

aiopshwang/data-analysis-ml-agent-skills · 65 tokens