pre-merge

Run parallel pre-merge quality checks on changed Python code and tests.

Updated Sep 9, 2024
One-click install
npx skills add https://github.com/axel-kaliff/dotfiles --skill pre-merge-axel-kaliff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-merge
Source: https://github.com/axel-kaliff/dotfiles/tree/main/claude/.claude/skills/pre-merge
Command: npx skills add https://github.com/axel-kaliff/dotfiles --skill pre-merge-axel-kaliff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents merging branches that introduce regressions, style, security, or consistency issues by running a coordinated suite of analysis tools and review agents and reporting only new findings tied to changed lines.

Core Features & Use Cases

  • Parallel multi-agent checks: Orchestrates static analysis, style-guide checks, unit tests with diff coverage, semgrep SAST, architecture/import-linter checks, deduplication, test-separation checks, web confirmation, grumpy reviewer, and a hierarchical consistency check in parallel.
  • Changed-line focus and scoring: Filters results to only changed lines, collects canonical FINDINGS blocks, and delegates deduplication and scoring to a score-findings sub-skill to produce a single prioritized report.
  • Disk-persisted sequential mode: Supports a slower, persistent pipeline for large changes via --sequential or --batch to avoid context overflow and preserve findings.
  • Use Cases: Final PR quality gate before merging, pre-release validation, or an automated merge blocking check in CI.

Quick Start

Run a full pre-merge analysis of the current branch against origin/master and return a unified readiness report.

Frequently Asked Questions about pre-merge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run pre-merge quality checks on only the changed lines in a Python pull request?

Pre-merge quality checks diff your feature branch against a git base commit, executing static analysis, unit tests with diff-coverage, and SAST in parallel to surface only new findings tied to changed lines.

What is the best way to automate regression and security checks before merging a Python feature branch?

Automating regression and security checks before merging requires running a coordinated suite of analysis tools like ruff, ty, pytest, and semgrep in parallel, filtering results to changed lines to block new issues.

Can I use ruff, pytest, and semgrep together for automated code review in CI?

Pre-merge checks gracefully skip missing local tooling like ruff, ty, pytest, semgrep, or import-linter, allowing the pipeline to execute available checks without failing on absent dependencies.

How do I prevent context overflow when running static analysis and unit tests on large code changes?

Pre-merge checks support disk-persisted sequential mode via flags, enabling slower persistent pipelines for large changes to avoid context overflow and preserve findings across runs.

Does pre-merge testing work without import-linter or other specific local tools installed?

Pre-merge checks gracefully skip missing local tooling like ruff, ty, pytest, semgrep, or import-linter, allowing the pipeline to execute available checks without failing on absent dependencies.