Merge duplicate components on your website with an agent
During a livestream, a site owner was asked why the blog and the resource hub had separate cards for the same content. The cards were built in two projects that were later merged, but now showed the same thing: image, category and title. Claude Code was asked to create one shared card, ContentCard, replace both and delete the old ones. The card got a bit bigger with the image in 16:9, and a change now happens in one place.
Done with Claude CodeModerate
What was done
During a livestream, a site owner was asked why the blog and the resource hub had separate cards for the same content. The cards were built in two projects that were later merged, but now showed the same thing: image, category and title. Claude Code was asked to create one shared card, ContentCard, replace both and delete the old ones. The card got a bit bigger with the image in 16:9, and a change now happens in one place.
How to do it
- Paste the prompt into the tool, and replace the text in brackets with your own.
- Read the answer through. Do not send, delete or publish anything until you have seen it yourself.
- Check the original before you trust a figure, a name or a date.
Try it with Claude Code
Go through the code for [website] and find components that show the same thing under different names. List where each one is used and what sets them apart. Suggest one shared component for each group, and show me the suggestion before you change anything. Once I have said yes, replace the old ones, delete them and check that the pages look right. You are done when I have reviewed the changes.
Replace text in brackets with your own.
@juanpol on X ·