litestar-testing

litestar-testing is a skill for Claude Code from litestar-org/litestar-skills. It costs 56 tokens per session (3,633 once invoked), scanned A, original, MIT.

A set of testing instructions for Litestar, a Python web framework, using pytest and AnyIO. It covers both normal and asynchronous tests for web handlers and application behavior.

In plain words
What is it for?
Use it to write Litestar tests for requests, forms, files, headers, cookies, dependency injection, guards, application lifespan, and database integration. It is not intended for JavaScript testing or generic pytest guidance.
Why use it?
It helps avoid uncertainty when choosing test clients, setting up application startup and shutdown, mocking dependencies, and checking web requests. It also keeps asynchronous tests from using conflicting test systems.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the litestar plugin — 31 skills, 1 agent, 1 hook shipped together

Good fit Use it to write Litestar tests for requests, forms, files, headers, cookies, dependency injection, guards, application lifespan, and database integration. It is not intended for JavaScript testing or generic pytest guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/litestar-org/litestar-skills/litestar-testing
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 litestar-org/litestar-skills --skill litestar-testing
Clone the repo
git clone --depth 1 https://github.com/litestar-org/litestar-skills

Made for: Claude Code.

Or install litestar, the plugin that ships this one along with the rest of its 31 skills, 1 agent, 1 hook.

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 litestar-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-testing/github.svg)](https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-testing)
Your own site
<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-testing"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-testing/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 litestar-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/litestar-org/litestar-skills/litestar-testing"><img src="https://agentmods.dev/badge/skills/litestar-org/litestar-skills/litestar-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,633 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.00056 $0.03633
Opus 5 $0.00028 $0.01817
Sonnet 5 $0.00011 $0.00727
Haiku 4.5 $0.00006 $0.00363

Measured 11d ago against content hash 33b35d40111d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

litestar-testing 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 11d 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.

plugins/litestar/skills/litestar-testing/SKILL.md · 491 lines

How it starts

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

litestar-testing

Litestar-specific testing patterns built on pytest + anyio. Covers:

  • TestClient vs AsyncTestClient — when to use each
  • @pytest.mark.anyio setup
  • App + lifespan in tests
  • Fixture patterns from canonical litestar-fullstack tests
  • Mocking Guards and DI dependencies
  • Integration with pytest-databases (see ../pytest-databases/SKILL.md)
  • Autowire discovery and cache isolation (see ../litestar-autowire/references/testing.md)
  • Request body / form / multipart / header / cookie testing
  • Litestar-specific assertion patterns (Response, headers, cookies)

For JS-side testing (Vitest, Testing Library, Playwright), use the upstream Vitest docs and Litestar's own JS examples. Out of scope here.

Code Style Rules

  • PEP 604 unions: T | None, never Optional[T]
  • Test modules MAY use from __future__ import annotations — they are pure consumer code.
  • Function-based tests (not class-based)
  • One assertion concern per test
  • Async Litestar tests use @pytest.mark.anyio by default; do not mix AnyIO and pytest-asyncio auto modes.
  • Prefer AsyncTestClient for new code; TestClient only for legacy / sync-only flows

Quick Reference

TestClient vs AsyncTestClient

Client When to Use Lifespan Internals
TestClient Sync test bodies, simple smoke tests Triggered via context manager Runs ASGI in a thread pool
AsyncTestClient Default for new tests — async test bodies, lifespan-aware fixtures Native async lifespan Runs ASGI in the test event loop
# AsyncTestClient — preferred
from litestar.testing import AsyncTestClient


async def test_index(async_client: AsyncTestClient):
    resp = await async_client.get("/")
    assert resp.status_code == 200
# TestClient — legacy / sync
from litestar.testing import TestClient


def test_index(client: TestClient):
    resp = client.get("/")
    assert resp.status_code == 200

Read the full file on GitHub · 491 lines

Files

What ships with it

1 file 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. 11d ago First seen · 491 lines · 56 tokens per session scan A 33b35d40111d

Subscribe to this mod's changes

litestar-testing is a skill published in the GitHub repository litestar-org/litestar-skills (14 stars, last pushed 21d ago), licensed MIT. It adds 56 tokens to every session and 3,633 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

python-testing

Python testing patterns with pytest including unit tests, integration tests, fixtures, mocking, and coverage. Use when writing Python tests.

DmitriyYukhanov/claude-plugins · 28 tokens

Unit Test Scaffold (Python/pytest)

Generate Python/pytest unit test skeletons from specifications.

s977043/river-review · 19 tokens

python-testing

Python test authoring and review with pytest. Use when writing, adding, generating, or reviewing Python tests or unit tests for a function, module, or class; running pytest or a single test (the -k flag and other invocation flags for a Makefile or CI); parametrizing test cases into the table-driven pattern; setting up…

bitwise-media-group/skills · 178 tokens

testing-python

Writes tests following TDD Red-Green-Refactor (pytest + Hypothesis). Tests behavior, not implementation. Use when writing unit tests, integration tests, or property tests.

qte77/claude-code-plugins · 39 tokens

no-silent-pass

Write Python whose failures are visible and checks that actually fire — distinct sentinels for success and error, filters that narrow to nothing without reading as "all clear", output never discarded on a non-zero exit, and selftest cases proven red before they are trusted (mutate the fix, mutate it the other way too…

AleksandarBisevac/claude-plugins · 143 tokens