/kernel:debugfrom kernel
Systematic debugging methodology: reproduce, hypothesize, isolate, fix root cause, add regression test. Also supports refactoring with dependency and coupling analysis.
Ships in kernel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Diagnosis comes before prescription: a surgeon cutting before the X-ray is guessing with a
knife. Two modes, same discipline. bug (default) is the steps below. refactor swaps the
subject from a failure to a structure, and produces a plan instead of a fix.
Run agentdb recall with the exact error text, subsystem/library, failing
test, and known files/symbols. Recall again when the hypothesis changes or a new failure
appears; that is a new retrieval question. Reference on demand:
skills/debug/reference/debug-research.md.
HYPOTHESIZE: list 3 causes before pursuing any.
ISOLATE: binary search, O(log n) not O(n).
git bisect between known-good and known-bad commit. ~10 tests for 1000 commits.Diff working vs failing state (env, config, input, commit) before theorizing.
Flaky test: classify first as timing/race, shared state, unseeded randomness, or environment difference; only then propose a fix.
(gate: failure localized to a specific function/commit/input subset)
ROOT CAUSE: the error line is the FAILURE. The DEFECT is upstream.
FIX: root cause, not symptom.
<refactor_mode> Triggers: refactor, restructure, clean up, coupling, dependency, "what breaks if". Same rule: diagnose, then hand off. Do not start cutting inside this mode.
graphify affected <symbol> when the graph is fresh. Build the import/call map.scripts/complexity.sh.<diagnosis_output> When the run ends at a diagnosis rather than a fix, emit this and stop:
## Diagnosis: <title>
Mode: bug | refactor · Confidence: high | medium | low
Root cause: <one sentence naming the violated invariant>
Affected: <file - origin> | <file - downstream> ...
Blast radius: N files. Tier 1|2|3.
Hypotheses: 1. <h> -> CONFIRMED | REJECTED (<evidence>) ...
Recommended approach: <what, not how>
Tests required: <fails before> / <passes after>
Next: /kernel:ingest to implement, /kernel:simplify to restructure.
Decide and state the recommendation. Never stop to ask which hypothesis to pursue. </diagnosis_output>
<anti_patterns> Shotgun (random changes until it works) · fix-and-pray (never re-run the original case) · symptom fixing (null check at the crash site) · printf flooding (binary search first, then targeted logging) · blame-the-framework (it's almost never the library) · unscoped "investigate" (scope narrowly or use a subagent so the file reads don't fill context). </anti_patterns>
<when_stuck> Explain the problem in writing · re-read the error message (the answer is there most of the time) · reduce to a minimal reproduction · ask "what changed?" (git log/diff, deps, env) · search the exact error message in quotes · step away, bias accumulates. Re-run the EXACT original failing case before declaring victory; "seems to work" is not evidence. </when_stuck>
30+ min on one hypothesis with no evidence → abandon it. 3+ hypotheses rejected → step back, re-examine assumptions. 2 failed fix attempts → invoke tearitapart; it may be a design problem. Repeated failed corrections in one session → /clear with a minimal reproduction. Bug only in production → add targeted monitoring, document, move on. For 3+ plausible causes, spawn one fresh-context agent per hypothesis (evidence_for / evidence_against / confidence); fresh context catches what a long session anchors past. agentdb emit command "debug" "" '{"mode":"bug|refactor","confidence":"high|medium|low","blast_radius":N,"tier":N}'<on_complete> agentdb write-end '{"skill":"debug","bug":"","root_cause":"<what_broke>","fix":"<what_fixed>","test":"<regression_test_name>","learned":"<pattern_for_future>"}' </on_complete>
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ariaxhan/kernel-claude --plugin kernel28 skills in this plugin
/app-devMobile/web build pipeline: fastlane-first local builds, store submission, pre-submission checklists. Triggers: app, mobile, store submission, deploy app, fastlane, expo, react native, flutter./architectureModular design, interface stability, dependency management, AI-code health. Triggers: architecture, design, structure, modules, dependencies, coupling, system design./buildPlan and implement a requested code feature when the solution requires choosing among implementation approaches./checkpointSave bounded progress as kernel.checkpoint/v1 for exact resume after reset. Triggers: checkpoint, save progress, context reset, compact soon, long task./context-mgmtContext engineering: compaction, progressive disclosure, structured notes via AgentDB. Triggers: tokens, compaction, memory, handoff, summarize, context window./dreamDeep creative exploration engine. Competing perspectives, stress-tested by a 4-persona council, scored by integrity. The approach that survives attack wins — not the one that sounds best.Other plugins' skills for the same job