litestar-fullstack-inertia: Command for Claude Code

.claude/commands/test.md

test is a command for Claude Code from litestar-org/litestar-fullstack-inertia. It costs 7 tokens per session (1,533 once invoked), scanned A, original, MIT.

A testing command for creating or running automated Python tests with pytest and checking coverage, the proportion of code exercised by tests.

In plain words
What is it for?
Use it to identify changed code, create tests that match the project's fixtures and style, run tests in parallel, and check a 90% or higher coverage target.
Why use it?
It provides a repeatable testing workflow and highlights whether modified modules have enough coverage.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is litestar-org/litestar-fullstack-inertia's own configuration. It tells Claude Code how to work on litestar-fullstack-inertia itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything litestar-fullstack-inertia configures →

Reuse

Borrowing it

Nothing to install: this file belongs to litestar-org/litestar-fullstack-inertia. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/litestar-org/litestar-fullstack-inertia/main/.claude/commands/test.md
Clone the repo
git clone --depth 1 https://github.com/litestar-org/litestar-fullstack-inertia

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 test

README.md
[![agentmods](https://agentmods.dev/badge/commands/litestar-org/litestar-fullstack-inertia/test.svg)](https://agentmods.dev/commands/litestar-org/litestar-fullstack-inertia/test)
Your own site
<a href="https://agentmods.dev/commands/litestar-org/litestar-fullstack-inertia/test"><img src="https://agentmods.dev/badge/commands/litestar-org/litestar-fullstack-inertia/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00007 $0.01533
Opus 5 $0.00003 $0.00766
Sonnet 5 $0.00001 $0.00307
Haiku 4.5 $0.00001 $0.00153

Measured 2d ago against content hash af6d3de34d60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test 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 2d 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.

.claude/commands/test.md · 297 lines

How it starts

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

Testing Workflow

You are creating/running tests for: $ARGUMENTS

Testing Standards for This Project

  • Framework: pytest with pytest-asyncio
  • Coverage Target: 90%+ for modified modules
  • Style: Function-based tests (not class-based)
  • Parallel Execution: Tests must work with -n 2
  • Database: pytest-databases for isolated fixtures

Checkpoint 0: Context Loading

Load feature context:

cat specs/active/{slug}/prd.md 2>/dev/null || echo "No PRD found, testing existing code"
cat specs/active/{slug}/tasks.md 2>/dev/null

Identify files to test:

git diff --name-only HEAD~5 | grep -E "\.py$"
# or for specific feature:
find app/domain/{feature}/ -name "*.py" -type f

Output: "✓ Checkpoint 0 complete - [N] files identified for testing"


Checkpoint 1: Existing Test Analysis

Find existing test patterns:

ls tests/unit/
ls tests/integration/
cat tests/conftest.py | head -100

Identify fixtures available:

  • Database session fixtures
  • User fixtures
  • Team fixtures
  • Client fixtures

Document test patterns found:

## Test Patterns in This Project

- Async tests use `pytest.mark.asyncio`
- Database tests use fixtures from conftest.py
- Services tested with repository mocks
- Controllers tested with test client

Output: "✓ Checkpoint 1 complete - Test patterns documented"


Checkpoint 2: Unit Test Creation

Create unit tests in tests/unit/domain/{feature}/:

from __future__ import annotations

import pytest

from app.domain.{feature}.services import YourService


class TestYourService:
    """Tests for YourService."""

    @pytest.mark.asyncio
    async def test_create_item(self, db_session) -> None:
        """Test creating an item."""
        service = YourService(session=db_session)
        result = await service.create({"name": "test"})
        assert result.name == "test"

    @pytest.mark.asyncio
    async def test_list_items(self, db_session) -> None:
        """Test listing items."""
        service = YourService(session=db_session)
        results = await service.list()
        assert isinstance(results, list)

Read the full file on GitHub · 297 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. 2d ago First seen · 297 lines · 7 tokens per session scan A af6d3de34d60

Subscribe to this mod's changes

test is a command published in the GitHub repository litestar-org/litestar-fullstack-inertia (43 stars, last pushed 5d ago), licensed MIT. It adds 7 tokens to every session and 1,533 once invoked, about $0.0000 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.