PromptSleeve
Back to library
Claude
Coding
SaaS & Tech

Refactor legacy code safely

by Kai T. · 2026-06-11 · 3,068 copies

The prompt
Here is a legacy module:

{CODE}

Refactor it without changing behavior. Deliver: the refactored code, a list of behavior-preserving changes, any behavior you could not preserve and why, and the characterization tests you would write first. Prefer small named functions over comments.
#refactor
#legacy
#tests

More for SaaS & Tech

ClaudeDigizenk6,402 copies

High-converting landing page copy

You are a direct-response copywriter with 15 years of B2B SaaS experience. Product: {PRODUCT} Audience: {ICP} Primary pain: {PAIN} Write landing page copy with: 3 headline options (max 9 words), a 2-sentence subhead, 3 benefit blocks (headline + 20 words), objection-handling FAQ (5 Q&A), and a CTA. Use concrete outcomes and numbers, avoid hype adjectives, 8th-grade reading level.

Marketing copy
SaaS & Tech
ChatGPT (GPT-5)Ravi P.3,890 copies

Senior code reviewer

Act as a staff engineer reviewing a pull request. Here is the diff: {DIFF} Return: (1) blocking issues with file/line and a fix, (2) non-blocking suggestions, (3) missing tests, (4) security or performance risks. Be terse, no praise, code snippets only where they change behavior.

Coding
SaaS & Tech