Agent skill

Tilelang Debug Helper

by tile-ai in tile-ai/tilelang-ascend

How to add debugging capabilities to TileLang Ascend example operators.

MITAuto-check: notesDevelopment

Install Tilelang Debug Helper

skills CLI
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-debug-helper -a claude-code

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

GitHub CLI
$ gh skill install tile-ai/tilelang-ascend tilelang-debug-helper --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/tile-ai/tilelang-ascend.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/tilelang-custom-skill/tilelang-debug-helper .claude/skills/tilelang-debug-helper && 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
tilelang-debug-helper
GitHub stars
400
Token cost
~1.7k tokens
SKILL.md length
859 words
Files
6 (incl. references)
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

How to add debugging capabilities to TileLang Ascend example operators.

  • Works in 4 steps: Read the Original Example → Identify the Right Location → Add Debug Code → …
  • The user asks to debug a TileLang example
  • SKILL.md covers Overview, When to Use This Skill, Part 1: Adding Debug Code to… and Part 2: Configuring…, plus 7 more sections
  • Calls apt

What it does

Tilelang Debug Helper is an agent skill from tile-ai/tilelang-ascend. How to add debugging capabilities to TileLang Ascend example operators. Use this skill whenever the user asks to debug a TileLang example, add GDB debugging code, create a debug version of an example, or mentions GDB, debugging, breakpoints, or VSCode debugging in the context of TileLang operators. This skill covers adding debug code to Python examples, configuring CMakeLists.txt for C++ debugging, and setting up VSCode for Python + C++ joint debugging.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `evals/evals.json`, `examples/cmake-debug.md` and `examples/python-debug-code.md`).

It sits in Development, covering Debugging and Responsive design. It works with Python, C++ and Visual Studio Code. The repository describes itself as: Ascend TileLang adapter. The licence is MIT.

When your agent uses it

  • The user asks to debug a TileLang example
  • Add GDB debugging code
  • Create a debug version of an example
  • VSCode debugging in the context of TileLang operators

Example prompts

  • “/tilelang-debug-helper”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Read the Original Example
  2. Identify the Right Location
  3. Add Debug Code
  4. Save the Debug Version

What it can do on your machine

Read from SKILL.md and the folder at commit 3d17c28. 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

    Shell commands in SKILL.md call:

    • apt

    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

Tilelang Debug Helper loads about 1.7k tokens when it runs, and up to ~2.1k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 859 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.1k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:83
    sources `set_env.sh` and exports env to `.env` before launch.
  • NoteMentions a .env fileSKILL.md:146
    4. Verify `.env` file is generated when running "set env" task
  • NoteRuns commands with sudoSKILL.md:172
    - GDB installed (`sudo apt install gdb`)

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 tile-ai/tilelang-ascend at commit 3d17c28, republished under its MIT licence (© tile-ai). 859 words, ~1,748 tokens.

Download SKILL.mdSave it as .claude/skills/tilelang-debug-helper/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
tilelang-debug-helper
description
How to add debugging capabilities to TileLang Ascend example operators. Use this skill whenever the user asks to debug a TileLang example, add GDB debugging code, create a debug version of an example, or mentions GDB, debugging, breakpoints, or VSCode debugging in the context of TileLang operators. This skill covers adding debug code to Python examples, configuring CMakeLists.txt for C++ debugging, and setting up VSCode for Python + C++ joint debugging.

TileLang Debug Helper

This skill helps you add debugging capabilities to TileLang Ascend example operators so they can be debugged with GDB in VSCode.

Overview

Debugging TileLang examples involves three main components:

  1. Python Debug Code: Add PID printing and wait logic to Python examples
  2. C++ Debug Build: Configure CMakeLists.txt to preserve debug symbols
  3. VSCode Configuration: Set up joint Python + C++ debugging environment

When to Use This Skill

Use this skill when:

  • User asks to "debug" or "add debugging code" to a TileLang example
  • User mentions GDB, breakpoints, or VSCode debugging
  • User wants to step through C++ code in a TileLang operator
  • User needs to inspect variables or execution flow in a TileLang kernel
  • User wants to set up the complete debugging environment

