python-regression-test-generator

python-regression-test-generator is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 70 tokens per session (3,664 once invoked), scanned A, original, Apache-2.0.

A Python testing guide that creates regression tests by comparing old and new code and examining existing tests.

In plain words
What is it for?
It is for migrating tests, generating coverage for new functionality, and creating mocks for outside services in pytest or unittest projects.
Why use it?
It helps preserve previously tested behavior while adding checks for changed or newly added code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for migrating tests, generating coverage for new functionality, and creating mocks for outside services in pytest or unittest projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/python-regression-test-generator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ArabelaTso/Skills-4-SE --skill python-regression-test-generator
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-regression-test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/python-regression-test-generator.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/python-regression-test-generator)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/python-regression-test-generator"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/python-regression-test-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,664 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 357
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 374
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.03664
Opus 5 $0.00035 $0.01832
Sonnet 5 $0.00014 $0.00733
Haiku 4.5 $0.00007 $0.00366

Measured 4d ago against content hash c35eefd05a9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

python-regression-test-generator scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.get(f'https://api.example.com/users/{user_id}')
skills/python-regression-test-generator/SKILL.md · 561 lines

How it starts

The opening of the file, as written. The whole thing — 561 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Regression Test Generator

Overview

This skill automatically generates regression tests for Python code by analyzing differences between old and new versions, migrating existing tests, and creating new tests for modified or added functionality. It ensures previously tested behavior still works while covering new code paths.

Test Generation Workflow

Follow these steps to generate regression tests:

1. Analyze Code Changes

Compare old and new versions to identify:

Function Signature Changes:

  • Added parameters (with or without defaults)
  • Removed parameters
  • Changed parameter types or names
  • Changed return types

Logic Changes:

  • Modified implementation
  • New validation rules
  • Changed error handling
  • Algorithm improvements

Structural Changes:

  • Added functions/classes/methods
  • Removed functions/classes/methods
  • Renamed functions/classes/methods
  • Moved code between modules

Example Analysis:

# Old version
def calculate_total(items):
    return sum(item.price for item in items)

# New version
def calculate_total(items, tax_rate=0.0):
    subtotal = sum(item.price for item in items)
    return subtotal * (1 + tax_rate)

Changes identified:

  • Added parameter: tax_rate with default value 0.0
  • Modified logic: now applies tax calculation
  • Backward compatible: old calls still work

2. Analyze Existing Tests

Review old tests to understand:

  • Test structure (unittest vs pytest)
  • Test coverage (which functions/paths are tested)
  • Test patterns (fixtures, mocks, parametrization)
  • Dependencies and setup requirements

Example Existing Test:

def test_calculate_total():
    items = [Item(price=10), Item(price=20)]
    assert calculate_total(items) == 30

Analysis:

  • Uses pytest style
  • Tests basic functionality
  • No mocking needed
  • Simple assertion

3. Migrate Existing Tests

Update tests to work with new code:

For backward-compatible changes:

  • Keep original test (ensures backward compatibility)
  • Add new tests for new functionality

Read the full file on GitHub · 561 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 561 lines · 70 tokens per session scan A c35eefd05a9e

Subscribe to this mod's changes

python-regression-test-generator is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (250 stars, last pushed 18d ago), licensed Apache-2.0. It adds 70 tokens to every session and 3,664 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

python

Use when writing, reviewing, or modernizing Python 3.11+ code. Produces fully type-annotated modules, async I/O, dataclasses and protocols, pytest suites, and a lint/type gate built on ruff and mypy --strict.

nimadorostkar/Claude-Skills-collection · 55 tokens

locust

When the user wants to design, implement, debug, or operate Locust load tests in Python. Use when the user mentions "Locust," "HttpUser," "@task," "TaskSet," "locustfile.py," "master/worker," "Locust web UI," "FastHttpUser," "constantpacing," "waittime," or "locust -f -u -r --headless." For k6 see k6. For JMeter see…

aks-builds/quality-skills · 116 tokens

pytest

When the user wants to design, implement, debug, or optimize pytest tests in Python. Use when the user mentions "pytest," "pytest fixtures," "conftest.py," "pytest.ini," "pyproject.toml pytest section," "@pytest.fixture," "@pytest.mark.parametrize," "pytest-xdist," "pytest-asyncio," "pytest-cov," "monkeypatch,"…

aks-builds/quality-skills · 129 tokens

pytest-optimizer-00-scan

Use when starting or re-baselining a pytest optimization pass by profiling tests and fixtures without editing the suite.

tony/skills · 30 tokens

pytest

Provides comprehensive guidance for pytest testing framework including test writing, fixtures, parametrization, mocking, and plugins. Use when the user asks about pytest, needs to write Python tests, use pytest fixtures, or configure pytest for Python projects.

Zephyrex21/claude-skills-vetted · 48 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens