Identifies bug-introducing commits using SZZ-style analysis based on bug-fixing commits, commit history, and code blame information. Use this skill when you need to trace bugs back to their origin, identify which commits introduced bugs, analyze bug-fix commits to find root causes, perform software repository mining for bug analysis, or conduct empirical studies on software defects. Triggers when users ask to find bug-introducing commits, identify when a bug was introduced, trace bug origins, perform SZZ analysis, or analyze bug-fixing commits.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill szz-bug-introducing-commit-identifier
This skill performs SZZ (Śliwerski-Zimmermann-Zeller) algorithm analysis to identify bug-introducing commits in git repositories. Given a bug-fixing commit, it traces modified lines back through version history using git blame to find candidate commits that originally introduced the buggy code.
Start by identifying the commit that fixes the bug. This can be obtained from:
Use the provided script to perform the analysis:
python scripts/szz_analyzer.py <fix-commit-hash>
Options:
--repo <path>: Specify repository path (default: current directory)--json: Output results in JSON format for programmatic processing--top <n>: Number of top candidates to show (default: 10)Example:
python scripts/szz_analyzer.py abc123def --repo /path/to/repo --top 5
The script outputs a ranked list of candidate bug-introducing commits with:
Always manually review the top candidates:
High Confidence (0.8-1.0):
Medium Confidence (0.5-0.8):
Low Confidence (0.0-0.5):
The script automatically filters common false positives:
Automatically Filtered Lines:
Reduced Confidence for:
User: "Find which commit introduced the bug fixed in commit abc123"
→ Run: python scripts/szz_analyzer.py abc123
→ Review top candidates and examine their changes
User: "Who introduced the authentication bug?"
→ First identify the fix commit
→ Run SZZ analysis
→ Check the author field of top candidates
User: "Analyze all bug-introducing commits from the last release"
→ Identify all bug-fix commits
→ Run SZZ analysis on each
→ Aggregate results to find patterns
User: "Generate dataset of bug-introducing commits for analysis"
→ Run SZZ analysis with --json flag
→ Process JSON output for statistical analysis
Use JSON output for integration with other tools:
import subprocess
import json
result = subprocess.run(
['python', 'scripts/szz_analyzer.py', 'abc123', '--json'],
capture_output=True,
text=True
)
candidates = json.loads(result.stdout)
for candidate in candidates:
print(f"{candidate['commit_hash']}: {candidate['confidence_score']}")
Analyze multiple bug fixes:
for commit in $(git log --grep="fix:" --format="%H"); do
echo "Analyzing fix: $commit"
python scripts/szz_analyzer.py $commit --top 3
done
The main analysis script that performs SZZ algorithm implementation. It:
Comprehensive documentation on the SZZ algorithm including:
Read this reference when you need deeper understanding of the algorithm, want to customize filtering heuristics, or need to explain the methodology to users.
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
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
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take arabelatso/szz-bug-introducing-commit-identifier 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.