Installs into .claude/skills of the current project.
Are you the author of Gate Diff Only Test Coverage On Changed Lines Before Merging With Diff Cover?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/agentskillexchange-gate-diff-only-test-coverage-on-changed-lines-befo)
---
name: "Gate Diff Only Test Coverage On Changed Lines Before Merging With Diff Cover"
slug: "gate-diff-only-test-coverage-on-changed-lines-before-merging-with-diff-cover"
description: "Compare coverage reports against a git diff so an agent can flag newly changed lines that still lack tests before merge."
github_stars: 828
verification: "security_reviewed"
source: "https://github.com/Bachmann1234/diff_cover"
author: "Matthias Bachmann and contributors"
publisher_type: "Open Source"
category: "Code Quality & Review"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "Bachmann1234/diff_cover"
github_stars: 828
---
# Gate Diff Only Test Coverage On Changed Lines Before Merging With Diff Cover
Compare coverage reports against a git diff so an agent can flag newly changed lines that still lack tests before merge.
## Prerequisites
Git, supported XML or LCov coverage report, Python 3, pip
## Installation
Use the upstream install or setup path that matches your environment:
- pip install diff-cover
- git clone https://github.com/Bachmann1234/diff-cover.git
- make a pull request from your fork.
- pip install poetry
Requirements and caveats from upstream:
- Currently, diff-cover requires that:
- coverage.py__ (Python)
- poetry manages a python virtual environment and organizes dependencies. It also
Basic usage or getting-started notes:
- ------------
- To install the latest release:
- .. code:: bash
- Source: https://github.com/Bachmann1234/diff_cover
- Extracted from upstream docs: https://raw.githubusercontent.com/Bachmann1234/diff_cover/HEAD/README.rst
## Documentation
- https://github.com/Bachmann1234/diff_cover
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/gate-diff-only-test-coverage-on-changed-lines-before-merging-with-diff-cover/)