Agent skill
systematic-debugging
Root-cause-first debugging workflow for broken behavior, confusing errors, flaky reproducers, or repeated failed fix attempts. Use when the failure is real but the mechanism is not yet understood, when guessing has already failed, or when a working pattern comparison is needed before making code or config changes.
Install this agent skill to your Project
npx add-skill https://github.com/i9wa4/dotfiles/tree/main/nix/home-manager/agents/skills/systematic-debugging
SKILL.md
Systematic Debugging
Use this skill to stop guessing, gather evidence, and narrow the actual cause before attempting a fix.
1. Core Defaults
- Reproduce the problem before changing code.
- Read the exact error, output, or observed behavior first.
- Change one variable at a time.
- Compare the broken path with a nearby working path when possible.
- Prefer the smallest probe that can confirm or kill one hypothesis.
- Stop after repeated failed fix attempts and re-check the mental model.
2. Investigation Loop
-
State the failure clearly.
- observed behavior
- expected behavior
- where it happens
-
Capture the cheapest reliable reproducer.
- failing command
- failing test
- exact log line
- concrete input that triggers the problem
-
Read the relevant files in full.
- do not patch based on a snippet alone
- include nearby config or wrapper files when they shape the behavior
-
Check recent change surfaces.
git diff- recent commits
- changed config
- dependency or environment shifts
-
Compare with a working pattern.
- sibling file
- older version
- another command path
- similar code path that still behaves correctly
-
Form one hypothesis.
- say what should be true if the hypothesis is correct
- run the narrowest probe that can prove or disprove it
-
Only after the cause is credible, hand off to execution.
- use local
tdd-tidy-firstfor the smallest verified code or config change
- use local
3. Repo Fit
- Prefer
rgfor text and file discovery. - Record the reproducer command and the exact output you observed.
- Use
mkmdresearch artifacts when the debugging trail will span many steps or multiple turns. - Prefer POSIX-compatible and repo-managed tools over ad hoc global setup.
- Do not hide uncertainty with speculative cleanup or defensive code.
4. Stop Conditions
Stop and reassess when any of these happen:
- three fix attempts failed
- the reproducer changed unexpectedly
- the observed behavior contradicts the current hypothesis
- the failure depends on permissions, hooks, or environment boundaries outside the current lane
At that point, summarize:
- what is proven
- what is still unknown
- which hypothesis failed
- what to test next
5. Handoff To Implementation
When the likely cause is clear, switch to tdd-tidy-first and keep the next
step narrow:
- add or tighten the reproducer when cheap
- make the smallest change that should fix the proven cause
- run the fastest relevant verifier
- widen verification only after the narrow slice passes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
subagent-review
Argument-driven code/design review wrapper. Invokes reviewer sub-skills for each specified engine+tier label. Defaults to 'cc cx' (10 reviewers) if no arguments given. Argument format: space-separated labels from {cc, cc-deep, cx, cx-deep} Examples: 'cc cx' (default), 'cc-deep cx-deep', 'cc', 'cx-deep' Use when: - Running code reviews on PRs, commits, or branches - Running design reviews on issues or documents - Need multi-perspective review (security, architecture, code, QA, historian)
brainstorming
Ambiguity-reduction workflow for requests that are not yet plan-ready or implementation-ready. Use when there are multiple plausible approaches, the task is user-facing or design-shaping, requirements are fuzzy, or Codex needs to compare 2-3 options with trade-offs before choosing a direction.
databricks-local
Databricks local additions - Queries API, VARIANT/JSON, Dashboard API, dbt integration, Jupyter kernel Supplements the official `databricks` skill with project-specific patterns. Use when: - Working with Databricks Queries API (saved queries) - Handling VARIANT type or JSON operations - Working with Lakeview Dashboard API - Integrating dbt with Databricks JSON/VARIANT columns - Running Jupyter notebooks with Databricks kernel
codex-prompting-local
Portable Codex prompt, review-contract, and resume-handoff guidance adapted from codex-plugin-cc for this repo's Nix-managed Codex CLI and Claude Code setup. Use when: - Composing prompts for Codex or GPT-5.4-based subagents - Designing structured review or adversarial-review prompt contracts - Writing resumable task prompts or result handoffs - Re-expressing useful old slash-command workflows on the skills side instead of reviving slash commands
nix
Nix commands and package management guide. Use when: - Using nurl for hash acquisition
bigquery-local
BigQuery local additions - cost-aware query patterns and project conventions. Supplements general BigQuery knowledge with guardrails. Use when: - Running bq commands - Writing GoogleSQL queries - Designing partitioned/clustered tables
Didn't find tool you were looking for?