Token导航 LogoToken导航

Agent Skill · 研究检索

git-bisect(git 二等分)

git-bisect 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

git-bisect 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 54,843。

总安装 494周安装 21GitHub Stars 450下载 173核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-bisect(git 二等分)
来源仓库:https://github.com/ag-grid/ag-charts
仓库路径:skills/git-bisect
安装命令:
npx skills add https://github.com/ag-grid/ag-charts --skill git-bisect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ag-grid/ag-charts --skill git-bisect

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

git-bisect 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于 Git 二分查找相关信息的检索与筛选任务。通过 npx skills add 命令从 GitHub 仓库安装,需确认权限与维护状态。

使用前建议核实是否会触发联网、命令执行或文件读写操作。可结合原始 README 进一步验证具体用法和功能边界。

来源仓库内路径:skills/git-bisect

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ag-grid/ag-charts --skill git-bisect;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

git-bisect 怎么安装?

在终端执行 npx skills add https://github.com/ag-grid/ag-charts --skill git-bisect。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-bisect 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-bisect 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

git-bisect 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

git-bisect 用的人多吗?

公开数据是累计安装 494 次,近一周安装 21 次,下载 173 次,GitHub 450 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-bisect 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
git-bisect

git 二等分 · 本页

494450只读未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Git Bisect - Find the Commit That Introduced Test Failures

You are an expert software engineer helping to identify the commit that introduced test failures or flakiness using git bisect.

Your goal is to systematically bisect the git history to find the exact commit that introduced the issue.

Help

If the user provides a command option of help:

  • Explain how to use this prompt.
  • Explain if they are missing any prerequisites or tooling requirements.
  • DO NOT proceed, exit the prompt immediately after these steps.

1. IMPORTANT TOOLING REQUIREMENTS - STOP IF THESE ARE NOT MET

  • Git CLI must be available.
  • The repository must be in a clean state or have only intended changes.
  • Test commands must be executable (e.g., nx test, yarn test).
  • Use NX_DAEMON=false to avoid async Nx daemon project graph re-calculation from affecting execution stability.
  • Worktree support: The script handles git worktrees automatically, but ensure node_modules are accessible (either in the worktree or the main repository).

2. Workflow

Phase 0: Parse Arguments

The user provides ${ARGUMENTS} which should contain:

  • Bad commit/branch: The commit or branch where the issue is present (default: HEAD or latest)
  • Good commit/branch: The commit or branch where the issue is NOT present (e.g., origin/bX.Y.Z)
  • Test command: The command to run to verify if the issue is present (default: ${ARGUMENTS} if it looks like a test command)

Parse ${ARGUMENTS} to extract:

  • BAD_REF: Commit/branch where tests fail
  • GOOD_REF: Commit/branch where tests pass
  • TEST_COMMAND: Command to execute for each bisect step

Example argument formats:

  • bad=HEAD good=origin/b12.3.0 test="yarn nx test package-name --testPathPattern='test.test.ts'"
  • HEAD origin/b12.3.0 "yarn nx test package-name --testPathPattern='test.test.ts'"
  • "yarn nx test package-name --testPathPattern='test.test.ts'" (uses HEAD as bad, prompts for good)

Phase 1: Verify the Issue

  1. Check current state: git status git log -1 --oneline REPO_ROOT=$(git rev-parse --show-toplevel)
  2. Validate test files exist (if test command references specific files): # Extract test file patterns from TEST_COMMAND if possible # This helps catch issues early (e.g., testing wrong package)
  3. Verify the issue exists on the bad commit: git checkout ${BAD_REF} export NX_DAEMON=false # Handle node_modules for worktrees REPO_ROOT=$(git rev-parse --show-toplevel) if [! -d "${REPO_ROOT}/node_modules/.bin"]; then MAIN_WORKTREE=$(git rev-parse --git-dir | sed 's|/\\.git/worktrees/.*|/.git|' 2>/dev/null) if [-n "$MAIN_WORKTREE"] && [-d "$MAIN_WORKTREE/../node_modules/.bin"]; then export PATH="$(dirname "$MAIN_WORKTREE")/node_modules/.bin:$PATH" fi fi ${TEST_COMMAND}

- If tests pass, inform the user that the issue is not present and ask for confirmation. - If tests fail, proceed to Phase 2. - If test files are not found, verify the package name and file path are correct.

Phase 2: Start Git Bisect

  1. Initialize bisect: git bisect start git bisect bad ${BAD_REF} git bisect good ${GOOD_REF}
  2. Verify bisect range: git bisect visualize --oneline | head -20 This shows the commits that will be tested.

Phase 3: Automated Bisect (Recommended)

  1. Determine repository root (handles worktrees): # Get the git root directory (works for both regular repos and worktrees) REPO_ROOT=$(git rev-parse --show-toplevel) echo "Repository root: $REPO_ROOT" # Check if we're in a worktree and find main worktree if needed GIT_DIR=$(git rev-parse --git-dir) MAIN_WORKTREE="" if echo "$GIT_DIR" | grep -q worktrees; then echo "Detected git worktree" # Extract main worktree path MAIN_GIT_DIR=$(echo "$GIT_DIR" | sed 's|/\\.git/worktrees/.*|/.git|') if [-d "$MAIN_GIT_DIR"]; then MAIN_WORKTREE=$(cd "$MAIN_GIT_DIR/.." && pwd) fi fi
  2. Create a test script: # Use a workspace-relative temp directory BISECT_SCRIPT="${REPO_ROOT}/tmp/bisect_test.sh" mkdir -p "$(dirname "$BISECT_SCRIPT")" cat > "$BISECT_SCRIPT" << EOF #!/bin/bash set -e cd "${REPO_ROOT}" # Export NX_DAEMON=false to avoid async daemon issues export NX_DAEMON=false # Handle node_modules location (for worktrees that share node_modules) if [! -d "node_modules/.bin"] && [-n "${MAIN_WORKTREE}"] && [-d "${MAIN_WORKTREE}/node_modules/.bin"]; then export PATH="${MAIN_WORKTREE}/node_modules/.bin:$PATH" fi # Run the test command ${TEST_COMMAND} EOF chmod +x "$BISECT_SCRIPT"
  3. Run automated bisect: git bisect run "$BISECT_SCRIPT"
  4. Handle special cases:

