pytest-suite

pytest-suite is a skill for Claude Code from vstorm-co/full-stack-ai-agent-template. It costs 59 tokens per session (629 once invoked), scanned A, original, MIT.

A project-specific guide for writing backend tests with pytest, a Python testing tool, and anyio, a library for testing asynchronous code.

In plain words
What is it for?
It helps add or extend tests for backend services, API routes, and repositories, including cases where code coverage is missing.
Why use it?
It provides the repository's established test setup, including fake database sessions and HTTP requests, so tests can run without a real database.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It helps add or extend tests for backend services, API routes, and repositories, including cases where code coverage is missing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vstorm-co/full-stack-ai-agent-template/pytest-suite
About the project

Full-Stack AI Agent Template generates full-stack AI applications with a FastAPI backend and Next.js frontend, including agents, retrieval-augmented generation, streaming, authentication, and integrations. It is for building AI products with features such as chat, conversation sharing, administration, and multiple agent or vector-database choices. Catalogue add-ons support the generated applications and their agent workflows.

vstorm-co/full-stack-ai-agent-template · 1,954 stars · on GitHub · vstorm-co.github.io

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 vstorm-co/full-stack-ai-agent-template --skill pytest-suite
Clone the repo
git clone --depth 1 https://github.com/vstorm-co/full-stack-ai-agent-template

Made for: Claude Code.

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 pytest-suite

README.md
[![agentmods](https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite/github.svg)](https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite)
Your own site
<a href="https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite"><img src="https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pytest-suite

Your own site · 80×15
<a href="https://agentmods.dev/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite"><img src="https://agentmods.dev/badge/skills/vstorm-co/full-stack-ai-agent-template/pytest-suite.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 629 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 pass 7 Sept 2026
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.00059 $0.00629
Opus 5.5 $0.00024 $0.00252
Sonnet 5.5 $0.00012 $0.00126
Haiku 4.5 $0.00006 $0.00063

Measured 1mo ago against content hash d61d0088f071, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pytest-suite 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 1mo 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.

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.

template/{{cookiecutter.project_slug}}/.claude/skills/pytest-suite/SKILL.md · 58 lines

How it starts

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

Backend Tests (pytest + anyio)

Tests live in backend/tests/, mirror the source layout (app/services/user.py → tests/services/test_user.py), and run with no real database — conftest.py overrides get_db_session with an AsyncMock via FastAPI dependency_overrides.

Key fixtures (tests/conftest.py)

  • client — httpx.AsyncClient over ASGITransport(app=app) (use this, not Starlette TestClient)
  • mock_db_session — AsyncMock standing in for AsyncSession
  • mock_redis (when Redis is enabled), api_key_headers (when API keys are enabled)

Patterns

Async tests use anyio, not @pytest.mark.asyncio:

import pytest

pytestmark = pytest.mark.anyio  # at module top, or mark per-test

Service test — stub what the repo/session returns, assert behavior + exceptions:

async def test_get_user_not_found_raises(monkeypatch, mock_db_session):
    service = UserService(mock_db_session)
    monkeypatch.setattr(user_repo, "get_by_id", AsyncMock(return_value=None))
    with pytest.raises(NotFoundError):
        await service.get_by_id(UUID("00000000-0000-0000-0000-000000000000"))

API test — drive the route through client, override auth deps with a mock user:

async def test_create_user_returns_201(client: AsyncClient):
    app.dependency_overrides[get_current_user] = lambda: mock_user
    resp = await client.post("/api/v1/users", json={"email": "[email protected]", "password": "secret123"})
    assert resp.status_code == 201

Naming & rules

  • test_<action>_<scenario>_<expected_result> (e.g. test_create_user_with_duplicate_email_raises_already_exists_error)
  • One behavior per test; plain assert (pytest rewrites it)
  • Use factory fixtures for data, not raw dicts; each test independent
  • Clear app.dependency_overrides after the test (the client fixture already does this for the DB/Redis overrides)

Run

cd backend && uv run pytest                 # all
uv run pytest tests/services/test_user.py -v
uv run pytest --cov=app                      # coverage

Read the full file on GitHub · 58 lines

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. 1mo ago First seen · 58 lines · 59 tokens per session scan A d61d0088f071

Subscribe to this mod's changes

pytest-suite is a skill published in the GitHub repository vstorm-co/full-stack-ai-agent-template (1,954 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 629 once invoked, about $0.0002 per session on Opus 5.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-08-30.

Related

Other skills, from other repositories

python-testing

Write or modify Python tests. Use when: adding new tests, understanding testing conventions, working with fixtures, writing FastAPI route tests, database tests, or following pytest patterns. DO NOT USE FOR RUNNING TESTS. If you are just running tests, not building them, you do not need this.

tedivm/robs_awesome_python_template · 64 tokens

debug

Structured bug diagnosis and fixing workflow that reproduces, diagnoses root cause, applies a minimal fix, writes regression tests, and scans for similar patterns.

first-fluke/fullstack-starter · 30 tokens

代码调试

A debugging workflow that reproduces a problem with a failing test, collects evidence, finds the underlying cause, applies a fix, and runs regression checks. Regression checks verify that the fix does not break behavior that already worked.

jianchen08/Agent-os-open · 82 tokens

代码实现

A coding workflow for checking requirements, understanding existing code, designing module boundaries, writing tests first, implementing changes, and reviewing risks. TDD means writing a failing test, making it pass, then improving the code.

jianchen08/Agent-os-open · 54 tokens

创建工具

A development guide for creating or changing built-in tools. It explains test-driven development (TDD), where tests are written before the code, along with naming, file paths, and required class methods.

jianchen08/Agent-os-open · 54 tokens

测试基础设施

A set of scripts that supports end-to-end testing, which checks a complete workflow across its connected parts. The scripts capture selected log messages, compare database snapshots, and record and verify notifications or other side effects.

jianchen08/Agent-os-open · 35 tokens