← Library
Maintenance Prompt

Refactor and optimise existing custom code

Drop in a block of custom code from your Webflow site and get a cleaner, faster version back, with a plain-English note on what changed and why.

Webflow MCP
Prompt
Here is a block of custom code from my Webflow site (custom code area or an embed).

Refactor and optimise it:
- Remove anything redundant or no longer used.
- Improve readability and performance.
- Keep the behaviour exactly the same.
- Flag anything that looks broken, risky, or out of date while you are in there.

Give me the cleaned-up version to paste back in, and summarise what you changed and why in plain English so I know it is safe.

<PASTE CODE HERE>

Walkthrough

Custom code in Webflow has a habit of piling up. Scripts get added for a tracking pixel here, a quick fix there, an embed from a tutorial somewhere else, and over time nobody is sure what is still needed or whether any of it conflicts.

Paste a block from your site settings, page settings, or an embed element. Claude reads it, strips out the dead weight, tightens what remains, and keeps the behaviour identical so nothing on the live site changes for your visitors. It also flags anything that looks broken or out of date while it is in there, which is often how you discover a script that has quietly stopped working.

You get a lighter, clearer version to paste back, plus a plain-English summary of every change so you can sign off on it with confidence. A good periodic tidy-up for any site that has been live and edited for a while.

Copied to clipboard