scistudio-debug-run
Use when a workflow run has failed, is stuck, or produced unexpected output, and you need to diagnose the cause. Covers run-status inspection, block-log…
от jiazhenz026★ 30 звёзд на GitHub
Установить scistudio-debug-run в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
scistudio-debug-run
1. What debugging a run means
A run executes one workflow file block by block and records each block's state, logs, outputs, and lineage. Debugging a run means finding, from those records, which block went wrong and why, fixing the cause, and only then running again. A run can go wrong in three ways:
- It failed. A block raised an error; the run state is
failed. - It is stuck. A block is
pausedwaiting for someone: the agent of an AI Agent block, the user's decision in an interactive block, or an external application. - It produced wrong output. Every block succeeded, but a result is not what the user expected. The cause is often upstream of the block where it shows.
The failing block is not always the faulty one: a block can fail because an upstream block produced malformed data.
2. Steps to debug a run
- Read the run status. Call
get_run_status(run_id)and read every field: the runstate,progress.block_states, and every entry inerrors. - Find the first block that went wrong. Scan
progress.block_statesfor the first block that iserror,paused, orskipped, and match it to itsBlockErrorEntryinerrors. - Read its logs. Call
get_block_logs(run_id, block_id)and read both streams. Find the bottom-most line of any traceback. - Check its inputs. Read the workflow's edges with
get_workflowto find the upstream ports feeding the block, callget_block_outputfor each in the same run, theninspect_dataandpreview_data, to confirm each input has the type and content the block expects. - Walk upstream when an input is wrong. Follow the edge back to the block that produced it, and repeat steps 3 and 4 for that block in the same run until you reach the first block whose inputs are right and whose output is wrong.
- Explain and fix. Tell the user the cause, quoting the log line verbatim,
and the fix. Change the workflow with
edit_workfloworupdate_block_config, or the block file withscistudio-write-block, then validate and run again.
3. Anti-patterns
- Re-running a failed workflow without changing anything.
- Reading only the run
stateand stopping before the block logs. - Explaining a failure without quoting the log; paraphrasing a traceback.
- Blaming the block that failed without checking whether its input was wrong.
- Calling
cancel_runon a running or paused workflow without the user's confirmation. - Querying
.scistudio/lineage.dbor reading run folders directly instead of using the MCP tools. - Treating a
pausedblock as hung: it is waiting for someone.
4. Defaults, tool sequence, and failure handling
Run status. get_run_status returns GetRunStatusResult with run_id,
state (queued, running, succeeded, failed, cancelled, or unknown),
progress.block_states (block id to state: idle, ready, running, paused,
done, error, cancelled, or skipped), and errors, a list of
BlockErrorEntry(block_id, error, summary). summary is a one-line digest;
error is the full traceback. A skipped block did not run because a required
upstream input was missing; look at the block before it.
Block logs. get_block_logs(run_id, block_id) returns stdout, stderr,
and source, each stream cut to its last 16 KiB. With source set to
codeblock_exchange (a Code Block), the script's output comes as a real
stdout/stderr split. With run_log (every other block), everything the block
wrote is in stderr and stdout is empty.
Common error signatures.
| Log shows | Likely cause | Next step |
|---|---|---|
FileNotFoundError: ... 'data/...' |
A path in the config names a file that does not exist |
Find the file with list_directory or search_files; fix the path with update_block_config |
KeyError: '<name>' inside run |
The block reads an input port that is not wired, or a config key that is not set | get_block_schema; check the workflow's edges and the node's config |
pydantic.ValidationError |
The node's config does not match the block's schema | get_block_schema; fix with update_block_config |
ImportError / ModuleNotFoundError |
The block file imports a missing package, or the registry is stale | Check the imports in blocks/<name>.py; reload_blocks |
MemoryError |
An input is too large to load at once | inspect_data for its size; process it in chunks inside the block (iter_chunks) or use a smaller input |
| A type error naming two data types | The block received a different type than it expects | inspect_data on the input; check the edge in the workflow |
Structural problems (a cycle, a required input with no connection, incompatible
edge types, an unknown port) are reported by validate_workflow before a run
starts; fix them with scistudio-build-workflow. When the log matches no row,
report the bottom-most call site of the traceback verbatim. Do n
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл scistudio-debug-run?
Use when a workflow run has failed, is stuck, or produced unexpected output, and you need to diagnose the cause. Covers run-status inspection, block-log retrieval, tracing a bad input upstream, common error signatures, and finishing an AI Agent block with finish_ai_block. NOT for designing new workflows (use scistudio-build-workflow).
Как установить скилл scistudio-debug-run?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scistudio-debug-run запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…