- Build errors (not test failures): If a commit has build errors that prevent tests from running, skip it: git bisect skip - Test files don't exist: If a test file doesn't exist in older commits, modify the test script to handle this gracefully - Unexpected test failures: If tests fail in an unexpected way, skip it: git bisect skip

Phase 4: Manual Bisect (If Automated Fails)

If automated bisect encounters issues, proceed manually:

  1. Check current commit: git log -1 --oneline
  2. Run tests: export NX_DAEMON=false ${TEST_COMMAND}
  3. Mark result:

- If tests pass (issue not present): git bisect good - If tests fail (issue present): git bisect bad - If build errors or unexpected failures: git bisect skip

  1. Repeat until git bisect identifies the culprit commit.

Phase 5: Identify the Culprit

  1. Get the culprit commit: git bisect log git log -1 --oneline
  2. Examine the commit: git show --stat ${CULPRIT_COMMIT} git show ${CULPRIT_COMMIT}
  3. Reset bisect: git bisect reset

Phase 6: Report Results

Provide a summary:

## Git Bisect Results

**Issue:** ${TEST_COMMAND} failures
**Bad commit:** ${BAD_REF} (${BAD_COMMIT_HASH})
**Good commit:** ${GOOD_REF} (${GOOD_COMMIT_HASH})
**Culprit commit:** ${CULPRIT_COMMIT_HASH}

**Culprit commit details:**

-   Author: ${AUTHOR}
-   Date: ${DATE}
-   Message: ${COMMIT_MESSAGE}
-   Files changed: ${FILES_CHANGED}

**Next steps:**

1. Review the changes in ${CULPRIT_COMMIT_HASH}
2. Identify the specific change that introduced the issue
3. Fix the issue or revert the problematic change

4. Important Guidelines

Test Command Requirements

  • Exit codes: The test command must exit with code 0 on success and non-zero on failure.
  • Timeout: Long-running tests may need timeouts. Consider wrapping: timeout 60 ${TEST_COMMAND}
  • Multiple tests: If testing multiple test files, combine with &&: yarn nx test package1 --testPathPattern="test1.test.ts" && \ yarn nx test package2 --testPathPattern="test2.test.ts"

Handling Flaky Tests

  • If tests are flaky (sometimes pass, sometimes fail), consider:

- Running tests multiple times: for i in {1..3}; do ${TEST_COMMAND} && break; done - Using a more lenient script that allows some failures - Documenting the flakiness in the report

Skipping Commits

Always skip commits that:

  • Have build/compilation errors preventing tests from running
  • Have merge conflicts
  • Fail tests in unexpected ways (different error than the target issue)
  • Are known to be broken for unrelated reasons

Performance Considerations

  • Use NX_DAEMON=false to avoid async daemon issues
  • Consider using --testPathPattern to limit test scope
  • For very large bisect ranges, consider narrowing the range first
  • Worktree performance: If using a worktree, builds may be slower if node_modules are shared

5. Common Patterns

Testing Multiple Test Files

# Test files in different packages
TEST_COMMAND="yarn nx test package1 --testPathPattern='test1.test.ts' && \
              yarn nx test package2 --testPathPattern='test2.test.ts'"

Important: When testing files in different packages, ensure:

  • Each package name matches the actual package structure
  • Test files exist in the specified packages
  • Use --passWithNoTests flag if a test file might not exist in older commits

Testing with Specific Test Names

TEST_COMMAND="yarn nx test package-name --testPathPattern='test.test.ts' --testNamePattern='specific test name'"

6. Error Recovery

If bisect gets stuck or produces unexpected results:

  1. Check bisect state: git bisect log git bisect visualize
  2. Reset and restart if needed: git bisect reset # Start over from Phase 2
  3. Narrow the range manually: # Test a commit in the middle manually git checkout ${MIDDLE_COMMIT} ${TEST_COMMAND} # Then restart bisect with narrower range

7. Command Arguments

Format: ${ARGUMENTS} can be:

  • bad=<ref> good=<ref> test="<command>" - Full specification
  • <bad-ref> <good-ref> "<test-command>" - Positional arguments
  • "<test-command>" - Test command only (prompts for bad/good refs)

Examples:

  • /git/bisect bad=HEAD good=origin/b12.3.0 test="yarn nx test package-name --testPathPattern='test.test.ts'"
  • /git/bisect HEAD origin/b12.3.0 "yarn nx test package-name --testPathPattern='test.test.ts'"
  • /git/bisect "yarn nx test package-name --testPathPattern='test.test.ts'"

平台分布

Codex

37.42%
按下载量换算65

Claude

27.54%
按下载量换算48

Cursor

16.96%
按下载量换算29

Gemini CLI

9.94%
按下载量换算17

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills