TiDB Test Diff Triage
pingcap/tidb
Investigates TiDB plan or test-result diffs that the change does not explain, ruling out failpoint setup and merge effects before expected outputs are updated.
Locate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies.
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/regression-root-cause-analyzer .claude/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .claude/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/regression-root-cause-analyzer .agents/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .agents/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/regression-root-cause-analyzer .cursor/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .cursor/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ArabelaTso/Skills-4-SE.git --path skills/regression-root-cause-analyzer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/regression-root-cause-analyzer .gemini/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .gemini/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/regression-root-cause-analyzer .github/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .github/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ArabelaTso/Skills-4-SE regression-root-cause-analyzer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/regression-root-cause-analyzer .opencode/skills/regression-root-cause-analyzer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "regression-root-cause-analyzer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/regression-root-cause-analyzer into .opencode/skills/regression-root-cause-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "regression-root-cause-analyzer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
regression-root-cause-analyzerLocate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies.
Regression Root Cause Analyzer is an agent skill from ArabelaTso/Skills-4-SE. Locate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies. Use when regression tests start failing after code changes, investigating test failures in CI/CD, debugging flaky tests, or understanding why previously passing tests now fail. Analyzes git diffs, stack traces, test output, and dependency changes to produce structured markdown reports ranking likely causes. Triggers when users ask to find why tests are failing, debug regression failures, investigate…
Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/failure-patterns.md`).
It sits in Testing & QA, covering Failing and flaky tests, Root cause analysis and Debugging. It works with Git. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitpytestpipnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, pip and npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Regression Root Cause Analyzer loads about 3.4k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 148 tokens; SKILL.md has 1,029 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 1,029 words, ~3,407 tokens.
.claude/skills/regression-root-cause-analyzer/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Systematically investigate failing regression tests to identify root causes by analyzing code changes, error messages, test dependencies, and common failure patterns.
Collect essential details about the test failure:
Test failure details:
Quick commands to gather info:
# Run the failing test
pytest path/to/test_file.py::test_name -v
# Get recent commits
git log --oneline -10
# Check current branch and status
git status
git branch
# See what changed recently
git log --since="1 week ago" --oneline
# Check for uncommitted changes
git diffParse the error message and stack trace for clues. See failure-patterns.md for common patterns.
Error type indicators:
ImportError / ModuleNotFoundError:
ImportError: cannot import name 'UserService' from 'app.services'app/services/AttributeError:
AttributeError: 'User' object has no attribute 'email_address'User class definition changesTypeError (arguments):
TypeError: process_data() got an unexpected keyword argument 'format'process_data definition and recent changesAssertionError:
AssertionError: assert 3 == 2KeyError / IndexError:
KeyError: 'status'Use git to find what changed since tests last passed.
# If you know the last good commit
git diff <last-good-commit> <current-commit>
# Check specific file changes
git log -p path/to/file.py
# See what changed in last N commits
git log -p -n 5
# Find commits that touched specific function
git log -S "function_name" -pPriority order for investigation:
Commands to find changes:
# What files changed recently?
git diff --name-only HEAD~5..HEAD
# Changes to specific file
git diff HEAD~5..HEAD path/to/file.py
# Changes to test file
git diff HEAD~5..HEAD path/to/test_file.py
# Changes to requirements
git diff HEAD~5..HEAD requirements.txt package.jsonMatch the error to common patterns:
Symptoms:
TypeError: missing required argumentTypeError: got unexpected keyword argumentInvestigation steps:
grep -r "def function_name" .git log -p -S "def function_name"Symptoms:
AttributeError when accessing return valueTypeError: 'NoneType' object is not iterableInvestigation steps:
return [] to return NoneSymptoms:
pip install or npm installInvestigation steps:
git diff HEAD~5..HEAD requirements.txtSymptoms:
Investigation steps:
pytest test_file.py::test_oneProduce a structured markdown report:
test_user_registrationTypeError: process_user() got an unexpected keyword argument 'email_format'The process_user() function signature changed in commit abc123. The parameter email_format was renamed to email_type.
Evidence:
app/users.pydef process_user(data, email_format="html")def process_user(data, email_type="html")process_user(user_data, email_format="html")This is the direct cause of the TypeError.
Update test to use new parameter name:
# Before
result = process_user(user_data, email_format="html")
# After
result = process_user(user_data, email_type="html")The function behavior is otherwise unchanged. Only the parameter name differs.
Likelihood: Low (10%)
The test fixture might have changed, but review shows fixtures are unchanged.
Likelihood: Very Low (5%)
Could be environment-related, but error is consistent locally and in CI.
pytest tests/test_users.py::test_user_registrationpytest tests/test_users.py::test_user_registrationBefore finalizing the analysis:
Test the hypothesis:
If fix doesn't work:
Commands to verify:
# Run the specific failing test
pytest path/to/test.py::test_name -v
# Run all related tests
pytest path/to/test.py -v
# Run with verbose output
pytest path/to/test.py::test_name -vv
# Run with print statements visible
pytest path/to/test.py::test_name -sFind exact commit that broke tests:
# Start bisect
git bisect start
# Mark current (broken) commit
git bisect bad
# Mark last known good commit
git bisect good <commit-hash>
# Git will checkout middle commit
# Run tests, then mark good or bad
pytest tests/
# If tests pass
git bisect good
# If tests fail
git bisect bad
# Repeat until git finds the breaking commitDiff approach:
# Compare file between commits
git diff <good-commit>:<path> <bad-commit>:<path>
# Show file at specific commit
git show <commit>:path/to/file.pyCheckout approach:
# Temporarily checkout old version
git checkout <good-commit> path/to/file.py
# Run tests
pytest tests/
# Restore current version
git checkout HEAD path/to/file.pyMinimal reproduction:
Example:
# Simplified test
def test_minimal_repro():
# Reproduce just the failing assertion
result = function_under_test(input)
assert result == expected # This failsFixture issues:
# Check what fixtures provide
def test_debug_fixture(sample_user):
print(f"Fixture data: {sample_user}")
assert False # Force test to show outputMock issues:
# Verify mock is called
@patch('module.function')
def test_with_mock(mock_func):
mock_func.return_value = "test"
result = code_that_uses_function()
print(f"Mock called: {mock_func.called}")
print(f"Call args: {mock_func.call_args}")Setup/teardown:
# Check state before/after
def test_check_state():
print(f"Before: {get_current_state()}")
run_test_code()
print(f"After: {get_current_state()}")# Show commits that changed a file
git log --follow path/to/file.py
# Show commits with specific content
git log -S "function_name" --source --all
# Show commits by author
git log --author="AuthorName" --since="1 week ago"
# Show detailed commit
git show <commit-hash>
# Compare branches
git diff main feature-branch# Run with maximum verbosity
pytest -vv
# Show print statements
pytest -s
# Stop at first failure
pytest -x
# Show local variables on failure
pytest -l
# Run last failed tests
pytest --lf
# Run tests that failed, then all
pytest --ff
# Collect tests without running
pytest --collect-only
# Show slowest tests
pytest --durations=10# Add breakpoint
import pdb; pdb.set_trace()
# Or in Python 3.7+
breakpoint()
# Print stack trace
import traceback
traceback.print_stack()
# Inspect object
import pprint
pprint.pprint(vars(obj))User request:
"Tests started failing with TypeError about unexpected keyword argument"
Investigation:
TypeError: process() got unexpected keyword argument 'format'grep -r "def process" .git log -p -S "def process"Report:
## Root Cause: Parameter Renamed
Function `process()` parameter `format` renamed to `output_format` in commit abc123.
**Fix**: Update test call from `process(data, format="json")` to `process(data, output_format="json")`
**Likelihood**: High (99%)User request:
"Test passes sometimes but fails randomly"
Investigation:
for i in {1..10}; do pytest test.py; doneReport:
## Root Cause: Race Condition
Test has race condition in async code. The async operation sometimes completes before assertion, sometimes after.
**Evidence**: Test fails ~30% of the time when run repeatedly.
**Fix**: Add proper await or increase timeout.
**Likelihood**: High (85%)User request:
"All tests started failing after pip install"
Investigation:
git diff HEAD~1 requirements.txtrequests 2.28.0 → 2.31.0pip install requests==2.28.0Report:
## Root Cause: Breaking Change in requests 2.31.0
The `requests` library changed response encoding behavior in v2.31.0.
**Evidence**:
- Tests pass with requests==2.28.0
- Tests fail with requests==2.31.0
- Changelog mentions encoding changes
**Fix**: Update test expectations or pin requests version.
**Likelihood**: High (95%)Start with the obvious:
Follow the stack trace:
Look for patterns:
Use version control:
git bisect for complex casesVerify assumptions:
Document findings:
For comprehensive failure patterns and their causes, see failure-patterns.md.
© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/regression-root-cause-analyzer of ArabelaTso/Skills-4-SE.
Open the folder on GitHubat commit 4f38503
Regression Root Cause Analyzer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Regression Root Cause Analyzer this skillArabelaTso/Skills-4-SE | 253 | — | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| TiDB Test Diff Triagepingcap/tidb | 41k | — | ~498 | Automated safety check: Pass | Apache-2.0 | |
| Debugging and Error Recoveryaddyosmani/agent-skills | 103k | 1 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Debuggnomeria/usbtree | 690 | — | ~715 | Automated safety check: Pass | MIT | |
| Investigateblueberrycongee/termcanvas | 406 | — | ~562 | Automated safety check: Pass | MIT | |
| Pester Failure AnalysisPowerShell/PowerShell | 56k | — | ~5.1k | Automated safety check: Pass | MIT |
pingcap/tidb
Investigates TiDB plan or test-result diffs that the change does not explain, ruling out failpoint setup and merge effects before expected outputs are updated.
addyosmani/agent-skills
Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.
gnomeria/usbtree
Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.
blueberrycongee/termcanvas
Systematic debugging skill. An agent skill from blueberrycongee/termcanvas.
PowerShell/PowerShell
Investigates failing Pester tests in PowerShell CI jobs by following a six-step workflow from pull request status to documented fix recommendations.
different-ai/openwork
Classifies a failing test, typecheck or CI job before any code changes, by recording the failure and running a clean control to show whether it was already broken.
ArabelaTso/Skills-4-SE
Generate prioritized CVE watchlists and actionable security recommendations for repositories.
ArabelaTso/Skills-4-SE
Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).
ArabelaTso/Skills-4-SE
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.
ArabelaTso/Skills-4-SE
Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.
ArabelaTso/Skills-4-SE
Automatically migrate Spring MVC applications to Spring Boot.
ArabelaTso/Skills-4-SE
Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.
Works with
Categories
Locate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies. Regression Root Cause Analyzer is an agent skill from ArabelaTso/Skills-4-SE. Locate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies.
Regression Root Cause Analyzer fits situations like: regression tests start failing after code changes; investigating test failures in CI/CD; debugging flaky tests; understanding why previously passing tests now fail.
Run `npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a claude-code`. Or copy the skill folder (skills/regression-root-cause-analyzer in ArabelaTso/Skills-4-SE) into .claude/skills/regression-root-cause-analyzer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a codex`. Or copy the skill folder (skills/regression-root-cause-analyzer in ArabelaTso/Skills-4-SE) into .agents/skills/regression-root-cause-analyzer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill regression-root-cause-analyzer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/regression-root-cause-analyzer, .gemini/skills/regression-root-cause-analyzer, .github/skills/regression-root-cause-analyzer and .opencode/skills/regression-root-cause-analyzer in your project.
Going by SKILL.md and its folder, Regression Root Cause Analyzer needs the command-line tools its instructions call (git, pytest, pip and npm). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use git, pip and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Regression Root Cause Analyzer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Regression Root Cause Analyzer: TiDB Test Diff Triage (pingcap/tidb, 41k stars), Debugging and Error Recovery (addyosmani/agent-skills, 103k stars), Debug (gnomeria/usbtree, 690 stars) and Investigate (blueberrycongee/termcanvas, 406 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on August 21, 2026.
Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.