Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

systematic-debugging

БесплатноБез исполняемых скриптовНе проверен

Methodology for debugging non-trivial problems systematically. This skill should be used automatically when investigating bugs, test failures, or unexpected…

freenetот freenet★ 27 звёзд на GitHub

Об этом скилле

Systematic Debugging

When to Use

Invoke this methodology when a test fails and the cause isn't immediately obvious, when unexpected behavior occurs in production or development, when an error message doesn't point to the fix, or when several causes are plausible.

Form explicit hypotheses before changing code, validate or eliminate each with evidence, and use subagents for concurrent readonly exploration.

Debugging Scope Ladder

Always prefer the smallest, most reproducible scope that demonstrates the bug. Work up the ladder only when the smaller scope can't reproduce or doesn't apply:

Priority Scope When to Use Command
1 Unit test Logic errors, algorithm bugs, single-function issues cargo test -p freenet -- specific_test
2 Mocked unit test Transport/ring logic needing isolation Unit test with MockNetworkBridge / MockRing
3 Simulation test Multi-node behavior, state machines, race conditions cargo test -p freenet --features simulation_tests,testing --test simulation_integration
4 SimNetwork + FaultConfig Fault tolerance, message loss, network partitions SimNetwork with configured fault injection
5 fdev single-process Quick multi-peer CI validation cargo run -p fdev -- test --seed 42 single-process
6 freenet-test-network 20+ peer large-scale behavior Docker-based freenet-test-network
7 Real network Issues that only manifest with real UDP/NAT/latency Manual multi-peer test across machines

Lower scopes are faster, deterministic and reproducible by anyone. Gateway logs, aggregate telemetry and production metrics are not available to every developer, so don't design a reproduction that depends on them.

Debugging Workflow

Phase 0: Claim the Issue

If you're working on a GitHub issue, claim it first (see the pr-creation skill's "Claim the Issue").

Phase 1: Reproduce and Isolate

  1. Reproduce the failure at the smallest scope on the ladder that shows it.
  2. Record the seed when using simulation tests, so the run is reproducible.
  3. Gather initial evidence: error messages, logs, stack traces.
# Run simulation tests
cargo test -p freenet --features simulation_tests,testing --test simulation_integration

# With logging, to observe event sequences
RUST_LOG=info cargo test -p freenet --features simulation_tests,testing --test simulation_integration -- --nocapture

# Reproduce with a specific seed
cargo run -p fdev -- test --seed 0xDEADBEEF single-process

Phase 1b: When the Bug Is Reported from the Live Network

Live-network debugging has the slowest feedback loop (add telemetry, redeploy, wait), so translate the observation into a local reproduction as fast as possible.

  1. Constrain the problem from network data: which operation type, which peers, what hop count, what timing pattern.
  2. Translate constraints into simulation parameters:
Network Observation Simulation Translation
"GET times out at hop 3" #[freenet_test] with 4+ nodes, specific node_locations matching topology
"Peer X never responds" Node configured to drop/delay messages via FaultConfig
"High timeout rate" A FaultConfig loss rate tuned until the simulated rate matches
"Works for PUT but not GET" Test both operations — likely incomplete wiring in dispatch path
  1. Write the simulation test with #[freenet_test] or SimNetwork + FaultConfig and a deterministic seed.
  2. Debug locally with full control (tracing, assertions, state inspection), no redeployment.
  3. Validate the fix against telemetry if you can.

Once you know what fails (operation type, peer pattern, timing), stop analyzing network data and reproduce locally; the simulation loop is orders of magnitude faster. If a telemetry-monitor skill is available (project-local, not part of this plugin), use it to constrain the problem, not as the primary debugging tool.

Phase 2: Form Hypotheses

Before touching code, list the plausible causes ranked by likelihood. Freenet-specific hypothesis patterns:

  • State machine bugs: invalid transitions in operations (CONNECT, GET, PUT, UPDATE, SUBSCRIBE).
  • Ring/routing errors: incorrect peer selection, distance calculations, topology issues.
  • Transport issues: UDP packet loss handling, encryption/decryption, connection lifecycle.
  • Contract execution: WASM sandbox issues, state verification failures.
  • Determinism violations: std::time::Instant::now() instead of TimeSource, or rand::random() instead of GlobalRng.
  • Silent failure: a spawned task that died unnoticed (is the JoinHandle stored and polled?), a broadcast to zero targets, a channel that drops on overflow, let _ = sender.send().
  • Resource exhaustion: an insert with no cleanup on the failure or timeout path.
  • **Incomplete
Полный SKILL.md на GitHub

Установить systematic-debugging в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/module-debugging.md

FAQ

Что делает скилл systematic-debugging?

Methodology for debugging non-trivial problems systematically. This skill should be used automatically when investigating bugs, test failures, or unexpected behavior that isn't immediately obvious. Emphasizes hypothesis formation, parallel investigation with subagents, and avoiding common anti-patterns like jumping to conclusions or weakening tests.

Как установить скилл systematic-debugging?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл systematic-debugging запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить systematic-debugging с