aiskillstore/marketplace / skills/abdullahmalik17/pytest-mastery
pytest-mastery
VerifiedPython testing with pytest using uv package manager. Use when: (1) Running Python tests, (2) Writing test files or test functions, (3) Setting up fixtures, (4) Parametrizing tests, (5) Generating coverage reports, (6) Testing FastAPI applications, (7) Debugging test failures, (8) Configuring pytest options. Triggers: "run tests", "write tests", "test coverage", "pytest", "unit test", "integration test", "test FastAPI".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.9 KB |
| references/fastapi-testing.md | markdown | 6.1 KB |
| scripts/run_tests.py | script | 1.8 KB |
| skill-report.json | config | 47.2 KB |
skill-report.json
View on GitHub{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-07-09T01:08:22.432Z",
"slug": "abdullahmalik17-pytest-mastery",
"source_url": "https://github.com/AbdullahMalik17/Cloud-Native-AI/tree/main/.claude/skills/pytest-mastery",
"source_ref": "main",
"model": "claude",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "28d0c39ef515a0fc9a3740a7421a720c45812c85afb0b6df61cabb0945f7cc42",
"tree_hash": "3894f481b22a1c29e3186e866375705cf2faaa3536478290c4c1e451c852b11f",
"provenance": {
"model_requested": "claude-sonnet-4.6",
"model_effective": "claude:claude-sonnet-4.6",
"fallback_chain": [
{
"agent": "claude",
"model": "claude-sonnet-4.6",
"outcome": "success"
}
],
"analysis_version": "3.0.0"
}
},
"skill": {
"name": "pytest-mastery",
"description": "Guide Claude, Codex, and Claude Code through Python testing with pytest, uv, fixtures, parametrization, coverage, and FastAPI test patterns.",
"summary": "Run, write, debug, and configure Python pytest suites with uv and FastAPI examples.",
"icon": "📦",
"version": "1.0.0",
"author": "AbdullahMalik17",
"license": "MIT",
"tags": [
"pytest",
"python-testing",
"uv",
"fastapi",
"coverage"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"network",
"env_access",
"external_commands"
],
"category": "coding"
},
"security_audit": {
"risk_level": "safe",
"is_blocked": false,
"safe_to_publish": true,
"analysis_status": "ok",
"summary": "Static analysis flagged URLs, database strings, subprocess use, and many Markdown backticks. Review found these are local testing examples or a fixed pytest runner with shell execution disabled, and no prompt injection or malicious intent was found.",
"remediation": [],
"risk_factor_evidence": [
{
"factor": "network",
"evidence": [
{
"file": "references/fastapi-testing.md",
"line_start": 38,
"line_end": 38
}
]
},
{
"factor": "env_access",
"evidence": [
{
"file": "references/fastapi-testing.md",
"line_start": 71,
"line_end": 71
},
{
"file": "references/fastapi-testing.md",
"line_start": 73,
"line_end": 73
}
]
},
{
"factor": "external_commands",
"evidence": [
{
"file": "scripts/run_tests.py",
"line_start": 32,
"line_end": 32
},
{
"file": "SKILL.md",
"line_start": 11,
"line_end": 29
},
{
"file": "SKILL.md",
"line_start": 29,
"line_end": 33
},
{
"file": "SKILL.md",
"line_start": 33,
"line_end": 42
},
{
"file": "SKILL.md",
"line_start": 42,
"line_end": 48
},
{
"file": "SKILL.md",
"line_start": 48,
"line_end": 48
},
{
"file": "SKILL.md",
"line_start": 49,
"line_end": 50
},
{
"file": "SKILL.md",
"line_start": 50,
"line_end": 50
},
{
"file": "SKILL.md",
"line_start": 51,
"line_end": 51
},
{
"file": "SKILL.md",
"line_start": 54,
"line_end": 65
},
{
"file": "SKILL.md",
"line_start": 65,
"line_end": 71
},
{
"file": "SKILL.md",
"line_start": 71,
"line_end": 86
},
{
"file": "SKILL.md",
"line_start": 86,
"line_end": 90
},
{
"file": "SKILL.md",
"line_start": 90,
"line_end": 95
},
{
"file": "SKILL.md",
"line_start": 95,
"line_end": 99
},
{
"file": "SKILL.md",
"line_start": 99,
"line_end": 101
},
{
"file": "SKILL.md",
"line_start": 101,
"line_end": 108
},
{
"file": "SKILL.md",
"line_start": 108,
"line_end": 114
},
{
"file": "SKILL.md",
"line_start": 114,
"line_end": 128
},
{
"file": "SKILL.md",
"line_start": 128,
"line_end": 134
},
{
"file": "SKILL.md",
"line_start": 134,
"line_end": 135
},
{
"file": "SKILL.md",
"line_start": 135,
"line_end": 136
},
{
"file": "SKILL.md",
"line_start": 136,
"line_end": 137
},
{
"file": "SKILL.md",
"line_start": 137,
"line_end": 138
},
{
"file": "SKILL.md",
"line_start": 138,
"line_end": 139
},
{
"file": "SKILL.md",
"line_start": 139,
"line_end": 140
},
{
"file": "SKILL.md",
"line_start": 140,
"line_end": 141
},
{
"file": "SKILL.md",
"line_start": 141,
"line_end": 142
},
{
"file": "SKILL.md",
"line_start": 142,
"line_end": 143
},
{
"file": "SKILL.md",
"line_start": 143,
"line_end": 144
},
{
"file": "SKILL.md",
"line_start": 144,
"line_end": 145
},
{
"file": "SKILL.md",
"line_start": 145,
"line_end": 146
},
{
"file": "SKILL.md",
"line_start": 146,
"line_end": 150
},
{
"file": "SKILL.md",
"line_start": 150,
"line_end": 162
},
{
"file": "SKILL.md",
"line_start": 162,
"line_end": 166
},
{
"file": "SKILL.md",
"line_start": 166,
"line_end": 184
},
{
"file": "SKILL.md",
"line_start": 184,
"line_end": 187
},
{
"file": "SKILL.md",
"line_start": 187,
"line_end": 190
},
{
"file": "SKILL.md",
"line_start": 190,
"line_end": 194
},
{
"file": "SKILL.md",
"line_start": 194,
"line_end": 214
},
{
"file": "SKILL.md",
"line_start": 214,
"line_end": 227
},
{
"file": "SKILL.md",
"line_start": 227,
"line_end": 239
}
]
}
],
"static_findings": [
{
"id": "network:references/fastapi-testing.md:38:hardcoded-url",
"category": "network",
"severity": "low",
"pattern": "Hardcoded URL",
"file": "references/fastapi-testing.md",
"line_start": 38,
"line_end": 38,
"snippet": "base_url=\"http://test\""
},
{
"id": "env_access:references/fastapi-testing.md:71:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/fastapi-testing.md",
"line_start": 71,
"line_end": 71,
"snippet": "TEST_DATABASE_URL = \"sqlite:///./test.db\""
},
{
"id": "env_access:references/fastapi-testing.md:73:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/fastapi-testing.md",
"line_start": 73,
"line_end": 73,
"snippet": "engine = create_engine(TEST_DATABASE_URL, connect_args={\"check_same_thread\": False})"
},
{
"id": "sensitive:references/fastapi-testing.md:71:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/fastapi-testing.md",
"line_start": 71,
"line_end": 71,
"snippet": "TEST_DATABASE_URL = \"sqlite:///./test.db\""
},
{
"id": "external_commands:scripts/run_tests.py:32:python-subprocess-call",
"category": "external_commands",
"severity": "high",
"pattern": "Python subprocess.call",
"file": "scripts/run_tests.py",
"line_start": 32,
"line_end": 32,
"snippet": "return subprocess.call(cmd, cwd=get_project_root())"
},
{
"id": "external_commands:SKILL.md:11:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 11,
"line_end": 29,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:29:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 29,
"line_end": 33,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:33:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 33,
"line_end": 42,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 42,
"line_end": 48,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 48,
"line_end": 48,
"snippet": "- Files: `test_*.py` or `*_test.py`"
},
{
"id": "external_commands:SKILL.md:49:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 49,
"line_end": 50,
"snippet": "- Functions: `test_*`"
},
{
"id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 50,
"line_end": 50,
"snippet": "- Classes: `Test*` (no `__init__` method)"
},
{
"id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 51,
"line_end": 51,
"snippet": "- Methods: `test_*` inside `Test*` classes"
},
{
"id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 54,
"line_end": 65,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:65:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 65,
"line_end": 71,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 71,
"line_end": 86,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:86:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 86,
"line_end": 90,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:90:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 90,
"line_end": 95,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:95:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 95,
"line_end": 99,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:99:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 99,
"line_end": 101,
"snippet": "Place in `tests/conftest.py` for automatic availability:"
},
{
"id": "external_commands:SKILL.md:101:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 101,
"line_end": 108,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 108,
"line_end": 114,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 114,
"line_end": 128,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:128:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 128,
"line_end": 134,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:134:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 134,
"line_end": 135,
"snippet": "| `-v` | Verbose output |"
},
{
"id": "external_commands:SKILL.md:135:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 135,
"line_end": 136,
"snippet": "| `-vv` | More verbose |"
},
{
"id": "external_commands:SKILL.md:136:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 136,
"line_end": 137,
"snippet": "| `-q` | Quiet mode |"
},
{
"id": "external_commands:SKILL.md:137:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 137,
"line_end": 138,
"snippet": "| `-x` | Stop on first failure |"
},
{
"id": "external_commands:SKILL.md:138:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 138,
"line_end": 139,
"snippet": "| `--lf` | Run last failed tests only |"
},
{
"id": "external_commands:SKILL.md:139:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 139,
"line_end": 140,
"snippet": "| `--ff` | Run failures first |"
},
{
"id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 140,
"line_end": 141,
"snippet": "| `-k \"expr\"` | Filter by name expression |"
},
{
"id": "external_commands:SKILL.md:141:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 141,
"line_end": 142,
"snippet": "| `-m \"mark\"` | Run marked tests only |"
},
{
"id": "external_commands:SKILL.md:142:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 142,
"line_end": 143,
"snippet": "| `--tb=short` | Shorter traceback |"
},
{
"id": "external_commands:SKILL.md:143:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 143,
"line_end": 144,
"snippet": "| `--tb=no` | No traceback |"
},
{
"id": "external_commands:SKILL.md:144:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 144,
"line_end": 145,
"snippet": "| `-s` | Show print statements |"
},
{
"id": "external_commands:SKILL.md:145:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 145,
"line_end": 146,
"snippet": "| `--durations=10` | Show 10 slowest tests |"
},
{
"id": "external_commands:SKILL.md:146:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 146,
"line_end": 150,
"snippet": "| `-n auto` | Parallel execution (pytest-xdist) |"
},
{
"id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 150,
"line_end": 162,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:162:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 162,
"line_end": 166,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:166:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 166,
"line_end": 184,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:184:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 184,
"line_end": 187,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:187:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 187,
"line_end": 190,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:190:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 190,
"line_end": 194,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:194:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 194,
"line_end": 214,
"snippet": "```toml"
},
{
"id": "external_commands:SKILL.md:214:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 214,
"line_end": 227,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:227:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 227,
"line_end": 239,
"snippet": "```bash"
}
],
"finding_verdicts": [
{
"id": "network:references/fastapi-testing.md:38:hardcoded-url",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "The URL is httpx AsyncClient base_url=\"http://test\" for an in-process ASGI test client. It is a documentation example and does not make an external network request."
},
{
"id": "env_access:references/fastapi-testing.md:71:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This is a FastAPI testing documentation snippet using a local SQLite test database. It contains no real credential, environment access, or sensitive production database connection."
},
{
"id": "env_access:references/fastapi-testing.md:73:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This is a FastAPI testing documentation snippet using a local SQLite test database. It contains no real credential, environment access, or sensitive production database connection."
},
{
"id": "sensitive:references/fastapi-testing.md:71:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This is a FastAPI testing documentation snippet using a local SQLite test database. It contains no real credential, environment access, or sensitive production database connection."
},
{
"id": "external_commands:scripts/run_tests.py:32:python-subprocess-call",
"verdict": "false_positive",
"confidence": 0.83,
"reason": "The script invokes a fixed command list, [\"uv\", \"run\", \"pytest\"], with shell execution disabled. User-provided values are pytest arguments for an explicit local test runner, not a command injection sink."
},
{
"id": "external_commands:SKILL.md:11:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 11. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:29:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 29. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:33:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 33. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 42. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 48. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:49:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 49. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 50. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 51. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 54. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:65:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 65. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 71. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:86:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 86. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:90:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 90. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:95:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 95. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:99:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 99. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:101:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 101. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 108. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 114. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:128:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 128. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:134:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 134. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:135:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 135. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:136:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 136. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:137:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 137. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:138:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 138. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:139:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 139. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 140. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:141:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 141. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:142:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 142. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:143:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 143. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:144:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 144. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:145:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 145. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:146:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 146. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 150. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:162:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 162. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:166:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 166. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:184:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 184. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:187:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 187. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:190:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 190. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:194:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 194. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:214:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 214. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
},
{
"id": "external_commands:SKILL.md:227:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "This match is from Markdown formatting or inline pytest command documentation in SKILL.md around line 227. It is instructional content, not executable Ruby or shell code embedded in the skill runtime."
}
],
"semantic_findings": [],
"critical_findings": [],
"high_findings": [],
"medium_findings": [],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 3,
"total_lines": 578,
"audit_model": "claude",
"audited_at": "2026-07-09T01:08:22.432Z",
"agent_auto_install_policy": "allowed",
"manual_install_policy": "allowed"
},
"content": {
"user_title": "Master pytest Testing with uv",
"value_statement": "Python teams need consistent pytest workflows for unit tests, FastAPI tests, fixtures, and coverage. This skill gives Claude, Codex, and Claude Code practical commands and patterns for pytest projects that use uv.",
"seo_keywords": [
"Claude",
"Codex",
"Claude Code",
"pytest",
"Python testing",
"uv package manager",
"FastAPI testing",
"test coverage",
"pytest fixtures",
"parametrized tests"
],
"actual_capabilities": [
"Shows uv-based pytest commands for full suites, single files, individual tests, filters, and coverage reports.",
"Explains pytest discovery rules for test files, functions, classes, and methods.",
"Provides fixture examples for reusable setup, teardown, scopes, and shared conftest.py usage.",
"Demonstrates parametrized tests for repeated assertions across multiple inputs.",
"Documents FastAPI testing patterns for TestClient, async clients, database fixtures, dependency overrides, and authentication tests.",
"Includes a helper script for common pytest modes such as quick, full, coverage, failed, and watch-style filtering."
],
"limitations": [
"It focuses on pytest and uv, not unittest, nose, tox, or nox workflows.",
"It provides examples and commands, but it cannot guarantee every project has the same directory layout.",
"FastAPI examples use simplified test data and may need adaptation for production authentication or database layers.",
"Coverage guidance is basic and does not replace a full quality strategy."
],
"use_cases": [
{
"title": "Add tests to a Python feature",
"description": "Create pytest files, fixtures, and parametrized cases for new Python code while using uv commands to run them.",
"target_user": "Python application developer"
},
{
"title": "Validate FastAPI endpoints",
"description": "Set up TestClient or async httpx tests, override dependencies, and verify authentication, models, uploads, and error responses.",
"target_user": "Backend API engineer"
},
{
"title": "Improve test feedback in a project",
"description": "Run targeted tests, debug failures, generate coverage reports, and configure pytest options in pyproject.toml.",
"target_user": "Engineering lead or maintainer"
}
],
"prompt_templates": [
{
"title": "Run my pytest suite",
"scenario": "Beginner request for basic test execution",
"prompt": "Use pytest-mastery to run my Python test suite with uv. Start with the standard verbose command and explain any failures in simple terms."
},
{
"title": "Write tests for a module",
"scenario": "Create unit tests for existing Python code",
"prompt": "Use pytest-mastery to write pytest tests for this module. Include fixtures where helpful and show the uv command to run only the new tests."
},
{
"title": "Test a FastAPI endpoint",
"scenario": "Add API tests with dependency overrides",
"prompt": "Use pytest-mastery to add FastAPI tests for this endpoint. Include TestClient setup, dependency overrides if needed, and assertions for success and validation errors."
},
{
"title": "Design a complete test plan",
"scenario": "Advanced testing strategy for a Python service",
"prompt": "Use pytest-mastery to design a pytest plan for this service. Cover fixtures, parametrization, async tests, database setup, coverage targets, and useful pytest configuration."
}
],
"output_examples": [
{
"input": "Run only the failing tests and show a short traceback.",
"output": "Use uv run pytest --lf -v --tb=short. If the failure repeats, inspect the fixture setup and rerun the specific test node for faster feedback."
},
{
"input": "I need tests for a FastAPI protected route.",
"output": [
"Create a TestClient fixture.",
"Override the current-user dependency with a test user.",
"Call the protected route with the client.",
"Assert the status code and response body.",
"Clear dependency overrides after the test."
]
},
{
"input": "Add coverage reporting for the src package.",
"output": "Install pytest-cov, then run uv run pytest --cov=src --cov-report=term --cov-report=html. Add a coverage threshold when the team agrees on a target."
}
],
"best_practices": [
"Run the smallest relevant test target first, then run the full suite before finishing work.",
"Keep fixtures focused on setup and teardown that multiple tests actually share.",
"Use parametrization when the same behavior should be checked across multiple inputs."
],
"anti_patterns": [
"Do not hide failing tests with broad skip or xfail markers without a clear reason.",
"Do not place slow integration setup in every unit test when a narrower fixture will work.",
"Do not treat coverage percentage as proof that important behavior is tested."
],
"faq": [
{
"question": "Does this skill require uv?",
"answer": "The examples use uv commands. You can adapt the pytest patterns to other Python package managers if needed."
},
{
"question": "Can it help write FastAPI tests?",
"answer": "Yes. It includes TestClient, async httpx, database fixture, dependency override, authentication, upload, WebSocket, and error response patterns."
},
{
"question": "Can it generate coverage reports?",
"answer": "Yes. It documents pytest-cov commands for terminal, HTML, XML, and minimum threshold reports."
},
{
"question": "Does it run commands automatically?",
"answer": "No. It provides command patterns and a local helper script. Users or their AI coding tool decide when to run them."
},
{
"question": "Is it only for unit tests?",
"answer": "No. It covers unit-style tests, integration markers, FastAPI endpoint tests, database tests, and background task mocking."
},
{
"question": "Can it debug failed tests?",
"answer": "Yes. It lists pytest options for long tracebacks, debugger entry, local variables, and rerunning previously failed tests."
}
]
},
"file_structure": [
{
"name": "references",
"type": "dir",
"path": "references",
"children": [
{
"name": "fastapi-testing.md",
"type": "file",
"path": "references/fastapi-testing.md",
"lines": 266
}
]
},
{
"name": "scripts",
"type": "dir",
"path": "scripts",
"children": [
{
"name": "run_tests.py",
"type": "file",
"path": "scripts/run_tests.py",
"lines": 72
}
]
},
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 240
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |