I've been designing in Figma for about ten years and I still don't name my layers. Last week I opened a file I made myself and the panel was Frame 234, Group 12, Text 4, Rectangle 89. So I built a plugin instead of fixing my habits, and I've just published it. It's free.
It does three things.
1. Renaming. Text layers become "Role: Content" - Heading: Authentic BBQ Experience, Button: View Portfolio, Link: Privacy Policy. The role is not parsed from the existing name, it comes from structure: Link from Figma's own hyperlink property, Button from sitting inside a small rounded auto-layout parent, Heading from 28px or larger, Subheading from 20-27px, Label from three words or fewer, Body for everything else. Frames, groups and sections take the first text found inside them in reading order. Containers with no text anywhere inside are left alone rather than guessed at. Component instances keep their component-based names, so your design system stays recognisable. Scopes are selection, page, or the whole file.
2. Hierarchy. Select a frame, group or section and it sorts its children into reading order, with backgrounds sunk to the bottom of the stack. It is deliberately conservative: it skips anything whose children visually overlap, plus auto-layout frames and anything with a locked child, so it can never change what renders in front of what.
3. Cleanup. Scans the page for layers that are probably junk - empty frames and text, true 0x0 layers, accidental duplicate siblings, fully off-canvas layers, and hidden or 0%-opacity layers. Nothing is ever deleted automatically. You scan, review the full count and breakdown, optionally select everything on canvas to eyeball it first, then confirm. Only "empty layers" is checked by default.
The part I actually built it for:
The naming is meant to make sense to machines outside Figma too. Instead of Frame 48095902, or even just "Book a Demo", you get "Button: Book a Demo". Take a screenshot of that frame into ChatGPT or Claude and the model has far more to work with - what each element is, not only what it says. Making a file more machine-readable without making it harder for humans to read was the whole point.
Safety and privacy:
Locked layers are never touched, in any mode. Zero-size only flags layers where both width and height are 0, so dividers and hairlines are safe. Off-canvas only flags layers with zero overlap, so bleeds are safe. Every change is a normal Figma edit, so Cmd/Ctrl+Z undoes all of it. And networkAccess is set to none in the manifest, so it makes no network requests at all - your layer names, text content and file data never leave your machine. It stores exactly two preferences locally via clientStorage and nothing else.
It's free and live here: https://www.figma.com/community/plugin/1673670269135547890/tidyup-rename-clean-layers
The part I'd most like challenged is the role detection. 28px for Heading and three words for Label are judgement calls. If it names something badly in your files, I'd rather hear about it than guess.
