Automatically performs git bisect to identify the first bad commit that introduced a bug or failure. Use when debugging regressions, tracking down when a test started failing, or identifying which commit broke functionality. Handles flaky tests with retry logic and provides comprehensive reports with bisect logs and confidence levels.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill git-bisect-assistant
Automates the git bisect process to efficiently identify the first bad commit responsible for a bug or test failure.
Basic usage pattern:
python scripts/git_bisect_runner.py \
--good <known-good-commit> \
--bad <known-bad-commit> \
--test "<test-command>"
Example:
python scripts/git_bisect_runner.py \
--good v1.0.0 \
--bad HEAD \
--test "pytest tests/test_feature.py::test_specific_case"
git_bisect_runner.py script with appropriate parameters--good: Known good revision (commit hash, tag, or branch name)--test: Shell command to test each commit. Exit code 0 = good, non-zero = bad--bad: Known bad revision (default: HEAD)--repo: Repository path (default: current directory)--retries: Number of test runs per commit for flaky tests (default: 1)--timeout: Test execution timeout in seconds (default: no timeout)For non-deterministic tests, use --retries to run the test multiple times per commit:
python scripts/git_bisect_runner.py \
--good abc123 \
--bad HEAD \
--test "npm test" \
--retries 3
The script uses majority voting: if a test passes 2 out of 3 times, the commit is marked as good.
The test command should:
--retries for flaky tests--timeoutExamples:
# Python test
--test "pytest tests/test_auth.py -v"
# Shell script
--test "./scripts/verify_build.sh"
# Compilation check
--test "make && ./bin/app --version"
# Multiple commands
--test "npm install && npm test"
The script generates a comprehensive report including:
User: "The integration tests started failing sometime in the last 20 commits"
python scripts/git_bisect_runner.py \
--good HEAD~20 \
--bad HEAD \
--test "pytest tests/integration/"
User: "Feature X worked in v2.1.0 but is broken now"
python scripts/git_bisect_runner.py \
--good v2.1.0 \
--bad HEAD \
--test "python -c 'import app; assert app.feature_x() == expected'"
User: "A test fails intermittently, need to find when it started"
python scripts/git_bisect_runner.py \
--good main \
--bad feature-branch \
--test "pytest tests/test_flaky.py" \
--retries 5 \
--timeout 30
Bisect fails to start: Verify good and bad revisions exist and are valid git references
Test command fails unexpectedly: Test the command manually on a known good/bad commit first
Inconsistent results: Increase --retries or check for environmental factors affecting tests
Timeout too short: Increase --timeout or optimize test command
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Modern JavaScript/TypeScript development with Bun runtime. Covers package management, bundling, testing, and migration from Node.js. Use when working with Bun, optimizing JS/TS development speed, or migrating from Node.js to Bun.
You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.
Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.
Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
Take arabelatso/git-bisect-assistant from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.