lynx-debug-info-remapping — скилл для Claude Code: установка
Скилл lynx-debug-info-remapping сопоставляет позиции function_id:pc_index из ошибок Lynx с исходными строками через debug-info.json. Нужен при разборе ошибок main thread.
Apache-2.0 325 установок ★ 28 обновлён 2026-11-22
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a claude-codeЧто делает lynx-debug-info-remapping
Скилл разбирает стек вызовов Lynx, находит пары function_id:pc_index и переводит их в исходные позиции line:column. Для этого он использует внешний debug-info.json, а затем может показать стек с заменёнными координатами и фрагментами исходного кода.
Внутри есть скрипт scripts/index.mjs, который запускается через node с путём к файлу отладки, function_id и pc_index. Для проекта с rspeedy файлы обычно находятся в dist/.rspeedy/main/. Если сборка выполнена без папки .rspeedy, сначала нужна команда DEBUG='rspeedy,rsbuild' rspeedy build. Фоновый стек вызовов remapping не требует, поэтому скилл применяют к main-thread backtrace.
Какие задачи решает
- сопоставить
function_id:pc_indexс исходной строкой - разобрать ошибку в
main-thread.js - перевести стек Lynx в координаты исходного кода
- показать кликабельный remapped stack trace
- найти позицию ошибки через
debug-info.json
Примеры запросов агенту
- Разбери этот main-thread backtrace и сопоставь все позиции через
debug-info.json. - Используй
dist/.rspeedy/main/debug-info.json, чтобы расшифровать1356:13. - Покажи стек с заменёнными координатами и фрагментом исходного кода из
main-thread.js.
Как установить lynx-debug-info-remapping
1Через Skills CLI (Vercel)
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a claude-code2Вручную: положить файлы
~/.claude/skills/lynx-debug-info-remapping/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/lynx-debug-info-remapping/
1Через Skills CLI (Vercel)
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a codex2Вручную: положить файлы
.agents/skills/lynx-debug-info-remapping/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a cursor2Вручную: положить файлы
.cursor/skills/lynx-debug-info-remapping/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install lynx-community/skills skills/lynx-debug-info-remapping2Вручную: положить файлы
.github/skills/lynx-debug-info-remapping/SKILL.md1Через Skills CLI (Vercel)
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a gemini-cli2Командой платформы
gemini skills install https://github.com/lynx-community/skills --path skills/lynx-debug-info-remappingВручную: положить файлы
.devin/skills/lynx-debug-info-remapping/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о lynx-debug-info-remapping
Как установить lynx-debug-info-remapping в Claude Code?
Выполните npx skills add lynx-community/skills --skill lynx-debug-info-remapping -a claude-code, затем проверьте файл ~/.claude/skills/lynx-debug-info-remapping/SKILL.md.
Что делает lynx-debug-info-remapping?
Скилл переводит позиции function_id:pc_index из main-thread стека Lynx в координаты исходного кода по данным debug-info.json. Он также формирует стек с remapped-позициями.
Что нужно для расшифровки ошибки Lynx?
Нужны позиция из сообщения об ошибке или полный backtrace и путь к debug-info.json. Если после rspeedy build нет папки .rspeedy, выполните DEBUG='rspeedy,rsbuild' rspeedy build.
Исходный текст
SKILL.md · Apache-2.0
---
name: lynx-debug-info-remapping
description: Remap the function_id:pc_index to the original source code position by provided debug info json file.
---
# Debug Info Remapping
## Description
In Lynx, main thread script is encoded to bytecode and uses an external debugging information scheme. Under this scheme, the row and column numbers in the runtime error messages are not the actual row and column numbers. The row and column numbers need to be deciphered from the external `debug-info.json` file.
debug-info.json format is as follows:
```json
{
"lepusNG_debug_info": {
"function_info": [
{
"function_id": 1,
"function_name": "App",
"line_col": [
{ "line": 1, "column": 1 },
{ "line": 2, "column": 1 },
{ "line": 3, "column": 1 }
]
}
]
}
}
```
## When to Apply
This skill is useful when you want to remap the `function_id:pc_index` to the original source code position.
When the user encounters a runtime error message with function_id:pc_index, along with `main-thread.js` and `debug-info.json` in the error message, for example:
```
main-thread.js exception: App render failed at main thread backtrace:
at App (file:///main-thread.js:1356:13)
at doRender (file:///main-thread.js:1002:12)
at call (native)
at render (file:///main-thread.js:466:52)
at _renderToString (file:///main-thread.js:1001:569)
at renderToString (file:///main-thread.js:998:191)
at renderMainThread (file:///main-thread.js:766:45)
at renderPage (file:///main-thread.js:853:69)
```
Where `function_id:pc_index` is `1356:13`.
## Workflow
### 1. Ask the User for the `function_id:pc_index`
User should provide the `function_id:pc_index` in the error message. Or give you the full backtrace.
You should check if it is a main-thread backtrace. Since background thread backtrace does not need remapping.
### 2. Find the Corresponding Position in debug-info.json
Ask the user for the `debug-info.json` path. For example in a rspeedy project with `main` entry it will locate at:
- `main-thread.js`: `$PROJECT_DIR/dist/.rspeedy/main/main-thread.js`
- `debug-info.json`: `$PROJECT_DIR/dist/.rspeedy/main/debug-info.json`
If the user uses `rspeedy build` and there is no `.rspeedy` folder, remind them to build the project with `DEBUG='rspeedy,rsbuild' rspeedy build`.
### 3. Run the remapping script
Set `SKILL_DIR` to the directory containing this `SKILL.md` and `DEBUG_INFO` to the path of `debug-info.json`. Run the bundled script for each `function_id:pc_index` pair.
```bash
node "$SKILL_DIR/scripts/index.mjs" "$DEBUG_INFO" "$function_id" "$pc_index"
```
### 4. Output the Remapped Position
The remapping script will output the remapped position in the format of `line:column`.
You should output the remapped position for each `function_id:pc_index` pair.
Replace the `function_id:pc_index` pair in the stack trace with the remapped position and show the remapped stack trace.
### 5. Show the Remapped Stack Trace
If you can reach the `main-thread.js` file, show the remapped stack trace with the remapped positions source code.
The final output should be something like this:
```log
main-thread.js exception: App render failed at main thread backtrace:
at App (./dist/.rspeedy/main/main-thread.js:9368:56)
at doRender (./dist/.rspeedy/main/main-thread.js:7237:44)
at call (native)
at render (./dist/.rspeedy/main/main-thread.js:3706:72)
at _renderToString (./dist/.rspeedy/main/main-thread.js:7177:78)
at renderToString (./dist/.rspeedy/main/main-thread.js:7067:91)
at renderMainThread (./dist/.rspeedy/main/main-thread.js:5423:113)
at renderPage (./dist/.rspeedy/main/main-thread.js:6199:46)
╭─[5:55]
3 │ export function App() {
4 │ if (__MAIN_THREAD__) {
5 │ throw new Error('App render failed at main thread');
· ─┬
· ╰── main-thread.js exception: App render failed at main thread backtrace
6 │ }
7 │
╰────
... (the same for other callstacks such as doRender, call, render, _renderToString, renderToString, renderMainThread, renderPage here)
Files used:
- Debug Info: ./dist/.rspeedy/main/debug-info.json
- Source File: ./dist/.rspeedy/main/main-thread.js
```
The `./dist/.rspeedy/main/main-thread.js:9368:56` will make sure it is clickable in the editor/terminal.
© lynx-community · Apache-2.0 · lynx-community/skills