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.
npx agentmods add skills/pramoddutta/qaskills/pytest-patternsnpx skills add PramodDutta/qaskills --skill pytest-patternsgit clone --depth 1 https://github.com/PramodDutta/qaskillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00031 | $0.03467 |
| Opus 5 | $0.00015 | $0.01733 |
| Sonnet 5 | $0.00006 | $0.00693 |
| Haiku 4.5 | $0.00003 | $0.00347 |
Grade C, and why
pytest-patterns scanned grade C with 2 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 3d 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.
Harvests environment variableshighData exfiltration
Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.
original_env = os.environ.copy() Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
mock_get = mocker.patch("requests.get") How it starts
The opening of the file, as written. The whole thing — 572 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pytest Patterns Skill
You are an expert Python developer specializing in testing with pytest. When the user asks you to write, review, or debug pytest tests, follow these detailed instructions.
Core Principles
- Convention over configuration -- pytest discovers tests automatically by naming conventions.
- Fixtures for setup -- Use fixtures instead of setUp/tearDown methods.
- Parametrize for coverage -- Use
@pytest.mark.parametrizefor data-driven tests. - Descriptive test names -- Function names should describe the expected behavior.
- Minimal test scope -- Each test verifies one behavior.
Project Structure
project/
src/
myapp/
__init__.py
services/
user_service.py
order_service.py
models/
user.py
utils/
validators.py
tests/
__init__.py
conftest.py
unit/
__init__.py
test_user_service.py
test_validators.py
integration/
__init__.py
conftest.py
test_user_api.py
fixtures/
user_fixtures.py
pyproject.toml
pytest.ini
Configuration
# pytest.ini
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts = -v --tb=short --strict-markers
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks integration tests
smoke: marks smoke tests
unit: marks unit tests
# pyproject.toml
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short --strict-markers --cov=src --cov-report=term-missing"
markers = [
"slow: marks tests as slow",
"integration: marks integration tests",
"smoke: marks smoke tests",
]
[tool.coverage.run]
source = ["src"]
omit = ["tests/*", "*/__init__.py"]
[tool.coverage.report]
fail_under = 80
show_missing = true
Fixtures
Basic Fixtures
# conftest.py
import pytest
from myapp.services.user_service import UserService
from myapp.models.user import User
@pytest.fixture
def sample_user():
"""Create a sample user for testing."""
return User(
id="user-123",
email="[email protected]",
name="Test User",
role="user",
)
@pytest.fixture
def admin_user():
"""Create an admin user for testing."""
return User(
id="admin-123",
email="[email protected]",
name="Admin User",
role="admin",
)
@pytest.fixture
def user_service(mock_user_repo, mock_email_service):
"""Create UserService with mocked dependencies."""
return UserService(
user_repo=mock_user_repo,
email_service=mock_email_service,
)
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.
- 3d ago First seen · 572 lines · 31 tokens per session scan C a90db54d9325
pytest-patterns is a skill published in the GitHub repository PramodDutta/qaskills (214 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 3,467 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (harvests environment variables, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pytest-expert
Pytest fixtures, parametrize, mock/monkeypatch, async testing with pytest-asyncio, and coverage reporting.
testing-python
Write and evaluate effective Python tests using pytest. Use when writing tests, reviewing test code, debugging test failures, or improving test coverage. Covers test design, fixtures, parameterization, mocking, and async testing.
pytest
Pytest testing patterns for Python. Trigger: When writing or refactoring pytest tests (fixtures, mocking, parametrize, markers). For Prowler-specific API/SDK testing conventions, also use prowler-test-api or prowler-test-sdk.
python-testing
Select and run Python SDK verification with nox, Makefile targets, Ruff, mypy, pytest markers, sanity tests, type inference checks, and build checks. Use when adding Python tests, diagnosing Python CI, or validating Python SDK/provider changes. Do not use for TypeScript-only checks.
pytest-asyncio-httpx-mocking
When masking httpx.AsyncClient with unittest.mock in Pytest, AsyncMock must be used instead of MagicMock for async methods like post/get to prevent TypeError when awaited.
test-writer
How to write pytest tests for modules in this workspace. Load whenever you are about to write or extend tests.