Agent skill

Ocannl Debug Tracing

by ahrefs in ahrefs/ocannl

How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppxminidebug tracing of library internals such as the shape/row solver.

BSD-2-ClauseAuto-check passedDevelopment

Install Ocannl Debug Tracing

skills CLI
$ npx skills add ahrefs/ocannl --skill ocannl-debug-tracing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ahrefs/ocannl ocannl-debug-tracing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ahrefs/ocannl.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ocannl-debug-tracing .claude/skills/ocannl-debug-tracing && rm -rf skills-src

Use ~/.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/

Facts

Skill name
ocannl-debug-tracing
GitHub stars
118
Token cost
~637 tokens
SKILL.md length
249 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
BSD-2-Clause

At a glance

How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppxminidebug tracing of library internals such as the shape/row solver.

  • Debugging a wrong-value
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Wrong-shape result and you need to see generated code
  • Per-kernel logs

What it does

Ocannl Debug Tracing is an agent skill from ahrefs/ocannl. How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppxminidebug tracing of library internals such as the shape/row solver. Use when debugging a wrong-value or wrong-shape result and you need to see generated code, per-kernel logs, or the solver's decisions.

Its SKILL.md is about 640 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 Deep learning. The repository describes itself as: OCANNL: OCaml Compiles Algorithms for Neural Networks Learning. The licence is BSD-2-Clause.

When your agent uses it

  • Debugging a wrong-value
  • Wrong-shape result and you need to see generated code
  • Per-kernel logs
  • The solvers decisions

Example prompts

  • “/ocannl-debug-tracing”

What it can do on your machine

Read from SKILL.md and the folder at commit 003e177. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ocannl Debug Tracing loads about 637 tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 249 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~637

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from ahrefs/ocannl at commit 003e177, republished under its BSD-2-Clause licence (© ahrefs). 249 words, ~637 tokens.