Part 1: Adding Debug Code to Python Examples

Understanding the Task

When a user wants to debug a TileLang example, they need to:

  1. Add code to print the process ID (PID)
  2. Add code to wait for GDB attachment
  3. This allows attaching a GDB debugger to the running Python process
Step 1: Read the Original Example

First, read the example file that needs debugging. These are typically located in the examples/ directory and end with .py.

Step 2: Identify the Right Location

Find the best place to insert the debugging code. Look for:

  • After imports and before the main test execution
  • Before the function is called with @tilelang.jit
  • After torch.manual_seed() if present
  • Before the test loop starts

The goal is to pause execution before the actual kernel runs, so GDB can be attached.

Step 3: Add Debug Code

Insert a small PID-printing + input() wait snippet before kernel execution. Snippet, complete file example, and 3 common patterns (single test / multi-config / multi-function) see examples/python-debug-code.md.

Step 4: Save the Debug Version

Save the modified file. Common naming conventions:

  • Add _debug suffix: sigmoid_debug.py
  • Or keep the original name if replacing it

Part 2: Configuring CMakeLists.txt for C++ Debugging

To debug C++ code in TileLang, the project must be compiled with debug symbols (-g) and no optimizations (-O0).

Quick steps:

  1. Locate tilelang-ascend/CMakeLists.txt
  2. Find add_library(tilelang_objs OBJECT ${TILE_LANG_SRCS})
  3. Add target_compile_options(tilelang_objs PRIVATE -g -O0) immediately after
  4. Rebuild

Complete CMake snippet + rebuild commands see examples/cmake-debug.md.


Part 3: Configuring VSCode for Python + C++ Joint Debugging

VSCode needs two configurations:

  1. Python Debug Configuration (launch.json) — launches the Python script
  2. C++ GDB Attach Configuration (launch.json) — attaches GDB to the running Python process

Plus a tasks.json that sources set_env.sh and exports env to .env before launch.

Setting up VSCode for the first time in a project: copy the full launch.json + tasks.json JSON and required extensions list from examples/vscode-config.md.


Complete Debugging Workflow

Step-by-Step Guide
  1. Configure CMakeLists.txt (if not already done)

    • Add target_compile_options(tilelang_objs PRIVATE -g -O0)
    • Rebuild the project
  2. Configure VSCode (if not already done)

    • Create .vscode/launch.json and .vscode/tasks.json
    • Install required extensions
  3. Add Debug Code to Python Example

    • Insert PID printing and wait logic
    • Save the file
  4. Start Debugging

    • Open the Python example in VSCode
    • Run "Step 1: Debug Python Example"
    • The script will print the PID and pause
    • Run "Step 2: Attach C++ (GDB)"
    • Select the Python process when prompted
    • Set breakpoints in C++ code
    • Press Enter in the Python console to continue execution
    • GDB will hit breakpoints in C++ code
Show full SKILL.md (316 more words)Show less
What Happens During Debugging
  1. User runs the Python script with debug code
  2. Script prints PID and pauses at input()
  3. User attaches GDB to that PID in VSCode
  4. User presses Enter in the Python console
  5. Execution continues and GDB can hit breakpoints in C++ code
  6. User can step through both Python and C++ code seamlessly

Verification

After Adding Debug Code to Python
  1. Verify the file is syntactically correct
  2. Confirm import os is present
  3. Confirm the debug code is placed before kernel execution
  4. The file should run and pause at the input() call
After Modifying CMakeLists.txt
  1. Verify the target_compile_options line is present
  2. Rebuild the project successfully
  3. Debug symbols are present in the compiled binaries
After Configuring VSCode
  1. Verify .vscode/launch.json exists and is valid JSON
  2. Verify .vscode/tasks.json exists and is valid JSON
  3. Verify set_env.sh path is correct in tasks.json
  4. Verify .env file is generated when running "set env" task

Troubleshooting

