Every site that's been worked on for a year or two carries the same kind of debt.
A brand color gets typed in as a hex value by hand a dozen times instead of being set once.
A "24px" here and a "25px" there were both meant to be the same spacing.
Three different card styles do almost the same job because three different people built them at three different times.
None of it is broken, exactly - it just means every future change to that color, that spacing, or that card style has to be made in a dozen places instead of one.
This is arguably the highest-value job you can hand the Divi AI Agent on an established site: finding that drift and folding it into a small number of global variables and presets you control from one place.
Find the Inconsistencies First
Before changing anything, ask the Agent to look. It can scan every module on the current page and report which combinations of settings - a Border, a Box Shadow, a Spacing setup - show up on more than one module, along with how many times each one repeats and which modules use it.
This is a read-only scan: nothing on the page changes while it runs, so there's no reason not to run it early and often.
Look for modules that repeat the same combination of settings - things like Border, Box Shadow, or Spacing - across this whole page. List each combination, how many modules use it, and which ones, but don't change anything yet.
Read the result carefully. It reports exact repeats - the same value used more than once, character for character - which is exactly the kind of thing that should live in one shared place instead of being retyped.
It won't catch the near-misses on its own, though: a 24px margin and a 25px margin that were both meant to be identical look like two different values to it, not one inconsistency. Those you'll still catch by eye once you see the list laid out.
Turn Repeated Values Into Global Variables
You can use the Ask mode first to get an audit of your current page. Once you know what repeats, ask the AI Agent to convert it using the Build mode. For more details about the two modes, check out the Ask Mode and Build Mode in the Divi AI Agent article.
This is a separate step from the scan above: it looks specifically at colors, fonts, gradients, numbers, and images that are typed directly into a section or the whole page rather than pulled from a variable, and offers to turn them into Global Variables - the same feature you'll sometimes see called Design Variables inside the builder itself.
Note: Colors, fonts, gradients, and images are offered even the first time they appear; a plain number or size needs to show up at least twice before it's worth flagging as a candidate.
Prompt Example:
In the hero and the three sections below it, find any color, font, or spacing value that isn't already using a variable, and offer to turn the ones that repeat into reusable variables.
This opens a Choose layout values to convert screen in the chat, with the line "Select the values you want to turn into global variables." underneath. Each detected value is listed with a checkbox, its actual value, and how many times it appears on the page, grouped by type; the ones most worth converting are pre-checked for you. Nothing is created or changed until you review the list and click Create Variables - or back out entirely with Cancel.
Once you confirm, the Agent creates a variable for each selection you kept (reusing an existing one if it already matches), swaps every occurrence on the page over to point at it, and saves the result.
Consolidate Repeated Styles Into Presets
A variable stores one value. A preset stores a whole bundle of settings at once, so when the duplicate scan turns up the same combination of settings - not a single color, but a whole Border-plus-Shadow setup - repeated across several modules, that's a job for a preset rather than a variable. Mastering Divi 5 Presets and How to Use Option Group Presets in Divi 5 cover the feature itself in full; here, the Agent is doing the finding and the applying for you.
Prompt Example:
Turn the border-and-shadow combination that keeps showing up on the pricing cards into an Option Group Preset, apply it to every card that already matches it, and give it a name that describes what it does.
Before you rely on a new preset anywhere else, ask the Agent to summarize what it actually contains - useful the moment you're not the one who reviewed every setting yourself.
Summarize what that new preset actually changes, so I can check it before it goes anywhere else on the site.
Standardize Typography and Spacing
Typography and spacing are usually the two categories with the most quiet drift, because a slightly-off heading size or a padding value nudged by a few pixels rarely gets noticed on its own. Point the same scan-and-convert pair at them specifically.
Look specifically at heading sizes and paragraph spacing across this page. List which ones already repeat and which ones are close but not exactly the same, then convert the ones that should match into shared variables.
Approvals You Will See
Two different checkpoints show up in this workflow, and they work differently. Converting values into variables is confirmed by the Choose layout values to convert screen itself - you already have to pick the values and click Create Variables before anything happens, so there's no separate prompt after that.
Saving a preset is different: it's tagged Destructive, which means it always stops and asks you to approve it first, no matter how the request was worded. The same is true of saving global variable changes made any other way. None of this can be turned off, and there's nothing you need to turn on, either - it's simply how these particular actions are built. For more details, check the Approvals and Risk Levels in the Divi AI Agent article.
Do It Page by Page
Don't ask the Agent to clean up your entire site's design system in one request.
A sweep that big is hard to review properly, hard to undo selectively if one part of it goes wrong, and expensive to run in a single pass.
The better rhythm is:
Scan a page,
Review what it found,
Convert and consolidate on that one page,
Check the result, then move to the next.
Example prompt:
Run this design-system cleanup on the Services page only for now. Once I've checked it, I'll ask you to do the About page next.
Pro tip: Treat each page as its own checkpoint rather than one giant request, and a job that would otherwise be nearly impossible to review becomes a series of small ones you can actually trust.

