.claude/skills/test-backend/SKILL.md
Run and verify backend tests for the FastAPI/Python application.
npx skillsauth add ruska-ai/orchestra Test BackendInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run and verify backend tests using pytest and pytest-asyncio. This skill handles test execution, watches for changes, generates coverage reports, and helps diagnose test failures.
uv sync in backend/ directory)backend/tests/ with unit/ and integration/ subdirectoriesbackend/ directorymake test or uv run pytest - Run all tests once (CI/CD mode)bash scripts/test.sh - Run tests with test environment variables from .env.testbash scripts/test.sh <path> - Run specific test file or directoryuv run pytest --cov - Run tests with coverage reportuv run pytest -v - Run tests in verbose modeuv run pytest -s - Run tests with print output visibleuv run pytest -k <pattern> - Run tests matching patternbackend/tests/unit/ - Unit tests for services, repos, utilitiesbackend/tests/integration/ - Integration tests for routes and full workflowsbackend/tests/mock/ - Mock data and fixturesbackend/tests/conftest.py - Shared pytest fixtures and configurationKey settings from pyproject.toml:
.)sessionUser: "Run the backend tests"
Assistant: I'll run the backend test suite.
[Executes: cd backend && make test]
[Reports results and any failures]
User: "Check test coverage for the backend"
Assistant: I'll run the tests with coverage reporting.
[Executes: cd backend && uv run pytest --cov --cov-report=term-missing]
[Reports coverage percentages and identifies untested code]
User: "The tool service tests are failing"
Assistant: Let me run the tests and investigate the failures.
[Executes: cd backend && uv run pytest tests/unit/services/test_tool_service.py -v]
[Analyzes failure output, reads test file if needed]
[Suggests fixes based on error messages]
User: "Run only the integration tests"
Assistant: I'll run the integration test suite.
[Executes: cd backend && uv run pytest tests/integration/ -v]
[Reports results from integration tests]
User: "Run all tests related to projects"
Assistant: I'll run tests matching the project pattern.
[Executes: cd backend && uv run pytest -k project -v]
[Shows all tests with 'project' in their name]
User: "Run tests with the test environment configuration"
Assistant: I'll use the test.sh script to load test environment variables.
[Executes: cd backend && bash scripts/test.sh]
[Tests run with .env.test configuration]
-v or --verbose - Increase verbosity-s - Disable output capturing (show prints)-x - Stop on first failure--lf - Run last failed tests--ff - Run failed tests first, then others-k <expression> - Run tests matching keyword expression--markers - Show available test markers--cov=<path> - Measure coverage for specified path--cov-report=html - Generate HTML coverage report-n <num> - Run tests in parallel (requires pytest-xdist)Tests should follow these patterns:
test_<function>_<scenario>_<expected_result>@pytest.fixture(scope="session")pytest.mark.asyncio for async test functionstools
Apply coordinated changes across multiple files efficiently using parallel Edit tool calls. Use when making systematic changes like renaming variables, updating imports, applying pattern changes, or refactoring across files. Triggers on: rename across files, update all imports, change pattern in multiple files, refactor across codebase, batch edit files.
testing
Record browser workflows as video and convert to high-quality GIFs using agent-browser and ffmpeg. Use when users ask to record workflow, create gif, record demo, browser recording, workflow gif, or screen recording.
development
Run and verify frontend tests for the React/Vite application.
development
Recursive Language Model pattern for processing large inputs using Sonnet orchestrator and parallel Haiku subagents. Decomposes complex tasks into chunks, processes them in parallel via sub-agents, then synthesizes results. Use when: analyze large codebase, recursive analysis, deep analysis, process large input, comprehensive review, rlm, recursive reasoning, review massive document, analyze entire repository.