Agent skill

Test Coverage Review

by areed1192 in areed1192/finance-news-aggregator

Audit, plan, write, and verify unit tests for Python projects using pytest.

MITAuto-check passedTesting & QA

Install Test Coverage Review

skills CLI
$ npx skills add areed1192/finance-news-aggregator --skill test-coverage-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install areed1192/finance-news-aggregator test-coverage-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/areed1192/finance-news-aggregator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/test-coverage-review .claude/skills/test-coverage-review && rm -rf skills-src

Use ~/.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/

Facts

Skill name
test-coverage-review
GitHub stars
149
Token cost
~2.6k tokens
SKILL.md length
992 words
Files
2 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Audit, plan, write, and verify unit tests for Python projects using pytest.

  • Works in 10 steps: Naming — File named test_.py, classes… → Docstrings — Module-level docstring,… → Structure — Tests grouped in classes by… → …
  • Someone asks to review test coverage
  • SKILL.md covers Before you start, Modes of operation and Constraints
  • Calls pytest

What it does

Test Coverage Review is an agent skill from areed1192/finance-news-aggregator. Audit, plan, write, and verify unit tests for Python projects using pytest. Use this skill whenever someone asks to review test coverage, write tests, add missing tests, check if code is properly tested, improve test quality, or ensure new features have tests. Trigger on phrases like "write tests for this", "add unit tests", "check my test coverage", "review my tests", "are my tests good enough", "this needs tests", "test this module", or any request involving pytest, unittest, test files, mocking, fixtures, or…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/best-practices.md`).

It sits in Testing & QA, covering Test coverage, Unit testing and Test generation. It works with Python and pytest. The repository describes itself as: A news aggregator in python, that focuses primarily on business and market news sources. The licence is MIT.

When your agent uses it

  • Someone asks to review test coverage
  • Add missing tests
  • Check if code is properly tested
  • Improve test quality

Example prompts

  • “write tests for this”
  • “add unit tests”
  • “check my test coverage”
  • “/test-coverage-review”

Requirements

  • Python 3

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Naming — File named test_.py, classes prefixed Test,
  2. Docstrings — Module-level docstring, class docstring, method docstrings.
  3. Structure — Tests grouped in classes by the unit under test, with
  4. Isolation — No test depends on another test's state or execution order.
  5. Mock boundaries — External I/O (HTTP, filesystem, database) is mocked.
  6. Fixtures — Shared setup uses @pytest.fixture, not setUp() or
  7. Sample data — Test data defined as module-level constants (not buried
  8. Edge cases — Empty inputs, invalid inputs, boundary conditions, and
  9. Assertions — Each test has clear, specific assertions. No tests that
  10. Coverage — Every public method/function has at least one test.

What it can do on your machine

Read from SKILL.md and the folder at commit d4ed7a9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • pytest

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Coverage Review loads about 2.6k tokens when it runs, and up to ~7.1k if it reads all its reference files. Until then it costs about 182 tokens; SKILL.md has 992 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~182
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from areed1192/finance-news-aggregator at commit d4ed7a9, republished under its MIT licence (© areed1192). 992 words, ~2,552 tokens.

Download SKILL.mdSave it as .claude/skills/test-coverage-review/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
test-coverage-review
description
Audit, plan, write, and verify unit tests for Python projects using pytest. Use this skill whenever someone asks to review test coverage, write tests, add missing tests, check if code is properly tested, improve test quality, or ensure new features have tests. Trigger on phrases like "write tests for this", "add unit tests", "check my test coverage", "review my tests", "are my tests good enough", "this needs tests", "test this module", or any request involving pytest, unittest, test files, mocking, fixtures, or code coverage in a Python project. Also trigger when someone finishes writing a feature and needs tests before the work is considered complete, or when they ask about testing best practices.

Test Coverage Review

This skill audits test coverage in Python projects, identifies gaps, writes new tests, and verifies that the test suite passes — all following pytest best practices.

Before you start

Read the best-practices reference file to ground your work:

cat references/best-practices.md

Use the practices and source citations in that file as your authoritative checklist.

Modes of operation

Determine the mode from the user's request.


Mode 1 — Audit existing test coverage

Use when the user says "review my tests", "check my coverage", or "are my tests good enough".

Step 1: Discover the project structure

Identify:

  • The package name and layout (flat or src/ layout)
  • The test directory (tests/, test/, or co-located)
  • The test framework in use (pytest, unittest, or both)
  • Any conftest.py files and shared fixtures
  • Coverage configuration in pyproject.toml, setup.cfg, or .coveragerc

Step 2: Map source modules to test files

For every public module in the package, check whether a corresponding test file exists. Flag modules with no test file at all.

Source moduleTest fileStatus
mypackage/api.pytests/test_api.py✅ exists
mypackage/parser.py—❌ missing

Step 3: Audit test quality

For each existing test file, check against the reference checklist:

  1. Naming — File named test_<module>.py, classes prefixed Test, methods prefixed test_.
  2. Docstrings — Module-level docstring, class docstring, method docstrings.
  3. Structure — Tests grouped in classes by the unit under test, with section dividers between classes.
  4. Isolation — No test depends on another test's state or execution order.
  5. Mock boundaries — External I/O (HTTP, filesystem, database) is mocked. Internal methods are tested directly, not mocked.
  6. Fixtures — Shared setup uses @pytest.fixture, not setUp() or duplicated code.
  7. Sample data — Test data defined as module-level constants (not buried inside fixtures or test methods).
  8. Edge cases — Empty inputs, invalid inputs, boundary conditions, and error paths are tested.
  9. Assertions — Each test has clear, specific assertions. No tests that only check "does not raise".
  10. Coverage — Every public method/function has at least one test. Every branch (if/else, try/except) has coverage.

Step 4: Run coverage (if possible)

bash
pytest tests/ --cov=<package> --cov-report=term-missing --tb=short -q

Report:

  • Overall coverage percentage
  • Specific lines/branches not covered
  • Which modules are below the project's coverage threshold

Step 5: Produce the audit report

Output a markdown table of findings:

FileIssueSeveritySource
tests/test_api.pyNo tests for error paths in fetch()critical[PYTEST-GOOD]
tests/test_parser.py_parse() mocked instead of tested directlywarning[MOCK-BOUND]
—No test file for mypackage/utils.pycritical[COVERAGE]

Severity levels:

  • critical — Public code with no tests, untested error paths, missing test files, live API calls in tests.
  • warning — Missing docstrings, over-mocking, duplicated setup code, missing edge cases.
  • info — Style suggestions, parametrize opportunities, fixture improvements.

Mode 2 — Write tests for new code

Use when the user says "write tests for this", "add tests for this module", or has just finished a feature.

Step 1: Analyze the code under test

Read the module and identify:

  • Every public class and its public methods
  • Every public function
  • Constructor parameters and their types
  • Return types and possible exceptions
  • External dependencies (HTTP calls, file I/O, database, etc.)
  • Edge cases (empty inputs, None values, invalid types, boundary conditions)

Step 2: Plan test categories

For each public class or function, plan tests in these categories:

CategoryWhat to test
Happy pathNormal inputs produce expected outputs
Edge casesEmpty inputs, None, zero, boundary values
Error handlingInvalid inputs raise expected exceptions
Return typesReturn values have correct types and structure
Side effectsExternal calls are made with correct arguments
State changesObject state changes correctly after method calls

Present the plan to the user before writing.

Step 3: Write the test file

Follow this structure:

python
"""Tests for <module description>."""

from unittest.mock import patch, MagicMock

import pytest

from <package>.<module> import <Class>, <function>


# ---------------------------------------------------------------------------
# Sample data
# ---------------------------------------------------------------------------

SAMPLE_DATA = ...  # Module-level test data constants


# ---------------------------------------------------------------------------
# <ClassName> tests
# ---------------------------------------------------------------------------


class Test<ClassName>:
    """Tests for the <ClassName> <type>."""

    def test_<behavior>(self):
        """Verify <what is being tested>."""
        # Arrange
        ...
        # Act
        ...
        # Assert
        ...

Rules:

  • One test file per source module: test_<module>.py
  • Group related tests in class Test<Name>: with class docstrings
  • Docstring on every test method: """Verify <what>."""
  • Section dividers (# ---) between test classes
  • Follow Arrange-Act-Assert pattern within each test
  • Sample data as module-level constants, not inside tests
  • Shared setup in @pytest.fixture, not setUp()

Step 4: Mock at the boundary

Mock external dependencies only:

  • requests.get / requests.post for HTTP calls
  • open / pathlib.Path for file I/O
  • Database connections and cursors
  • Third-party API clients
  • time.sleep, datetime.now when testing time-dependent logic

Do NOT mock:

  • Internal methods of the class under test
  • Private helper functions
  • Data transformation logic
  • Anything that can be tested directly with sample data
python
# CORRECT — mock the HTTP boundary
@patch("mypackage.api.requests.get")
def test_fetch_sends_timeout(self, mock_get):
    mock_get.return_value = MagicMock(status_code=200, json=lambda: {})
    client = APIClient()
    client.fetch("https://example.com")
    _, kwargs = mock_get.call_args
    assert kwargs["timeout"] == 10

# WRONG — don't mock internal methods
@patch.object(Parser, "_transform")  # ← test this directly instead
def test_parse(self, mock_transform):
    ...

Step 5: Run and verify

After writing tests:

bash
# Run the new tests
pytest tests/test_<module>.py -v --tb=short

# Run the full suite to check for regressions
pytest tests/ --tb=short -q

# Check coverage of the new module
pytest tests/ --cov=<package>.<module> --cov-report=term-missing

Report the test count and pass/fail status. Note the count for the changelog entry:

markdown
- **tests/test_<module>.py**: N unit tests for <description>.

Show full SKILL.md (277 more words)Show less
Mode 3 — Fill coverage gaps

Use when the user says "improve my coverage", "fill the gaps", or coverage reports show low percentages.

Step 1: Identify uncovered code

Run coverage and parse the Missing column to identify:

  • Untested functions/methods
  • Untested branches (if/else paths, try/except handlers)
  • Untested error paths
  • Dead code (code that can never be reached — flag for removal)

Step 2: Prioritize by risk

Write tests for gaps in this order:

  1. Error handlers — untested except blocks, validation failures
  2. Public API methods — any public method with zero tests
  3. Branch coverage — untested if/else paths
  4. Edge cases — boundary conditions in already-tested functions
  5. Private methods — only if they contain complex logic

Step 3: Write gap-filling tests

Add tests to existing test files (don't create new files if a test file already exists for that module). Follow the same structure and conventions as the existing tests.

Step 4: Re-run coverage and report

Show before/after coverage numbers for the affected modules.


Constraints

  • Always use pytest unless the project explicitly uses a different framework. Do not introduce unittest-style classes (TestCase, self.assertEqual) into a pytest-native project.
  • Never make live API/network calls — all tests must run offline with mocks.
  • Never modify source code to make it testable — if something is hard to test, note it as a finding but don't refactor the source.
  • One behavior per test — each test method should verify one specific behavior. If a test has many unrelated assertions, split it.
  • Tests must be deterministic — no random data, no time-dependent assertions, no ordering dependencies between tests.
  • Preserve existing tests — when filling gaps, add to existing test files. Do not restructure or rename existing tests unless the user requests it.

© areed1192, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/skills/test-coverage-review of areed1192/finance-news-aggregator.

  • SKILL.md
  • references/best-practices.md

Open the folder on GitHubat commit d4ed7a9

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in areed1192/finance-news-aggregator, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Test Coverage Review 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.

Test Coverage Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Coverage Review this skillareed1192/finance-news-aggregator149—~2.6kAutomated safety check: PassMIT
Mutation Test Strength Auditbuildfastwithai/gen-ai-experiments785—~641Automated safety check: PassMIT
TDD Guidealirezarezvani/claude-skills28k—~3.4kAutomated safety check: PassMIT
TDD GuideLeoYeAI/openclaw-master-skills2.2k—~1.4kAutomated safety check: PassMIT
Pytest Patternscohen-liel/hivemind110—~806Automated safety check: PassApache-2.0
Test Oracle GeneratorArabelaTso/Skills-4-SE253—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Mutation Test Strength Audit

    buildfastwithai/gen-ai-experiments

    Measures how well a Python pytest suite catches behavior changes through diff-scoped mutation testing, then proposes and verifies tests for surviving mutants.

    785 GitHub stars~641 tokensUpdated 17 days ago
    Testing & QAAuto-check passed
  • TDD Guide

    alirezarezvani/claude-skills

    Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…

    28k GitHub stars~3.4k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • TDD Guide

    LeoYeAI/openclaw-master-skills

    Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…

    2.2k GitHub stars~1.4k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Pytest Patterns

    cohen-liel/hivemind

    pytest best practices for writing comprehensive test suites.

    110 GitHub stars~806 tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Test Oracle Generator

    ArabelaTso/Skills-4-SE

    Generates automated test oracles to verify correct software behavior.

    253 GitHub stars~3.5k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Adk Verify Snippets

    google/adk-python

    Official

    Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…

    22k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed

Works with

Categories

Questions about Test Coverage Review

What does Test Coverage Review do?

Audit, plan, write, and verify unit tests for Python projects using pytest. Test Coverage Review is an agent skill from areed1192/finance-news-aggregator. Audit, plan, write, and verify unit tests for Python projects using pytest.

When should I use Test Coverage Review?

Test Coverage Review fits situations like: someone asks to review test coverage; add missing tests; check if code is properly tested; improve test quality.

How do I install Test Coverage Review in Claude Code?

Run `npx skills add areed1192/finance-news-aggregator --skill test-coverage-review -a claude-code`. Or copy the skill folder (.github/skills/test-coverage-review in areed1192/finance-news-aggregator) into .claude/skills/test-coverage-review in your project. Claude Code loads it when a task matches its description.

How do I install Test Coverage Review in Codex?

Run `npx skills add areed1192/finance-news-aggregator --skill test-coverage-review -a codex`. Or copy the skill folder (.github/skills/test-coverage-review in areed1192/finance-news-aggregator) into .agents/skills/test-coverage-review in your project. Codex loads it when a task matches its description.

Can I use Test Coverage Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add areed1192/finance-news-aggregator --skill test-coverage-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-coverage-review, .gemini/skills/test-coverage-review, .github/skills/test-coverage-review and .opencode/skills/test-coverage-review in your project.

What does Test Coverage Review need to run?

Going by SKILL.md and its folder, Test Coverage Review needs the command-line tools its instructions call (pytest). Our summary lists: Python 3.

Does Test Coverage Review access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Test Coverage Review safe to install?

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.

What licence does Test Coverage Review use?

Test Coverage Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Coverage Review use?

About 2.6k tokens (SKILL.md is roughly 10k 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 4.5k tokens, read only when the agent opens those files.

What are the alternatives to Test Coverage Review?

Skills that share tags, products or a category with Test Coverage Review: Mutation Test Strength Audit (buildfastwithai/gen-ai-experiments, 785 stars), TDD Guide (alirezarezvani/claude-skills, 28k stars), TDD Guide (LeoYeAI/openclaw-master-skills, 2.2k stars) and Pytest Patterns (cohen-liel/hivemind, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Coverage Review?

areed1192 (a GitHub user) maintains it in areed1192/finance-news-aggregator, which has 149 GitHub stars. The repository was last updated on April 19, 2026.

Source: areed1192/finance-news-aggregator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.