Download SKILL.mdSave it as .claude/skills/ocannl-debug-tracing/SKILL.md (or your agent's skills folder).
name
ocannl-debug-tracing
description
How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppx_minidebug tracing of library internals such as the shape/row solver. Use when debugging a wrong-value or wrong-shape result and you need to see generated code, per-kernel logs, or the solver's decisions.

Debugging and Logging

  • Set debug_log_from_routines=true in config for kernel/routine-level debugging
  • Use log_level=2 for verbose ppx_minidebug output
  • CUDA debugging requires Utils.capture_stdout_logs wrapper
  • Debug files generated in log_files/<exe-name>/ (this process's subdirectory is cleaned on startup by default)
  • Runtime logs from kernel execution are written to <backend>-<device>-<stream>.log (e.g., cuda-0-0.log) inside that subdirectory
  • Generated code files in build_files/<exe-name>/ show high-level .cd, intermediate .ll, and backend-specific .c/.cu files

See the Important Debug Settings list in AGENTS.md for the config keys that enable these artifacts.

Tracing library internals with ppx_minidebug (e.g. the shape/row solver)

  • High-level %debug5_sexp/%track5_sexp etc. log statements are stripped at COMPILE time; each module has its own gate env var: [%%global_debug_log_level_from_env_var "OCANNL_LOG_LEVEL_ROW"] at the top of row.ml, similarly ..._SHAPE, ..._TNODE, ..._ASSIGNMENTS, ..._CC_BACKEND, etc. (grep for global_debug_log_level_from_env_var)
  • Every gate is declared as a preprocessor_deps (env_var ...) of the library whose modules read it (gh-ocannl-628), so setting one re-preprocesses those modules by itself: OCANNL_LOG_LEVEL_ROW=9 OCANNL_LOG_LEVEL_SHAPE=9 dune build .... Adding a gate to a module means adding it to that library's preprocessor_deps too, which test/operations/env_var_deps checks
  • At runtime, pass --ocannl_log_level=9 and run from a directory with an ocannl_config on its ancestor path (e.g. test/config/); logs land in log_files/
  • Backend choice: the default debug_backend=db writes a database supporting structured queries (e.g. print a subtree containing two given terms); --ocannl_debug_backend=flushing writes greppable flat text to log_files/debug.log and survives crashes mid-trace
  • Useful flat-text queries: stage = StageN lines segment finish_inference's solver passes; track a variable by grepping Row_var N / (id N) for its transition to Solved_row/Solved_dim, then inspect the surrounding unify_row/solve_dim_ineq scope

© ahrefs, BSD-2-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/ocannl-debug-tracing of ahrefs/ocannl.

Open the folder on GitHubat commit 003e177

Compare with similar skills

Ocannl Debug Tracing 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.

Ocannl Debug Tracing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ocannl Debug Tracing this skillahrefs/ocannl118—~637Automated safety check: PassBSD-2-Clause
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Debug Distributedareal-project/AReaL5.8k1 repos~1.6kAutomated safety check: PassApache-2.0
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0
Veomni DebugByteDance-Seed/VeOmni2.2k—~2.8kAutomated safety check: PassApache-2.0
Analyze Projectlllllllama/RigorPilot-Skills4971 repos~519Automated safety check: PassMIT

Similar skills

  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Debug Distributed

    areal-project/AReaL

    Guide for debugging distributed training issues in AReaL. An agent skill from areal-project/AReaL.

    5.8k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • The Art of Debugging

    stas00/the-art-of-debugging

    Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.

    1.7k GitHub stars~6.1k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Veomni Debug

    ByteDance-Seed/VeOmni

    A skill your agent uses for ANY bug, error, crash, wrong output, loss divergence, gradient explosion, test failure, CUDA error, distributed training hang, checkpoint load failure, or unexpected…

    2.2k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Analyze Project

    lllllllama/RigorPilot-Skills

    Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories.

    497 GitHub starsUsed in 1 repo~519 tokens
    DevelopmentAuto-check passed
  • Ascendc

    ascend-ai-coding/awesome-ascend-skills

    End-to-end AscendC custom operator development for Ascend NPU in an ascend-kernel (csrc/ops + build.sh + torchnpu PyTorch custom op) project.

    174 GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed

More from ahrefs/ocannl

  • Slipshow

    ahrefs/ocannl

    Writing Slipshow presentations, a text-based engine that compiles Markdown to interactive scrolling HTML presentations.

    118 GitHub stars~885 tokensUpdated yesterday
    Auto-check passed
  • Extending Ocannl

    ahrefs/ocannl

    Touch-lists for common OCANNL extension tasks: adding a primitive operation, adding or extending a backend, extending shape inference, and diagnosing output differences between backends.

    118 GitHub stars~728 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Ocannl Debug Tracing

What does Ocannl Debug Tracing do?

How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppxminidebug tracing of library internals such as the shape/row solver. Ocannl Debug Tracing is an agent skill from ahrefs/ocannl. How to get debug output out of OCANNL: kernel/routine runtime logs, generated code artifacts, and ppxminidebug tracing of library internals such as the shape/row solver.

When should I use Ocannl Debug Tracing?

Ocannl Debug Tracing fits situations like: debugging a wrong-value; wrong-shape result and you need to see generated code; per-kernel logs; the solvers decisions.

How do I install Ocannl Debug Tracing in Claude Code?

Run `npx skills add ahrefs/ocannl --skill ocannl-debug-tracing -a claude-code`. Or copy the skill folder (.claude/skills/ocannl-debug-tracing in ahrefs/ocannl) into .claude/skills/ocannl-debug-tracing in your project. Claude Code loads it when a task matches its description.

How do I install Ocannl Debug Tracing in Codex?

Run `npx skills add ahrefs/ocannl --skill ocannl-debug-tracing -a codex`. Or copy the skill folder (.claude/skills/ocannl-debug-tracing in ahrefs/ocannl) into .agents/skills/ocannl-debug-tracing in your project. Codex loads it when a task matches its description.

Can I use Ocannl Debug Tracing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ahrefs/ocannl --skill ocannl-debug-tracing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ocannl-debug-tracing, .gemini/skills/ocannl-debug-tracing, .github/skills/ocannl-debug-tracing and .opencode/skills/ocannl-debug-tracing in your project.

What does Ocannl Debug Tracing need to run?

SKILL.md names no scripts, command-line tools or credentials: Ocannl Debug Tracing is instructions for the agent only.

Does Ocannl Debug Tracing access the network?

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.

Is Ocannl Debug Tracing safe to install?

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.

What licence does Ocannl Debug Tracing use?

Ocannl Debug Tracing is published under the BSD-2-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ocannl Debug Tracing use?

About 637 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ocannl Debug Tracing?

Skills that share tags, products or a category with Ocannl Debug Tracing: Aoti Debug (pytorch/pytorch, 104k stars), Debug Distributed (areal-project/AReaL, 5.8k stars), The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars) and Veomni Debug (ByteDance-Seed/VeOmni, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ocannl Debug Tracing?

ahrefs (a GitHub organization) maintains it in ahrefs/ocannl, which has 118 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: ahrefs/ocannl on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.