Agent skill

Squid Testing Python

by iusztinpaul in iusztinpaul/squid

Write and evaluate effective Python tests using pytest. An agent skill from iusztinpaul/squid.

Apache-2.0Auto-check passedTesting & QA

Install Squid Testing Python

skills CLI
$ npx skills add iusztinpaul/squid --skill squid-testing-python -a claude-code

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

GitHub CLI
$ gh skill install iusztinpaul/squid squid-testing-python --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/iusztinpaul/squid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/squid-testing-python .claude/skills/squid-testing-python && 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
squid-testing-python
GitHub stars
203
Token cost
~1.3k tokens
SKILL.md length
364 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write and evaluate effective Python tests using pytest. An agent skill from iusztinpaul/squid.

  • Reviewing test code
  • SKILL.md covers Test Structure, Project-Specific Rules, Fixtures and Mocking, plus 2 more sections
  • Calls make, pytest and uv
  • Debugging test failures

What it does

Squid Testing Python is an agent skill from iusztinpaul/squid. Write and evaluate effective Python tests using pytest. Use when writing tests, reviewing test code, debugging test failures, or improving test coverage.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing, Test coverage and Failing and flaky tests. It works with Python and pytest. The licence is Apache-2.0.

When your agent uses it

  • Reviewing test code
  • Debugging test failures
  • Improving test coverage

Example prompts

  • “/squid-testing-python”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit f5bf6b3. 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:

    • make
    • pytest
    • uv

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

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    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

Squid Testing Python loads about 1.3k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 364 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

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 iusztinpaul/squid at commit f5bf6b3, republished under its Apache-2.0 licence (© iusztinpaul). 364 words, ~1,254 tokens.

