---
name: figma-layer-rename-lite
description: >-
  Lightweight version of the "figma-layer-rename" skill. Walks the selected FRAME or SECTION's entire node tree, detects auto-generated layer names (Frame 12, Group 4, Rectangle 7, ...) and duplicate generic sibling names (e.g. four different sections all named "Section"), and proposes semantic replacements for both — read-only, no renames are applied. Figma Design Agent edition. For the full skill that also applies the renames after confirmation, use `figma-layer-rename`.
title: figma-layer-rename-lite
canonical_url: https://skilld.dev/gh/gaspanik/figma-layer-rename-lite-skill
last_updated: 2026-09-20T11:44:10.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [LICENSE](https://skilld.dev/api/skills-raw/gaspanik/figma-layer-rename-lite-skill/figma-layer-rename-lite/LICENSE).
>
> If the user asked to install this Skill, run `npx skilld install gaspanik/figma-layer-rename-lite-skill/figma-layer-rename-lite`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/figma-layer-rename-lite`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/gaspanik/figma-layer-rename-lite-skill/figma-layer-rename-lite) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/figma-layer-rename-lite`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/figma-layer-rename-lite --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/figma-layer-rename-lite --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Figma Layer Rename (Lite)

**Ver:** ver.202608081524

Detect auto-generated layer names and undifferentiated duplicate sibling names anywhere in the selected frame's tree, and propose semantic replacements. This is a read-only check-and-report skill — it never renames anything in the file.

**Output language:** Respond in the same language the user is using in this conversation.

**Environment:** This edition runs inside Figma's agent environment. The target comes from the current canvas selection, and all reads go through the Plugin API script execution tool (e.g. `evaluate_script`). No URLs, no external tools.

## Why this exists

The value of `figma-layer-rename` is visible the moment the proposal table appears — a `Frame 12` next to its proposed `HeroSection` makes the case for itself, before anything is actually renamed. This lite edition stops right there: it runs both detection passes and shows the full proposal table, but never touches the file. For confirmation-gated apply (and to actually clean up the file), use the full `figma-layer-rename` skill.

## Scope

Two categories of issue, both always run — since nothing is written, there's no reason to gate either behind a confirmation question:

- **Auto-generated layer names** — `Frame N`, `Group N`, `Rectangle N`, etc. (Step 2).
- **Duplicate generic sibling names** — e.g. four different sections all literally named `Section`. Real names, but useless for telling siblings apart (Step 2.5).

Nothing else. No variable binding, no auto-layout changes, no property changes, no renaming.

**Target node types:** FRAME or SECTION only. If the selection is a `COMPONENT`, `COMPONENT_SET`, or anything else, tell the user this skill only handles frames and sections, and ask them to select one.

**Skip `INSTANCE` subtrees entirely.** An override proposal inside an instance would only ever apply as a local override diverging from the main component — not useful even as a suggestion. When walking the tree, if a node's type is `INSTANCE`, skip it and all descendants.

**Treat icon-glyph containers as a single leaf — don't descend into their vector paths.** A container whose children are all primitive path/shape nodes (`VECTOR`, `BOOLEAN_OPERATION`, `STAR`, `ELLIPSE`, `RECTANGLE`, `LINE`), with no text nodes and no further nested containers, is almost always one icon glyph assembled from multiple paths. Propose a name for the container itself if its name is auto-generated (per Step 2's regex), then stop there: don't inspect or propose names for its child paths individually.

---

## Step 1: Resolve the target

Use the current canvas selection — its `id` and `type` are typically provided directly. If nothing is selected, ask the user to select the target frame or section on the canvas.

Check the type: `FRAME` or `SECTION` → continue; anything else → ask for a frame/section selection (see Scope).

---

## Step 2: Detect auto-generated layer names

