Tools
Code Reuse
Finds and reuses existing test functions from the workspace to avoid code duplication.
Analysis and Optimization
This tool finds and reuses existing test functions from the workspace to avoid code duplication. It's essential for maintaining DRY (Don't Repeat Yourself) principles in your test suite, improving test maintainability by centralizing common functionality, and reducing overall code duplication across test files.
You provide the path to a test file that needs code reuse optimization. The tool scans your workspace for existing test files (looking for Skyramp-generated tests by default), identifies reusable functions that could benefit the target test file, suggests appropriate imports and function calls, and updates the test file to leverage existing code rather than duplicating functionality.
The LLM intelligently matches functionality across test files, understanding semantic similarity even when function names differ. It generates proper import statements, refactors test code to use shared functions, and ensures the updated tests maintain their original behavior while leveraging the reused code.