/skills:optimize-pytestfrom skills
Measures and safely optimizes slow pytest suites by separating startup, collection, fixture, call, and teardown costs. Use when diagnosing slow test feedback, expensive fixtures, or evaluating parallelization strategies.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
For $optimize-pytest --help or $optimize-pytest -h (including native Claude forms), return concise help and stop before
any workflow step. State the purpose and invocation policy. Show exact usage
for every public action. Describe each public action, positional
argument, and flag in one concise line, including -h, --help; say "No
additional public flags" when there are no others. Use only the documented
public interface. For internal or coordinator-only skills, state that boundary
and that no standalone public workflow action exists. After the selected
SKILL.md is loaded, help is report-only: do not call any additional tools,
inspect project state, or modify files, private state, Git, or external systems.
Never expose private helper actions or flags or treat help as workflow
authorization.
Use $optimize-pytest in Codex, /optimize-pytest in Claude Code, or
/skills:optimize-pytest in the Claude plugin. Dollar-prefixed skill examples
refer to the same named skill on either host; use the native invocation syntax.
Preserve the declared invocation policy, approvals and workflow ownership.
Use available native tools; an unavailable required capability is a blocker,
never permission to bypass a guard or claim unobserved behavior.
Measure and improve pytest feedback time without weakening correctness, isolation, failure diagnostics, or the final validation gate. Optimize from evidence: inspect first, measure a safe representative lane, rank cumulative cost, apply the smallest justified change, and prove a like-for-like result.
troubleshoot for failing, hanging, intermittent, or flaky tests whose
cause is not established as test-suite performance.python-project for Python project or test-layout scaffolding.code-review for a generic implementation review.github-workflows for substantive GitHub Actions implementation after
this skill has defined the test-performance requirements.Before executing pytest, inspect the applicable instructions and the project's
pytest configuration, dependency files, lockfiles, root and nested
conftest.py files, plugin hooks, marker registration, testpaths, native test
commands, CI lanes, and artifact ignore rules.
Read:
references/safe-measurement.md before running any measurement or profiler.references/optimization-playbook.md when diagnosing or changing suite
structure, fixtures, imports, data, or test classification.references/scaling-and-ci.md before recommending or adopting parallelism,
affected-test selection, coverage changes, sharding, CI thresholds, or Pants.Verify version-sensitive pytest, plugin, and Python profiler guidance against current official documentation before changing the reusable instructions or introducing a dependency.
--basetemp output. Pytest may clear an existing --basetemp;
never point it at a reused or broad directory.-n auto, disabled plugin autoload, testmon, marker filtering, or
sharding the canonical correctness command before required plugins,
isolation, debugging, coverage, and final-gate behavior are verified.When using this skill, capture durable, reusable, public-safe learnings in the narrowest appropriate surface only when the task contract allows source edits. For read-only/report-only work, or when a learning is not public-safe, evidence-backed, in scope, or free of unverified/vendor-specific claims, do not edit skill sources; report that it was skipped. Do not capture secrets, private URLs, customer data, raw logs, or one-off local state.
Return:
references/safe-measurement.md: safe measurement commands, artifact
handling, comparability, and profiler interpretation.references/optimization-playbook.md: ordered suite-review and remediation
rubric.references/scaling-and-ci.md: parallelism, affected-test selection, lanes,
sharding, coverage, governance, and Pants escalation.evals/trigger-prompts.csv: canonical should-trigger and should-not-trigger examples.README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)evals/evals.json (opens in a new tab)evals/process-cases.md (opens in a new tab)evals/trigger-prompts.csv (opens in a new tab)references/optimization-playbook.md (opens in a new tab)references/safe-measurement.md (opens in a new tab)references/scaling-and-ci.md (opens in a new tab)scripts/test_measurement_examples.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nebius/nebius-ps-services --plugin skills75 skills in this plugin
/agent-nebius-auth-diagnoseRead-only diagnosis for current-session Nebius project discovery, agent authentication, quota reads, profiles, selectors, or auth-hook failures. Use when auth is missing/blocked; never mutate auth or IAM./agent-nebius-auth-setupUse only when explicitly invoked to bootstrap or repair current-project Codex Agent Nebius auth: account/tenant access, credentials/profile, repair lease, or separately requested auth hooks./ai-agent-designDesign provider-neutral production AI agent subsystems: behavior and topology, contracts, tools, context, memory, authority, durability, security, evals, and operations. Use ai-stack when AI technology selection remains, design/app-stack for whole products, and implementation skills for code./ai-stackSelect or review undecided AI components across models, runtimes, training/inference, interoperability, retrieval, evals, safety, and operations. Consume ai-agent-design's frozen agent-subsystem contract; use app-stack for non-AI layers, research for one technology, and design for whole solutions./alignAlign a project after changes across code, wiring, tests, CI, CLI/help, config, docs, workflows, and skills, with focused quality gates. Use align-skill for skill-folder-only work./align-skillAlign existing/scaffolded skills for Agent Skills, Codex, Claude Code, and npx skills installation while preserving functionality, native controls, resources, and evals. Accept local or report-only GitHub sources; use skill-creator for new scaffolds and align for projects.