Fetch the tree via the script tool (walk `children` recursively from the root, collecting `id`, `type`, `name`; do not descend into `INSTANCE` nodes). Then check each node's name against:

    /^(Frame|Group|Rectangle|Ellipse|Vector|Polygon|Star|Line|Arrow|Boolean|Component|Instance)(\s+\d+)?$/i

The trailing number is optional: files often contain bare default names like `Frame` or `Ellipse` with no number — typically zero-size spacer frames or plain ellipses used as bullet dots. These should be proposed too (e.g. a 10px-wide empty frame between two text nodes → `Spacer`; a small ellipse next to a list item → `BulletDot`).

For each match, infer a semantic name from:

- Node type and its position in the tree (root container, header, icon slot, divider, footer, ...)
- Sibling and parent context (a `Rectangle` right below a `Card` → `Divider`; a `Group` next to a `Nav` at the top → `Logo`)
- Children content (a `Group` containing only text nodes → `LabelGroup`; a `Frame` with an image and a heading → `HeroContent`)

**Naming convention:** Don't invent a casing style — match the prevailing convention of the semantic layer names already in the file (`hero-section` → kebab-case, `Hero Section` → spaced Title Case, ...). If there's no clear precedent, default to PascalCase (`HeroSection`).

Populate a proposal list: `{ nodeId, currentName, proposedName, reason: "Auto-generated name" }`.

---

## Step 2.5: Duplicate generic sibling names

A name like `Section` or `Container` is real and semantic, so Step 2 leaves it alone — but when the *same* name repeats across siblings that are actually different things, it stops being useful. Always run this at a fixed depth of 4 (down 4 levels from the root) — shallow depths like 1–2 miss most real duplicates in a typical multi-section page, since `Container`/`Section` collisions are just as common 3–4 levels down as at the top (a wrapper for padding, a wrapper for a grid, then the actual repeated siblings). The full `figma-layer-rename` skill lets you choose this depth; the lite edition fixes it at 4 so the pass runs with no question asked.

*Wrapper collapse (Code to Canvas files only):* if any node name matches `/:(margin|padding)$/` and has exactly one child, treat that wrapper as transparent when counting depth and grouping siblings (recursively). If no such names exist in the tree, skip this rule.

At depth 4, group nodes by parent, then by name; any name shared by 2+ siblings under the same parent is a candidate. **At this depth, scrutinize before flagging:** repeated card/list/icon-slot patterns get more common the deeper you go, and renaming those would hurt rather than help. Only flag duplicates where the siblings represent structurally or contextually different content that happens to share a generic name — leave intentional repetition (same-shaped cards, rows, icon slots) alone. Infer semantic names using the same reasoning as Step 2, and tag the reason as `"Duplicate-name disambiguation"` so the report can distinguish the two categories.

If none are found at this depth, this pass simply contributes nothing to the table — no need to say so explicitly.

---

## Step 3: Report

If no candidates at all from either pass:

    ✅ No auto-generated layer names or hard-to-distinguish duplicate names were found.
    All layers already have meaningful names.

Then stop.

Otherwise, present everything in one table, sorted by tree order:

| # | Node ID | Current name | Proposed name | Reason |
|---|---------|-----------|--------|------|
| 1 | 123:456 | Frame 12 | HeroSection | Auto-generated name |
| 2 | 123:789 | Group 4 | LabelGroup | Auto-generated name |
| 3 | 234:111 | Section | PricingSection | Duplicate-name disambiguation |
| 4 | 234:222 | Section | FaqSection | Duplicate-name disambiguation |

**Total: N suggestion(s)** (N auto-generated name / N duplicate-name disambiguation)

This is a proposal only — no changes have been made to the file. If you'd like to actually apply these renames, run the full `figma-layer-rename` skill.

---

## Error handling

- No selection, or selection is not FRAME/SECTION: ask the user to select a frame or section
- Script execution error: report it and ask the user to retry (the file may have been edited mid-scan)
- Very large trees: if a single walk is too slow or errors, walk top-level sections one at a time and merge results before reporting
