Use opt_trace() macros for dynamic debugging, profiling, and tiered logging during development.
Install
mkdir -p .claude/skills/trace-taedlar && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14283" && unzip -o skill.zip -d .claude/skills/trace-taedlar && rm skill.zipInstalls to .claude/skills/trace-taedlar
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Add opt_trace() calls for debugging and profiling. Use -t option to enable specific trace tiers and levels.Key capabilities
- →Add opt_trace() calls for debugging
- →Add opt_trace() calls for profiling
- →Enable specific trace tiers via -t option
- →Enable specific trace levels via -t option
- →Specify trace category with TT_ bitflags
How it works
The opt_trace() macro provides printf-style debug logging with dynamic log levels and categories, enabled at runtime via the -t option.
Inputs & outputs
When to use trace
- →Add debug logs
- →Profile memory usage
- →Debug compilation issues
- →Set trace tiers
About this skill
Trace Skill Instructions
The opt_trace() macro provides printf-style debug logging with dynamic log levels and categories. The usage pattern is:
opt_trace(tier, "format string", ...);
tier is a bitflag defined in debug.h that specifies the trace category (e.g., TT_COMPILE, TT_MEMORY) of the log message and verbose level. The verbose level is an integer from 0 (least verbose) to 7 (most verbose) that specifies the importance of the log message. In the opt_trace() call, the tier is specified with the TT_ category bits combined with the verbose level in the lowest 3 bits. For example, TT_COMPILE|1 means a message in the compile category with verbose level 1.
The trace tier is compared against the trace flags specified at runtime via the -t option. If the tier matches the enabled flags and the message's verbose level is less than or equal to the enabled level, the message will be printed to the console.
Running with Tracing Enabled
The opt_trace() logging can be enabled with the -t option when running neolith. For example:
# Enables trace tier 020 at verbose level 1
./neolith -f neolith.conf -t 021
The trace flags are specified as an octal number, where the bits represent the categories and levels to enable. The lowest 3 bits specify the log level (0-7), while the higher bits specify the tiers. In this example, tier 020 corresponds to category TT_COMPILE, and level 1 means only messages with level 0 or 1 will be printed.
The trace tier -1 enables all categories and levels, while 0 disables all tracing.
Trace Levels
- Level 0: reserved for tracing particular events at development stage. Change to 1 or higher before committing code with
opt_trace(). - Level 1: important check-points for the tier, such as completion of a major phase (e.g., end of compilation, start of execution)
- Level 2: significant events within the tier, such as decision points, state changes, or important function calls
- Level 3: detailed information about the flow of execution, such as entering/exiting functions, I/O operations, or memory allocations
- Level 4: verbose information about variable values, intermediate results, or less critical events
- Level 5 to Level 7: increasingly verbose and detailed information, useful for in-depth debugging but may produce a large volume of logs
When not to use it
- →When not debugging C-level code
- →When not profiling C-level code
Limitations
- →Specific to C-level tracing
- →Requires neolith runtime with -t option
- →Trace flags are specified as an octal number
How it compares
This tracing mechanism allows dynamic control over log verbosity and categories at runtime, unlike static logging.
Compared to similar skills
trace side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| trace (this skill) | 0 | 6mo | Review | Intermediate |
| function-call-tracing | 1 | 4mo | Review | Advanced |
| unreal-engine-cpp-pro | 43 | 4mo | No flags | Advanced |
| llvm-tooling | 1 | 6mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
function-call-tracing
gadievron
Instrument C/C++ with -finstrument-functions for execution tracing and Perfetto visualization
unreal-engine-cpp-pro
sickn33
Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.
llvm-tooling
gmh5225
Expertise in LLVM tooling development including Clang plugins, LLDB debugger extensions, Clangd/LSP, and LibTooling. Use this skill when building source code analysis tools, refactoring tools, debugger extensions, or IDE integrations.
static-analysis
gmh5225
Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification. Use this skill when implementing security scanners, bug finders, code quality tools, or performing program analysis research.
memory-safety-patterns
sickn33
Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.
debug-lldb
regenrek
Capture and analyze thread backtraces with LLDB/GDB to debug hangs, deadlocks, UI freezes, IPC stalls, or high-CPU loops across any language or project. Use when an app becomes unresponsive, switching contexts stalls, or you need thread stacks to locate lock inversion or blocking calls.