用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill test-backend命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | Test Backend |
| description | Run and verify backend tests for the FastAPI/Python application. |
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 functionsConduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
基于 SOC 职业分类