When debugging session fails to start, breakpoints don't hit, or GDB can't find process — see references/troubleshooting.md covering Python debug code issues, C++ debugging issues (breakpoints / variable inspection), and VSCode configuration issues (launch / attach failures / process not found).


Output

Always provide:

  • The path to the created/modified debug file (if applicable)
  • Brief instructions on how to use it (run, attach GDB, continue)
  • Mention any additional setup needed if not already done
  • Clear steps for the complete debugging workflow

Prerequisites Summary

Before starting debugging, ensure:

  • Linux operating system
  • Git installed
  • Python 3.10 or higher
  • GDB installed (sudo apt install gdb)
  • VSCode with Python and C/C++ extensions
  • TileLang project compiled with debug information
  • CMakeLists.txt configured with -g -O0
  • VSCode configured with launch.json and tasks.json

子目录索引

© tile-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in .agents/skills/tilelang-custom-skill/tilelang-debug-helper of tile-ai/tilelang-ascend.

  • SKILL.md
  • evals/evals.json
  • examples/cmake-debug.md
  • examples/python-debug-code.md
  • examples/vscode-config.md
  • references/troubleshooting.md

Open the folder on GitHubat commit 3d17c28

Compare with similar skills

Tilelang Debug Helper 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.

Tilelang Debug Helper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tilelang Debug Helper this skilltile-ai/tilelang-ascend400—~1.7kAutomated safety check: NotesMIT
MCP Debuggerdebugmcp/mcp-debugger171—~3.8kAutomated safety check: PassMIT
Dbgtheodo-group/debug-that158—~2.2kAutomated safety check: PassMIT
Ue Live DebuggingJasonMa0012/MooaToon749—~2.9kAutomated safety check: NotesCustom licence
Gdbmohitmishra786/low-level-dev-skills253—~1.6kAutomated safety check: PassMIT
SlintMoosync/Moosync259—~2.4kAutomated safety check: PassGPL-3.0

