optimizetests

Identify and reduce OpenClaw test runtime and wasted setup without sacrificing coverage.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/zhcndoc/openclaw --skill optimizetests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimizetests
Source: https://github.com/zhcndoc/openclaw/tree/main/.agents/skills/optimizetests
Command: npx skills add https://github.com/zhcndoc/openclaw --skill optimizetests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimize OpenClaw slow tests, imports, misplaced coverage, and CI wall time without dropping coverage.

Core Features & Use Cases

  • Accelerates test runtime by targeting hotspots, reducing import overhead, and cleaning up flaky test setups.
  • Maintains full test coverage while improving CI stability and feedback loops.
  • Use Case: When CI runs long due to heavy test suites, apply optimizetests to pinpoint bottlenecks and implement targeted fixes.

Quick Start

Follow the runbook to benchmark hotspots, optimize imports and setup, and keep CI green without dropping coverage.

Frequently Asked Questions about optimizetests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up slow test suites without losing coverage?

Accelerate slow test suites by targeting import-heavy hotspots, reducing gateway and server initialization overhead, and cleaning up flaky test setups. This approach minimizes CI wall time while strictly maintaining full test coverage.

What's the best way to reduce CI wall time for heavy test setups?

Reduce CI wall time by benchmarking test hotspots and optimizing heavy gateway, server, and client initialization routines. Applying targeted fixes to these setup bottlenecks ensures reproducible benchmarks and keeps CI pipelines green.

How do you optimize import overhead in test runtime?

Optimize import overhead by identifying import-heavy hotspots across broad test suites and applying targeted fixes. This reduces wasted setup time and improves test reproducibility without sacrificing existing coverage.

Can I fix flaky tests in CI without dropping test coverage?

Fix flaky tests in CI by cleaning up unstable test setups and applying production-like changes with guardrails. This stabilizes feedback loops and ensures performance gains without sacrificing any test coverage.

How do I benchmark test hotspots to improve runtime performance?

Benchmark test hotspots by following a runbook to pinpoint runtime bottlenecks, optimize imports and setup, and implement safe changes. This yields reproducible benchmarks and verifiable performance gains across broad test suites.

Does test optimization work for broad test suites with heavy initialization?

Test optimization works for broad test suites by specifically targeting gateway, server, and client initialization overhead. It pinpoints bottlenecks and implements safe, production-like changes with guardrails to improve runtime.