Pytest Optimizer
This Pytest Optimizer analyzes your tests & suggests improvements for faster execution and better code coverage – boosting efficiency!
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add pytest-optimizer npx -- -y @trustedskills/pytest-optimizer
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"pytest-optimizer": {
"command": "npx",
"args": [
"-y",
"@trustedskills/pytest-optimizer"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The Pytest Optimizer analyzes existing pytest test suites to identify opportunities for improvement. It aims to enhance speed, pinpoint flaky tests, and increase code coverage within Python projects. By providing actionable suggestions, this skill helps maintain high-quality and fast-running test pipelines.
When to use it
- Project Setup: When starting a new Python project and establishing testing practices from the beginning.
- Continuous Integration: As part of automated build and test pipelines to ensure consistent performance.
- Legacy Refactoring: During updates to older Python codebases, helping modernize testing approaches.
Key capabilities
- Analyzes pytest suites for optimization opportunities.
- Identifies flaky tests.
- Suggests improvements to increase code coverage.
- Performs all analysis locally without transmitting source code externally.
Example prompts
- "Analyze my pytest suite and suggest ways to improve its speed."
- "Find any flaky tests in my project's test pipeline."
- "How can I increase the code coverage of my pytest tests?"
Tips & gotchas
- The skill is specifically designed for Python projects.
- It requires a
requirements.txtorpyproject.tomlfile to function correctly. - Ensure your project uses a supported version of Python, as incompatible versions may cause issues.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.