Skip to main content
skill CX Codex

pytest — Claude Code skill: what it does, how to install

Teaches the agent to write tests for support APIs, databases, and background jobs using FastAPI and SQLAlchemy. Sets up pytest fixtures and async tests.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add manutej/luxor-claude-marketplace --skill pytest -a claude-code
Open on GitHub

What pytest does

This skill guides the coding agent through writing backend tests for customer support infrastructure. It focuses on FastAPI endpoints, database transactions in PostgreSQL, and ticket processing workflows.

Inside are patterns for fixture scoping. The database engine initializes once per session, while individual test functions receive isolated sessions with automatic rollbacks. It also provides patterns for mocking third-party email providers and CRM webhooks.

The test suite relies on pytest>=8.0.0, pytest-asyncio>=0.23.0, and sqlalchemy>=2.0.0. Running these suites without the matching pytest plugins will break test discovery immediately.

What it helps with

  • Create database fixtures with automatic transaction rollbacks in PostgreSQL
  • Test asynchronous task queues and webhook deliveries
  • Write test suites for FastAPI ticket endpoints
  • Mock third-party services for email and CRM integrations

Example prompts for the agent

  • Write a pytest database session fixture in SQLAlchemy with automatic rollback for each test
  • Create a test for an async FastAPI ticket creation route with Pydantic payload validation
  • Mock the external email provider using pytest-mock to test SLA escalation logic

How to install pytest

1Skills CLI (Vercel)

npx skills add manutej/luxor-claude-marketplace --skill pytest -a claude-code

2Manually: put the files in place

~/.claude/skills/pytest/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pytest/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pytest

How to install pytest in Claude Code?

Run npx skills add manutej/luxor-claude-marketplace --skill pytest -a claude-code in your terminal. The configuration installs to ~/.claude/skills/pytest/SKILL.md.

What does the pytest skill do?

It equips the agent with patterns for testing customer support backends. The agent writes structured fixtures, mocks, and async test cases for FastAPI, SQLAlchemy, and PostgreSQL.

Which libraries are required for these tests?

Your project needs pytest>=8.0.0, pytest-asyncio>=0.23.0, pytest-mock>=3.12.0, fastapi>=0.109.0, and sqlalchemy>=2.0.0.

Similar skills

All skills for Testing and QA →

From the same set65

angular-development An Angular skill covering components, services, DI, routing, forms and Signals. Useful when the agent writes Angular and mixes old patterns with new ones. CX Codex +1 461installs javascript-fundamentals Supplies coding assistants with reference patterns for JavaScript syntax and language mechanics. It helps during refactoring, scope debugging, and code reviews. CX Codex +1 460installs vector-database-management A skill for Pinecone, Weaviate and Chroma: indexes, embeddings, similarity search and RAG. Useful when you need semantic search in a project. CX Codex +1 459installs performance-benchmark-specialist Sets up benchmarks for shell tools: warmup runs, statistics, and target checks like <100ms and >90% cache hit rate. CX Codex +1 456installs observability-monitoring This skill covers Prometheus and Grafana monitoring, from metric collection and PromQL to alerts and dashboards for distributed services. CX Codex +1 455installs terraform-infrastructure-as-code Equips your coding agent to structure Terraform manifests, configure cloud providers, and manage remote state. Useful when spinning up infrastructure with HCL. CX Codex +1 453installs PostgreSQL Database Administration A PostgreSQL administration skill: schema design, indexing, backups and query tuning. Useful when the agent writes SQL for a ticketing system or reporting. CX Codex +1 452installs langchain-orchestration A LangChain reference skill for your coding agent: chains, agents, memory, RAG and orchestration. Useful when the agent writes LangChain code and should stick to working patterns. CX Codex +1 451installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor