# Bisect

> Find the commit that introduced a regression using git bisect, guided by a description of what broke and a way to test it. Use when the user says "find the commit that broke this", "bisect this regression", "when did this stop working", "git bisect", or "what change caused this bug".

- **Type:** Skill
- **Install:** `agentstack add skill-pradnyeshp-claude-skills-bisect`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Pradnyeshp](https://agentstack.voostack.com/s/pradnyeshp)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Pradnyeshp](https://github.com/Pradnyeshp)
- **Source:** https://github.com/Pradnyeshp/Claude-Skills/tree/main/.claude/skills/bisect

## Install

```sh
agentstack add skill-pradnyeshp-claude-skills-bisect
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Repo state

!`git log --oneline -15 2>/dev/null || echo "Not a git repository"`

!`git tag --sort=-creatordate 2>/dev/null | head -10`

!`git status --short 2>/dev/null`

## Instructions

Locate the commit that introduced the regression described in `$ARGUMENTS` using `git bisect`. If the symptom or a way to reproduce it isn't clear, ask before touching the repo.

### Before starting

1. **Confirm the working tree is clean.** If there are uncommitted changes, stop and tell the user to stash or commit first — bisect checks out old commits and would clobber or be blocked by them.
2. **Establish a "bad" and a "good" ref.** "Bad" is usually `HEAD`. For "good", use the ref the user named, or help find a plausible older commit/tag where the behavior worked. Verify the assumption if cheap (e.g. note when the relevant code was last touched).
3. **Define a precise pass/fail test.** A single command that exits 0 when good and non-zero when bad is ideal (a failing test, a build, a script, a grep on output). Pin this down — a fuzzy "it looks broken" makes bisect unreliable.

### Running the bisect

1. Start: `git bisect start`, then `git bisect bad ` and `git bisect good `.
2. **Prefer `git bisect run `** when a deterministic test command exists — it automates the whole search. Make sure the command's exit code reflects pass/fail (use exit code `125` to skip un-testable commits, e.g. ones that don't build for unrelated reasons).
3. If the test must be manual, check out each step, have the user test, and relay `git bisect good` / `git bisect bad` per step.
4. When bisect names the first bad commit, **`git bisect reset`** to restore the original `HEAD` — always clean up, even if interrupted.

### After finding it

1. Show the offending commit: `git show  --stat`, then read the actual diff to explain *why* it caused the regression.
2. Summarize: the first bad commit, what it changed, the likely mechanism of the break, and a suggested fix or revert (`git revert ` for a clean undo).
3. If the cause is subtle, hand off to the `debug` skill to drive the fix.

### Rules

1. Never run bisect with a dirty working tree. Always `git bisect reset` when done or on any error.
2. Keep the pass/fail test deterministic and fast — flaky tests give wrong answers. Use `git bisect skip` for commits that genuinely can't be tested.
3. Don't modify code during the bisect; this is diagnosis. Propose the fix separately once the commit is found.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Pradnyeshp](https://github.com/Pradnyeshp)
- **Source:** [Pradnyeshp/Claude-Skills](https://github.com/Pradnyeshp/Claude-Skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pradnyeshp-claude-skills-bisect
- Seller: https://agentstack.voostack.com/s/pradnyeshp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
