Borrowing it
Nothing to install: this file belongs to r3bl-org/r3bl-open-core. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/r3bl-org/r3bl-open-core/main/.agents/skills/write-structured-tracing/SKILL.mdgit clone --depth 1 https://github.com/r3bl-org/r3bl-open-coreWrote 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.
[](https://agentmods.dev/skills/r3bl-org/r3bl-open-core/write-structured-tracing)<a href="https://agentmods.dev/skills/r3bl-org/r3bl-open-core/write-structured-tracing"><img src="https://agentmods.dev/badge/skills/r3bl-org/r3bl-open-core/write-structured-tracing.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.00752 |
| Opus 5 | $0.00008 | $0.00376 |
| Sonnet 5 | $0.00003 | $0.00150 |
| Haiku 4.5 | $0.00002 | $0.00075 |
Grade A, and why
write-structured-tracing 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write Structured Tracing
This skill documents the project's standard for writing tracing logs (tracing::info!, tracing::debug!, etc.). It ensures logs are easily filterable, consistently formatted, and don't affect performance when disabled.
1. Gating Behind Debug Flags
All tracing::*! calls must be gated behind a specific debug flag from tui/src/tui/mod.rs (or similar location) using the .then(|| { ... }) pattern. This ensures the tracing macro and any string allocations are completely bypassed when the flag is disabled.
Choosing the right flag (Scope Specificity): Make sure the flag you use is specifically scoped to the module or subsystem you are debugging. This scope can be narrow or broad depending on the requirements.
- Do NOT reuse a broad orchestrator flag (e.g.,
DEBUG_TUI_PTY_MUX) for a microscopic, high-volume subsystem (like a byte-stream parser). Doing so would spam the orchestrator logs. - If a suitable module-specific flag does not exist, create a new one (e.g.,
DEBUG_TUI_VT100_PARSER) to ensure developers can isolate and filter logs effectively without overwhelming the IO overhead.
crate::DEBUG_TUI_MOD.then(|| {
// ... tracing call ...
});
2. The // % is Display, ? is Debug. Comment
You MUST add the exact line comment // % is Display, ? is Debug. directly above every tracing::*! invocation. This serves as a quick syntax reminder.
3. Structured Fields and message
Do not use unstructured string formatting (e.g., tracing::info!("Hello {}", name)). Instead, use structured fields with an explicit message key that identifies the context (e.g., the struct and method name).
crate::DEBUG_TUI_MOD.then(|| {
// % is Display, ? is Debug.
tracing::info! {
message = "ComponentName::method_name",
status = "Something happened",
};
});
4. Using inline_string! vs format! for Complex Formatting
When you need to format complex strings within a tracing field, bind it to a field using the % (Display) modifier and follow this rule:
- If the resulting string will be <= 16 bytes, use the
inline_string!macro to stack-allocate it. - If the resulting string will be > 16 bytes, use the standard
format!macro (sinceinline_string!would spill to the heap and allocate anyway).
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.
- 8d ago First seen · 80 lines · 16 tokens per session scan A d1abdcaf9a41
write-structured-tracing is a skill published in the GitHub repository r3bl-org/r3bl-open-core (483 stars, last pushed 2d ago), licensed Apache-2.0. It adds 16 tokens to every session and 752 once invoked, about $0.0001 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.
Other skills, from other repositories
rust-check
Run cargo check on the current Rust project to find compile errors.
debug
Reproduce, minimize, localize, identify root cause, and distinguish diagnosis from an authorized fix. Prefer root-cause over symptom patches.
ast-grep
Use for ast-grep project setup, rule authoring, rule debugging, and structural search workflows.
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
cw-slice
Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.
cw-dogfood
Use when a Codewhale change needs proving in the real product, or when asked to build/install/dogfood the local binaries: stamped release build, atomic install, fresh-shell verification, and the manual QA that gates cannot cover.