Download SKILL.mdSave it as .claude/skills/squid-testing-python/SKILL.md (or your agent's skills folder).
name
squid-testing-python
description
Write and evaluate effective Python tests using pytest. Use when writing tests, reviewing test code, debugging test failures, or improving test coverage.

Writing Effective Python Tests

Test Structure

Mirror the module layout

Keep a one-to-one relationship between test files and the modules they cover: myapp/service.py → tests/.../test_service.py. This makes the test for any given module obvious and keeps coverage gaps visible.

Follow AAA (Arrange, Act, Assert)

Structure each test body in three beats — set up inputs (Arrange), call the thing under test (Act), then assert on the result. Keep them in that order; don't interleave more setup after the act.

Atomic unit tests

Each test should verify a single behavior. The test name should tell you what's broken when it fails. Multiple assertions are fine when they all verify the same behavior.

python
# Good: Name tells you what's broken
def test_user_creation_sets_defaults():
    user = User(name="Alice")
    assert user.role == "member"
    assert user.id is not None
    assert user.created_at is not None

# Bad: If this fails, what behavior is broken?
def test_user():
    user = User(name="Alice")
    assert user.role == "member"
    user.promote()
    assert user.role == "admin"
    assert user.can_delete_others()
Use parameterization for variations of the same concept
python
import pytest

@pytest.mark.parametrize("input,expected", [
    ("hello", "HELLO"),
    ("World", "WORLD"),
    ("", ""),
    ("123", "123"),
])
def test_uppercase_conversion(input, expected):
    assert input.upper() == expected

Don't parameterize unrelated behaviors — if the test logic differs, write separate tests.

Project-Specific Rules

Imports at module level

Put ALL imports at the top of the file. Do not import inside test function bodies.

python
# Correct
import pytest
from myapp.service import do_work

def test_something():
    assert do_work() is not None

# Wrong - no local imports
def test_something():
    from myapp.service import do_work  # Don't do this
    ...
Async tests

If the project sets asyncio_mode = "auto" in pyproject.toml, write async tests without decorators:

python
# Correct (when asyncio_mode = "auto")
async def test_async_operation():
    result = await some_async_function()
    assert result == expected

Otherwise, mark explicitly with @pytest.mark.asyncio.

Inline snapshots for complex data

If the project uses inline-snapshot, use it for JSON schemas and complex structures:

python
from inline_snapshot import snapshot

def test_schema_generation():
    schema = generate_schema(MyModel)
    assert schema == snapshot()  # Will auto-populate on first run

Commands:

  • pytest --inline-snapshot=create - populate empty snapshots
  • pytest --inline-snapshot=fix - update after intentional changes

Fixtures

Show full SKILL.md (162 more words)Show less
Share setup through fixtures, not setup/teardown methods

Put shared fixtures in conftest.py so they're available across test files without imports. Use fixtures (and their yield-based teardown) for setup and cleanup — avoid xUnit-style setUp/tearDown methods.

Prefer function-scoped fixtures
python
@pytest.fixture
def client():
    return Client()

def test_with_client(client):
    result = client.ping()
    assert result is not None
Use tmp_path for file operations
python
def test_file_writing(tmp_path):
    file = tmp_path / "test.txt"
    file.write_text("content")
    assert file.read_text() == "content"

Mocking

Mock at the boundary

Use pytest-mock's mocker fixture (preferred) or unittest.mock patches.

python
from unittest.mock import AsyncMock

async def test_external_api_call(mocker):
    mock = mocker.patch("mymodule.external_client.fetch", new_callable=AsyncMock)
    mock.return_value = {"data": "test"}
    result = await my_function()
    assert result == {"data": "test"}
Don't mock what you own

Test your code with real implementations when possible. Mock external services (HTTP APIs, third-party SDKs), not your own internal classes.

Don't write unit tests against infrastructure components

Orchestrators, model-serving runtimes, observability clients, and similar infrastructure should be exercised via integration tests, not unit tests with mocks of their internals.

Test Naming

Test files must be named test_*.py and test functions test_* so pytest discovers them. Beyond that, use descriptive names that explain the scenario:

python
# Good
def test_login_fails_with_invalid_password():
def test_user_can_update_own_profile():
def test_admin_can_delete_any_user():

# Bad
def test_login():
def test_update():
def test_delete():

Running Tests

Prefer project Make targets when available: make unit-tests, make integration-tests, make tests. Otherwise uv run pytest -n auto (parallel). The suite must finish with 0 warnings.

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

Files

Just SKILL.md in skills/squid-testing-python of iusztinpaul/squid.

Open the folder on GitHubat commit f5bf6b3

Compare with similar skills

Squid Testing Python 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.

Squid Testing Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Squid Testing Python this skilliusztinpaul/squid203—~1.3kAutomated safety check: PassApache-2.0
Testing Pythonbenchflow-ai/skillsbench1.8k—~1.3kAutomated safety check: PassApache-2.0
ONNX Runtime Test Runnermicrosoft/onnxruntime22k—~1.8kAutomated safety check: PassMIT
Test Coverage Reviewareed1192/finance-news-aggregator149—~2.6kAutomated safety check: PassMIT
ONNX Runtime GPU Transformers Testsmicrosoft/onnxruntime22k—~2.9kAutomated safety check: PassMIT
Temporal Python Testingwshobson/agents40k12 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Testing Python

    benchflow-ai/skillsbench

    Write and evaluate effective Python tests using pytest. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.3k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • ONNX Runtime Test Runner

    microsoft/onnxruntime

    Official

    Runs and debugs ONNX Runtime tests: Google Test executables for C++ and unittest or pytest for Python, with filters and build-directory guidance.

    22k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Coverage Review

    areed1192/finance-news-aggregator

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

    149 GitHub stars~2.6k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Official

    Runs the ONNX Runtime transformers Python tests against a GPU wheel and proves the cuDNN flash attention path was used rather than a silent fallback.

    22k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Temporal workflows with pytest, time-skipping, and mocking strategies.

    40k GitHub starsUsed in 12 repos~1.2k tokens
    Testing & QAAuto-check passed
  • 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 15 days ago
    Testing & QAAuto-check passed

More from iusztinpaul/squid

All 13 skills in this repo
  • Squid Implement Night

    iusztinpaul/squid

    Run the full agent-team pipeline end-to-end for one feature whose Tasks Plan is already approved by /squid-plan, handing the human a validated, ready-to-squash-merge PR.

    203 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Implement Task

    iusztinpaul/squid

    Implement one task — or a whole list / an approved Tasks Plan — via the inner SWE↔Tester loop, committing each task on PASS.

    203 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Review

    iusztinpaul/squid

    Push the committed feature branch, create or update its PR, then run Product Architect acceptance and PR-Reviewer on it.

    203 GitHub stars~873 tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Review CI

    iusztinpaul/squid

    Drive CI green on a pushed, review-clean feature PR — On-Call diagnoses failures and hands fix tasks to the SWE.

    203 GitHub stars~607 tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Architecture Review

    iusztinpaul/squid

    Periodic architectural sweep — reads existing ADRs, maps modules/dependencies/layering, and reports up to 10 prioritised findings shaped as refactor proposals /squid-refactor can consume directly.

    203 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Squid Clean Harness

    iusztinpaul/squid

    Shrink an agent harness (.agents/ skills + resources) to the minimum tokens that keep the exact same logic.

    203 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Squid Testing Python

What does Squid Testing Python do?

Write and evaluate effective Python tests using pytest. An agent skill from iusztinpaul/squid. Squid Testing Python is an agent skill from iusztinpaul/squid. Write and evaluate effective Python tests using pytest.

When should I use Squid Testing Python?

Squid Testing Python fits situations like: reviewing test code; debugging test failures; improving test coverage.

How do I install Squid Testing Python in Claude Code?

Run `npx skills add iusztinpaul/squid --skill squid-testing-python -a claude-code`. Or copy the skill folder (skills/squid-testing-python in iusztinpaul/squid) into .claude/skills/squid-testing-python in your project. Claude Code loads it when a task matches its description.

How do I install Squid Testing Python in Codex?

Run `npx skills add iusztinpaul/squid --skill squid-testing-python -a codex`. Or copy the skill folder (skills/squid-testing-python in iusztinpaul/squid) into .agents/skills/squid-testing-python in your project. Codex loads it when a task matches its description.

Can I use Squid Testing Python 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 iusztinpaul/squid --skill squid-testing-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/squid-testing-python, .gemini/skills/squid-testing-python, .github/skills/squid-testing-python and .opencode/skills/squid-testing-python in your project.

What does Squid Testing Python need to run?

Going by SKILL.md and its folder, Squid Testing Python needs the command-line tools its instructions call (make, pytest and uv). Our summary lists: Python 3.

Does Squid Testing Python access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Squid Testing Python 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 Squid Testing Python use?

Squid Testing Python is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Squid Testing Python use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Squid Testing Python?

Skills that share tags, products or a category with Squid Testing Python: Testing Python (benchflow-ai/skillsbench, 1.8k stars), ONNX Runtime Test Runner (microsoft/onnxruntime, 22k stars), Test Coverage Review (areed1192/finance-news-aggregator, 149 stars) and ONNX Runtime GPU Transformers Tests (microsoft/onnxruntime, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Squid Testing Python?

iusztinpaul (a GitHub user) maintains it in iusztinpaul/squid, which has 203 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 3, 2026.

Source: iusztinpaul/squid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.