Similar skills

  • MCP Debugger

    debugmcp/mcp-debugger

    A skill your agent uses when investigating a bug, failing test, or unexpected runtime behavior and the mcp-debugger MCP server is available — drives real step-through debuggers (breakpoints, stack…

    171 GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Dbg

    theodo-group/debug-that

    Debug applications using the dbg CLI debugger. An agent skill from theodo-group/debug-that.

    158 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Ue Live Debugging

    JasonMa0012/MooaToon

    A skill your agent uses when debugging UE C++ crashes, runtime bugs, or unexpected behavior with Rider MCP available.

    749 GitHub stars~2.9k tokensUpdated 20 days ago
    DevelopmentAuto-check: notes
  • Gdb

    mohitmishra786/low-level-dev-skills

    GDB debugger skill for C/C++ programs. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.6k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Slint

    Moosync/Moosync

    Expert guidance for building, debugging, and working with Slint GUI applications.

    259 GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from tile-ai/tilelang-ascend

All 20 skills in this repo
  • Tilelang Submodule Pull

    tile-ai/tilelang-ascend

    Automatically pull tilelang repository and its third-party code.

    400 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Tilelang A5 Sim Convert

    tile-ai/tilelang-ascend

    将 tilelang example 脚本转换为可在 A5 camodel 仿真器上直接运行的版本。输入脚本路径,输出一个新的 sim.py 文件,不覆盖原始文件。触发:仿真运行、camodel、A5 仿真、sim 模式、转换脚本为仿真、不需要 NPU 跑 kernel、simulate A5。

    400 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Tilelang Env Check

    tile-ai/tilelang-ascend

    TileLang-Ascend 环境检查与配置验证技能。检查代码仓库完整性、编译安装状态、环境变量配置,并运行简单测试验证环境。发现问题会自动调用相关 skill 进行修复,并按依赖顺序重新执行后续步骤。触发关键词:"环境检查"、"检查环境"、"验证环境"、"环境配置"、"环境搭建"、"env check"、"check environment"、"verify…

    400 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Tilelang Op Test Design

    tile-ai/tilelang-ascend

    TileLang-Ascend 算子测试设计技能。支持多种场景:(1) 从 design.md 设计测试配置 (2) 从 examples/{op}/.py 补充测试 (3) 手动提供算子信息生成测试 (4) 测试覆盖率分析。理解算子实现逻辑后智能判断测试策略。触发:设计算子测试、生成测试用例、补充测试、测试覆盖率不足。

    400 GitHub stars~5.6k tokensUpdated today
    Auto-check passed
  • Tilelang Review

    tile-ai/tilelang-ascend

    检查代码格式是否符合 CI 规则。自动检测并安装缺失工具(ruff、clang-format),先运行检查生成报告,使用醒目方式询问用户后,仅在用户同意时执行修复。工作流程:检测环境→自动安装缺失工具→运行检查→生成报告→醒目询问→用户确认→执行修复。使用此技能当:用户要求"格式检查"、"格式化代码"、"代码格式化"、"检查代码格式"、"代码…

    400 GitHub stars~2.8k tokensUpdated today
    Auto-check: notes
  • Tilelang Op Develop

    tile-ai/tilelang-ascend

    基于设计文档生成 TileLang-Ascend 算子实现代码与测试。从 design.md 中提取关键信息,结合 examples/ 中的参考实现生成可运行代码。触发:实现算子、写 kernel、生成代码、算子编码、根据设计文档实现。

    400 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Categories

Questions about Tilelang Debug Helper

What does Tilelang Debug Helper do?

How to add debugging capabilities to TileLang Ascend example operators. Tilelang Debug Helper is an agent skill from tile-ai/tilelang-ascend. How to add debugging capabilities to TileLang Ascend example operators.

When should I use Tilelang Debug Helper?

Tilelang Debug Helper fits situations like: the user asks to debug a TileLang example; add GDB debugging code; create a debug version of an example; VSCode debugging in the context of TileLang operators.

How do I install Tilelang Debug Helper in Claude Code?

Run `npx skills add tile-ai/tilelang-ascend --skill tilelang-debug-helper -a claude-code`. Or copy the skill folder (.agents/skills/tilelang-custom-skill/tilelang-debug-helper in tile-ai/tilelang-ascend) into .claude/skills/tilelang-debug-helper in your project. Claude Code loads it when a task matches its description.

How do I install Tilelang Debug Helper in Codex?

Run `npx skills add tile-ai/tilelang-ascend --skill tilelang-debug-helper -a codex`. Or copy the skill folder (.agents/skills/tilelang-custom-skill/tilelang-debug-helper in tile-ai/tilelang-ascend) into .agents/skills/tilelang-debug-helper in your project. Codex loads it when a task matches its description.

Can I use Tilelang Debug Helper 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 tile-ai/tilelang-ascend --skill tilelang-debug-helper -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tilelang-debug-helper, .gemini/skills/tilelang-debug-helper, .github/skills/tilelang-debug-helper and .opencode/skills/tilelang-debug-helper in your project.

What does Tilelang Debug Helper need to run?

Going by SKILL.md and its folder, Tilelang Debug Helper needs the command-line tools its instructions call (apt). Our summary lists: Python 3.

Does Tilelang Debug Helper 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 Tilelang Debug Helper safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Tilelang Debug Helper use?

Tilelang Debug Helper is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tilelang Debug Helper use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 377 tokens, read only when the agent opens those files.

What are the alternatives to Tilelang Debug Helper?

Skills that share tags, products or a category with Tilelang Debug Helper: MCP Debugger (debugmcp/mcp-debugger, 171 stars), Dbg (theodo-group/debug-that, 158 stars), Ue Live Debugging (JasonMa0012/MooaToon, 749 stars) and Gdb (mohitmishra786/low-level-dev-skills, 253 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tilelang Debug Helper?

tile-ai (a GitHub organization) maintains it in tile-ai/tilelang-ascend, which has 400 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 8, 2026.

Source: tile-ai/tilelang-ascend on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.