RE

Automates FastAPI test execution, linting, and maintenance using pytest and local virtual environments.

Install

mkdir -p .claude/skills/repo-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17935" && unzip -o skill.zip -d .claude/skills/repo-testing && rm skill.zip

Installs to .claude/skills/repo-testing

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use for test strategy, pytest execution patterns, and test-safe changes in this FastAPI reference architecture.
111 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Run linting for fast feedback
  • Execute focused tests for specific behaviors
  • Run the full test suite before merging changes
  • Keep API behavior tests at the HTTP boundary
  • Add or update tests when changing API contracts

How it works

This skill guides a testing workflow for FastAPI projects, emphasizing linting, focused test execution, and full suite runs, while also providing rules for API behavior testing and contract updates.

Inputs & outputs

You give it
Code changes in a FastAPI project
You get back
Test results, linting feedback, or updated test files

When to use repo-testing

  • Run targeted pytest suites for specific service changes
  • Verify code compliance with project linting standards
  • Update API contract tests following endpoint modifications
  • Troubleshoot test failures within the FastAPI test suite

About this skill

Repo Testing Skill

Use When

  • User asks to run tests, debug test failures, or add/update tests.
  • User asks for safe command order after code changes (lint, test, targeted pytest).
  • User asks how to test API behavior for routers/services/repositories.

Not For

  • Do not use for deployment/provisioning workflows (azd, Bicep) -> route to repo-azure-deploy.
  • Do not use for migration design or Alembic revision safety -> route to repo-migration-safety.
  • Do not use for Entra auth setup and app-role configuration -> route to repo-auth-entra.

Primary References

  • scripts/test.sh
  • scripts/lint.sh
  • tests/conftest.py
  • tests/test_users.py
  • tests/test_database_entra.py
  • pyproject.toml

Standard Workflow

  1. Activate virtual environment.
  2. Run lint first for fast feedback.
  3. Run focused tests for touched behavior.
  4. Run full suite before merge.
source .venv/bin/activate
make lint
pytest tests/test_users.py -q
make test

Rules

  1. Prefer smallest failing test reproduction before broad refactors.
  2. Keep API behavior tests at HTTP boundary using test client fixtures from tests/conftest.py.
  3. Add or update tests when changing contracts (status codes and response shapes).
  4. Keep deterministic assertions; avoid sleep-based flakiness unless validating ingestion delays explicitly.
  5. Preserve SQLite-based test isolation in tests/conftest.py unless test intent requires alternate DB mode.

Common Failure Patterns

  • Running tests without virtualenv dependencies activated.
  • Updating endpoint behavior without matching assertions in API tests.
  • Mixing module internals with API DTO expectations in test assertions.
  • Assuming PostgreSQL-specific behavior in tests that run against SQLite.

When not to use it

  • For deployment or provisioning workflows
  • For migration design or Alembic revision safety
  • For Entra authentication setup and app-role configuration

Limitations

  • Specific to FastAPI reference architecture
  • Relies on `pytest` for test execution
  • Assumes SQLite-based test isolation unless specified otherwise

How it compares

This skill provides a structured and opinionated testing workflow for FastAPI, including specific rules for API contract testing and test isolation, which differs from a generic or ad-hoc testing approach.

Compared to similar skills

repo-testing side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
repo-testing (this skill)03moReviewIntermediate
fastapi-templates5202moNo flagsIntermediate
fastapi-pro793moNo flagsAdvanced
python-pro233moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

5201,086

fastapi-pro

sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

79181

python-pro

sickn33

Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices. Expert in the latest Python ecosystem including uv, ruff, pydantic, and FastAPI. Use PROACTIVELY for Python development, optimization, or advanced Python patterns.

2358

python-configuration

wshobson

Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing environment-specific behavior.

542

fastapi-router-py

microsoft

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

525

pydantic-models-py

microsoft

Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants. Use when defining API request/response schemas, database models, or data validation in Python applications using Pydantic v2.

325

Search skills

Search the agent skills registry