New to Claude Skills? Learn how to install them →

hkuds on GitHub

LLDB CLI Tool

Free

Streamline your debugging with structured LLDB workflows.

by hkuds46.9k stars on hkuds/cli-anything
2 views
Updated Aug 3, 2026
Get this skill

Free · Opens the source repo

What LLDB CLI Tool does

The LLDB CLI Tool provides a powerful interface for debugging applications using the LLDB Python API. It enables developers to execute structured debugging workflows with JSON output, making it easier to integrate into automated systems or scripts. By utilizing this tool, you can create debug targets from executable paths, manage breakpoints, and inspect various aspects of your application, including threads, frames, and local variables.

With commands designed for creating and managing processes, you can launch or attach to processes by their name or PID. The ability to evaluate expressions in the current frame and read process memory allows for in-depth analysis of your application's state. Additionally, the tool supports loading core dumps and offers an interactive REPL for debugging sessions, which maintains session state across commands, enhancing your workflow.

For those looking to integrate debugging capabilities into AI or editor clients, the tool also features a Debug Adapter Protocol (DAP) server. This allows for a more sophisticated interaction with debugging sessions, supporting commands like setting breakpoints, evaluating expressions, and managing threads in a structured manner. The DAP server is particularly useful for long-running applications, as it can handle asynchronous operations without blocking the client.

Overall, this skill is designed for developers and engineers who require a robust debugging solution that can be easily automated and integrated into their development environments. Whether you are working on native applications or need to troubleshoot complex systems, the LLDB CLI Tool offers the capabilities necessary to streamline your debugging processes.

When to use it

Use this tool when you need to debug applications efficiently, especially in automated environments or when integrating with AI clients.

When not to use it

This tool may not be suitable for basic debugging tasks where a simple GUI debugger suffices or for users unfamiliar with command-line interfaces.

What you can build with it

Automated Debugging Workflows

Integrate the LLDB CLI Tool into CI/CD pipelines to automate debugging tasks, using JSON output for seamless reporting.

In-Depth Application Analysis

Use this tool to inspect threads and memory during complex application runs, allowing for detailed analysis of state.

AI Client Integration

Leverage the DAP server functionality to connect AI clients for enhanced debugging capabilities within editor environments.

How to install LLDB CLI Tool

View source

1. Install with the skills CLI

npx skills add hkuds/cli-anything/skills --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by hkuds

LLDB CLI Skill

Use this CLI to run structured LLDB debugging workflows with JSON output.

Capabilities

  • Create debug target from executable path
  • Launch process or attach by pid/name
  • Manage breakpoints (set/list/delete/enable/disable)
  • Inspect threads, frames, locals, and backtrace
  • Evaluate expressions in current frame
  • Read/find process memory
  • Load core dumps
  • Interactive REPL with persistent session state
  • Formal stdio Debug Adapter Protocol server for AI/editor clients

Quick Commands

cli-anything-lldb --json target create --exe /path/to/exe
cli-anything-lldb --json process launch --arg foo --arg bar
cli-anything-lldb --json breakpoint set --function main
cli-anything-lldb --json breakpoint set --function PluginEntry --allow-pending
cli-anything-lldb --json process continue
cli-anything-lldb --json process interrupt
cli-anything-lldb --json thread backtrace --limit 20
cli-anything-lldb --json frame locals
cli-anything-lldb --json expr "myVar"
cli-anything-lldb --json memory read --address 0x1000 --size 64
cli-anything-lldb --json session close

Debug Adapter Protocol

Use the DAP entry point when an AI client needs a real debug adapter lifecycle instead of shelling out separate CLI commands:

cli-anything-lldb-dap
cli-anything-lldb-dap --profile /path/to/stop-rules.json

or:

cli-anything-lldb dap
cli-anything-lldb dap --profile /path/to/stop-rules.json

The DAP server speaks stdio Content-Length frames and must have exclusive stdout. Do not print logs to stdout around it. Supported requests include initialize, launch, attach, configurationDone, setBreakpoints, setFunctionBreakpoints, threads, stackTrace, scopes, variables, setVariable, evaluate, continue, pause, next, stepIn, stepOut, source, loadedSources, readMemory, modules, exceptionInfo, disassemble, and disconnect.

DAP variables can expose child references for structs/classes/arrays. Use setVariable only while stopped; LLDB may reject writes to optimized-out or read-only values.

For long-running GUI debuggees, DAP continue is non-blocking from the client's point of view: the adapter sends the response and continued event first, then waits for LLDB on a background thread. DAP pause uses LLDB async interrupt. If an agent needs to change breakpoints while the debuggee is running, the adapter interrupts first and waits for a stopped state before mutating LLDB breakpoints; if the target does not stop in time, retry after an explicit pause/stopped cycle.

For GUI apps that stop on debugger-internal startup or shader-JIT breakpoints, launch and attach accept the non-standard boolean argument autoContinueInternalBreakpoints. Enable it only when those internal stops are noise for the task; the adapter emits an output event before auto-continuing. For target-specific noise, prefer structured stop rules through inline stopRules or an external stopRuleProfile/--profile JSON file. Rules can match by reason, module, function, and/or regex, then either stop with clear cliAnythingStop.origin metadata or continue automatically. Use profiles for apps such as C4D so their NVIDIA shader-JIT/startup traps live outside the generic adapter.

DAP stopped events include body.cliAnythingStop.origin: manualPause for a client pause request, internalTrap for a matched internal rule, and debuggee for ordinary program stops. Existing cli-anything-lldb-dap processes do not hot-load new code or profile contents; restart the adapter and re-attach or re-launch before expecting new rules to apply.

Command Groups

target

cli-anything-lldb --json target create --exe /path/to/exe [--arch x86_64]
cli-anything-lldb --json target info

process

cli-anything-lldb --json process launch [--arg ARG ...] [--env KEY=VALUE ...] [--cwd DIR] [--stop-at-entry]
cli-anything-lldb --json process attach --pid 1234
cli-anything-lldb --json process attach --name myapp --wait-for
cli-anything-lldb --json process continue
cli-anything-lldb --json process interrupt
cli-anything-lldb --json process detach
cli-anything-lldb --json process info

breakpoint

cli-anything-lldb --json breakpoint set --function main
cli-anything-lldb --json breakpoint set --file main.c --line 42 --condition "i > 10"
cli-anything-lldb --json breakpoint set --function LateLoadedSymbol --allow-pending
cli-anything-lldb --json breakpoint list
cli-anything-lldb --json breakpoint delete --id 1
cli-anything-lldb --json breakpoint enable --id 1
cli-anything-lldb --json breakpoint disable --id 1

thread / frame / step

cli-anything-lldb --json thread list
cli-anything-lldb --json thread select --id 11111
cli-anything-lldb --json thread backtrace --limit 50
cli-anything-lldb --json frame select --index 0
cli-anything-lldb --json frame info
cli-anything-lldb --json frame locals
cli-anything-lldb --json step over
cli-anything-lldb --json step into
cli-anything-lldb --json step out

expr / memory / core

cli-anything-lldb --json expr "argc"
cli-anything-lldb --json memory read --address 0x1000 --size 128
cli-anything-lldb --json memory find "needle" --start 0x1000 --size 4096
cli-anything-lldb --json core load --path /path/to/core

Agent Usage Notes

  • Prefer --json for all automated flows.
  • Separate non-REPL invocations share a persistent session daemon by default.
  • Use --session-file PATH or CLI_ANYTHING_LLDB_SESSION_FILE to pin an explicit session for a task.
  • Run cli-anything-lldb --json session close when finished so attached processes detach and launched debuggees are cleaned up.
  • Use REPL when a human-like interactive shell is more convenient, not because persistence requires it.
  • Unresolved CLI breakpoints fail by default; pass --allow-pending only when a future module/symbol load is expected.
  • DAP unresolved breakpoints use protocol semantics: verified: false until resolved.
  • DAP continue is non-blocking for long-running GUI processes, and DAP pause uses async interrupt.
  • DAP breakpoint changes during an active continue first interrupt and wait for a stopped state before mutating LLDB.
  • Use DAP stop-rule profiles for app-specific internal traps; restart and re-attach/re-launch after profile changes.
  • memory find uses a chunked scan capped at 1 MiB per call.
  • Call target create before process or core commands.
  • Expect structured errors: {"error": "...", "type": "..."}

Frequently asked questions about LLDB CLI Tool

Similar skills