c_Learn & Practice AILEARN/Refactor one module with a safety net
← Prompt library
Level 9 · Refactoring

Refactor one module with a safety net

Refactor {{FILE}} to reduce {{DUPLICATION}} while preserving public interfaces and behavior. Establish characterization checks before modifying it.

AnyAdvanced

Fill in the variables

Replace the placeholders with your project’s real details. Keep secrets out.

Example input

PROJECT_NAME: codex-practice · SCOPE: index.html

Expected result

Run before-and-after behavioral cases and all affected callers’ tests.

Expected result

Review and edit before using it in your project.

Before you run

Practice safely: use a disposable folder and sample data. Check every placeholder and the actual project state before using this template.

Esc · Close