Skip to content
Skills Library
Programming · Analysis

binary-search-debugging

/binary-search-debugging

Halve the search space repeatedly across code, data, time, and configuration until a single change isolates the failure. Use when the fault could live anywhere across a large surface and reading it all in order is too slow.

Repository
AI-SKILLS ↗
Licence
MIT
Last repository change
05.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Halve the search space repeatedly across code, data, time, and configuration until a single change isolates the failure. Use when the fault could live anywhere across a large surface and reading it all in order is too slow.

Original author description

Halve the search space repeatedly across code, data, time, and configuration until a single change isolates the failure. Use when the fault could live anywhere across a large surface and reading it all in order is too slow.

How it works

  1. Method
  2. Signals
  3. Boundaries
Original SKILL.md headings · 45 lines, 390 words
SKILL.md preview
---
name: binary-search-debugging
description: Halve the search space repeatedly across code, data, time, and configuration until a single change isolates the failure. Use when the fault could live anywhere across a large surface and reading it all in order is too slow.
---

# Binary search debugging

When a failure could start in any of a thousand lines, inputs, or flags,
reading them in sequence is the slowest route there is. Bisection converts a
thousand suspects into about ten questions: a probe at the midpoint either
clears half the space or condemns it. The craft is choosing a clean midpoint in
whichever dimension the bug is hiding.

## Method

1. **Establish two anchor points before splitting.** Find one state where the
   bug is present and one where it is absent. Without both ends you have nothing
   to bisect, only a hunch to chase.
2. **Bisect the code path.** Drop a probe halfway down the call chain that
   asserts a known-good invariant. Holds there means the fault is downstream;
   broken means upstream. Move the probe into the surviving half and repeat.
3. **Bisect the data.** Feed the first half of the failing input, then the
   second, keeping the half that still fails. A 10,000-row file that crashes
   narrows to the offending row in about 14 splits.
4. **Bisect configuration and feature flags.** Toggle half the flags, plugins,
   or env overrides at once. When the outcome flips, the trigger sits in the set
   you just changed. Binary elimination beats flipping switches one at a time.
5. **Bisect uncommitted time by comment-out.** For "it worked an hour ago" with
   no clean commit to blame, disable half the changed region and rerun. This
   finds the guilty block even inside a single unstaged edit.
6. **Change exactly one variable per step.** Split data and code in the same
   run and a flipped result names neither cause. One cut, one rerun, one
   conclusion, written down before the next split.
7. **Stop at a one-line delta.** Keep halving until the gap between pass and
   fail is a single line, row, or flag. That delta is either the bug or a
   finger pointing straight at it.

## Signals

- Does each probe roughly halve the remaining suspects, not trim a handful?
- Are both anchor points still reproducible, or did one quietly drift?
- When a split flipped the outcome, was exactly one thing different?

## Boundaries

Bisecting version history is mechanical enough to automate: hand that to
git-bisect. When the space is already small or a stack trace names the line,
read it directly instead of halving out of habit.

Versions

The database has no other skills named binary-search-debugging.

Database snapshot: 13.11.2026 · package version 1f0312b02f9f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90diagnosing-bugs
    Systematic debugging discipline based on David Agans' nine rules, understand the system, reproduce reliably, bisect the search space, change one variable at a time, keep an audit trail, and never declare a fix done until it's verified against the original failure. Use when the…
  • 100problem-locating-solving
    Use when locating a bug in an unfamiliar codebase, tracing a failure from symptom to source, or choosing between candidate fixes after the symptom is observed but before a patch lands. Covers the locate-to-solve workflow: problem-statement contract, search-space reduction,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.