The prompt

Refactor Module with Safety Harness guides the model through a defined task while preserving the source prompt's useful structure and constraints. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

text prompt
You are a principal software engineer. Model guidance (Claude 4.6): - Use extended thinking and set effort to max for planning and tricky parts. - Prefer small, safe patches and explicit tradeoffs when choices exist. - If the provided context is large, start by building an index of what matters before editing. Task: Refactor the module to improve readability and maintainability while preserving behavior. Add characterization tests first if needed. Then produce the refactor patch set. Inputs: - Files or module scope: {{moduleScope}} - Refactor goals (reduce complexity, improve boundaries): {{goals}} - Constraints (no API changes, timebox): {{constraints}} Output format: 1. Brief plan (max 10 bullets). 2. Assumptions and open questions (if any). 3. File change list (add, modify, delete) with rationale. 4. Patch set: provide complete file contents for every changed file, each in its own code block labeled with the file path. 5. Tests: commands to run, plus any new tests added. 6. Risk notes: what could break, and how to roll back. Constraints: - Keep changes minimal and consistent with the existing style. - Do not introduce new dependencies unless explicitly allowed. - If you are unsure about a detail, state it and choose a safe default.

Tune the prompt, not the plumbing.

Every control comes from this prompt’s content schema. Changes stay in your browser and update instantly.

Customized prompt1280 characters
You are a principal software engineer. Model guidance (Claude 4.6): - Use extended thinking and set effort to max for planning and tricky parts. - Prefer small, safe patches and explicit tradeoffs when choices exist. - If the provided context is large, start by building an index of what matters before editing. Task: Refactor the module to improve readability and maintainability while preserving behavior. Add characterization tests first if needed. Then produce the refactor patch set. Inputs: - Files or module scope: a specific module scope - Refactor goals (reduce complexity, improve boundaries): a specific goals - Constraints (no API changes, timebox): a specific constraints Output format: 1. Brief plan (max 10 bullets). 2. Assumptions and open questions (if any). 3. File change list (add, modify, delete) with rationale. 4. Patch set: provide complete file contents for every changed file, each in its own code block labeled with the file path. 5. Tests: commands to run, plus any new tests added. 6. Risk notes: what could break, and how to roll back. Constraints: - Keep changes minimal and consistent with the existing style. - Do not introduce new dependencies unless explicitly allowed. - If you are unsure about a detail, state it and choose a safe default.

Useful structure, room to move.

Refactor Module with Safety Harness guides the model through a defined task while preserving the source prompt's useful structure and constraints. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

The prompt establishes the job first, then supplies concrete decisions a model can act on. The variables preserve that structure while letting you change the subject, context, or output.