python-test-updater

python-test-updater is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 109 tokens per session (2,671 once invoked), scanned A, original, Apache-2.0.

A Python testing guide that updates tests when the code they check has changed.

In plain words
What is it for?
It is for comparing old and new Python code, updating pytest or unittest tests, changing assertions, and adding coverage for new behavior.
Why use it?
It prevents tests from failing only because function signatures, return values, validation rules, or error handling were revised.

Skill for Claude CodeCodex

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

Good fit It is for comparing old and new Python code, updating pytest or unittest tests, changing assertions, and adding coverage for new behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/python-test-updater
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-test-updater
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-test-updater

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/python-test-updater.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/python-test-updater)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/python-test-updater"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/python-test-updater.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,671 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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: 1 finding, up to high

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 →

  • high Rogue Agent · line 163
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.00109 $0.02671
Opus 5 $0.00055 $0.01336
Sonnet 5 $0.00022 $0.00534
Haiku 4.5 $0.00011 $0.00267

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

Security

Grade A, and why

python-test-updater scanned grade A with 0 findings 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyze_code_diff.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/python-test-updater/SKILL.md · 521 lines

How it starts

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

Python Test Updater

Update Python tests to work correctly with new code versions.

Workflow

1. Understand the Inputs

Gather required inputs:

  • Old version of Python code (file or content)
  • New version of Python code (file or content)
  • Old test module or test functions (file or content)

Verify inputs:

  • Code files are valid Python
  • Test files use pytest or unittest
  • Files are readable

2. Analyze Code Changes

Automated analysis:

python scripts/analyze_code_diff.py <old_file> <new_file>

Manual analysis:

  • Read both old and new code versions
  • Identify what changed
  • Understand the nature of changes

Identify change types:

Function signature changes:

  • Added parameters
  • Removed parameters
  • Renamed parameters
  • Changed parameter types
  • Changed default values

Return value changes:

  • Changed return type
  • Changed return structure
  • Added return fields
  • Removed return fields

Behavior changes:

  • Modified logic
  • Changed validation rules
  • Updated error handling
  • Altered workflows

Class changes:

  • Added/removed methods
  • Modified constructor
  • Changed inheritance
  • Updated attributes

Async changes:

  • Sync to async conversion
  • Async to sync conversion

See test-update-patterns.md for detailed patterns.

3. Analyze Test Structure

Read the old tests:

  • Identify test functions
  • Understand test setup (fixtures, mocks)
  • Note test assertions
  • Check test organization

Identify test components:

  • Test functions/methods
  • Fixtures
  • Parametrized tests
  • Mocked dependencies
  • Assertions

Map tests to code:

  • Which tests cover which functions/classes
  • What behavior each test verifies
  • What assertions check what conditions

4. Determine Required Updates

For each code change, identify test impact:

Signature changes → Update function calls

# Old code: function(arg1, arg2)
# New code: function(arg1, arg2, arg3=default)

# Old test
result = function(value1, value2)

# Updated test
result = function(value1, value2)  # Works with default
# OR
result = function(value1, value2, value3)  # Explicit value

Read the full file on GitHub · 521 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 · 521 lines · 109 tokens per session scan A 65d74cfb10ca

Subscribe to this mod's changes

python-test-updater is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (250 stars, last pushed 18d ago), licensed Apache-2.0. It adds 109 tokens to every session and 2,671 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. 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