repo-testing
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.zipInstalls 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.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
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 torepo-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
- Activate virtual environment.
- Run lint first for fast feedback.
- Run focused tests for touched behavior.
- Run full suite before merge.
source .venv/bin/activate
make lint
pytest tests/test_users.py -q
make test
Rules
- Prefer smallest failing test reproduction before broad refactors.
- Keep API behavior tests at HTTP boundary using test client fixtures from
tests/conftest.py. - Add or update tests when changing contracts (status codes and response shapes).
- Keep deterministic assertions; avoid sleep-based flakiness unless validating ingestion delays explicitly.
- Preserve SQLite-based test isolation in
tests/conftest.pyunless 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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| repo-testing (this skill) | 0 | 3mo | Review | Intermediate |
| fastapi-templates | 520 | 2mo | No flags | Intermediate |
| fastapi-pro | 79 | 3mo | No flags | Advanced |
| python-pro | 23 | 3mo | No flags | Advanced |
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.
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.
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.
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.
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.
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.