Zoe Addamssance

Figma Plugin Writer

Developmentv1.0.0
By Zoe AddamssanceUpdated 2026-05-112 versions · latest released 2026-03-23figma-plugin-writer@clawhub_zerozlw/figma-plugin-writer
Code GenerationFrontend

According to AlphaMoat, as of 2026-09, Figma Plugin Writer has 1,271 downloads and 0 stars — ranked #4,906 of 5,078 AI skills overall, and #567 of 577 in Development.

Installs
159
Downloads
1.3K
Stars
-
Overall Rank
#4,906
Top 97% overall · Top 99% in Development
PlatformInstallsDownloadsStarsComments
ClawHub ↗281.1K--
SkillHub ↗1591.3K-—

Platforms count differently and update at different times.

What this skill does

It requires a plugin directory and code file, with an optional target Figma file for context. Running generated code changes designs; default templates may clear a page, so review code and use a duplicate or named frame. Requires the existing plugin folder and manifest; generated code is run by the user in Figma. Load the required available fonts before text creation, and review the actual affected nodes rather than assuming code generation already changed the design.

Profile published 2026-10-27

What you can do with it

  • Create UI prototypes through plugin code
  • Automate design systems or app screens

When to use it

  • When the target file is clear and generated code can be reviewed

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Write plugin code for this duplicate and replace only the named frame.
Explain which elements the code will change before creating it.

Monthly Trend

Downloads1.3K
2267871.3K2026-03 · Downloads 3032026-05 · Downloads 6582026-06 · Downloads 7812026-07 · Downloads 9842026-08 · Downloads 1.1K2026-09 · Downloads 1.3K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-091.3K—-
2026-081.1K+14.9%-
2026-07984+26.0%-
2026-06781+18.7%-
2026-05658—-
2026-03303—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

5.3 KB · ClawHub v1.0.0
---
name: figma-plugin-writer
description: Write Figma plugin code to automate UI design in Figma files. Activate when user wants to create UI mockups, design systems, app screens, or visual prototypes directly in Figma via plugin code. NOT for: Figma API REST calls, file management, or commenting.
---

# Figma Plugin Writer

Write plugin code (`code.js`) to automate design in Figma files. After updating the code, notify the user to run the plugin.

## Prerequisites
Show all (224 lines)

The user must provide:
1. **Plugin directory** — folder containing `code.js` and `manifest.json`
2. **Code file** — typically `code.js`
3. **Target Figma file** — optional, for context

## Workflow

1. Receive design requirements from the user
2. Write plugin code to `code.js`
3. Notify user: `Plugins → Development → <plugin-name>`
4. Iterate based on feedback

## API Reference

### Font Loading (required before creating text)

```js
await figma.loadFontAsync({ family: "Inter", style: "Regular" });
await figma.loadFontAsync({ family: "Inter", style: "Medium" });
await figma.loadFontAsync({ family: "Inter", style: "Semi Bold" });
await figma.loadFontAsync({ family: "Inter", style: "Bold" });
```

### Frame (Container)

```js
var frame = figma.createFrame();
frame.name = "MyFrame";
frame.resize(width, height);
frame.cornerRadius = 12;
frame.fills = [{ type: "SOLID", color: { r: 1, g: 1, b: 1 } }];
frame.x = 0;
frame.y = 0;
```

### Text

```js
var text = figma.createText();
text.characters = "Hello World";
text.fontSize = 16;
text.fontName = { family: "Inter", style: "Regular" };
text.fills = [{ type: "SOLID", color: { r: 0, g: 0, b: 0 } }];
```

### Rectangle

```js
var rect = figma.createRectangle();
rect.resize(100, 50);
rect.fills = [{ type: "SOLID", color: { r: 0.9, g: 0.2, b: 0.2 } }];
rect.cornerRadius = 8;
```

### Nesting Nodes

```js
frame.appendChild(text);
parentPage.appendChild(frame);
```

### Drop Shadow

```js
frame.effects = [{
  type: "DROP_SHADOW",
  color: { r: 0, g: 0, b: 0, a: 0.1 },
  offset: { x: 0, y: 4 },
  radius: 12,
  spread: 0,
  visible: true,
  blendMode: "NORMAL",
}];
```

### Stroke

```js
frame.strokes = [{ type: "SOLID", color: { r: 0.8, g: 0.8, b: 0.8 } }];
frame.strokeWeight = 1;
```

### Text Alignment

```js
text.textAlignHorizontal = "CENTER"; // LEFT | CENTER | RIGHT | JUSTIFIED
text.textAlignVertical = "CENTER";   // TOP | CENTER | BOTTOM
```

### Auto Layout (inside Frame)

```js
frame.layoutMode = "VERTICAL"; // or "HORIZONTAL"
frame.primaryAxisAlignItems = "CENTER";   // MIN | CENTER | MAX | SPACE_BETWEEN
frame.counterAxisAlignItems = "CENTER";
frame.paddingTop = 16;
frame.paddingBottom = 16;
frame.paddingLeft = 16;
frame.paddingRight = 16;
frame.itemSpacing = 8;
```

### Page Navigation

```js
var pages = figma.root.children;
var targetPage = pages[pages.length - 1];
await figma.setCurrentPageAsync(targetPage);
```

### Clear Page Content

```js
var old = targetPage.children.slice();
for (var i = 0; i < old.length; i++) {
  old[i].remove();
}
```

### Viewport

```js
figma.viewport.scrollAndZoomIntoView([frame]);
```

### Notifications

```js
figma.notify("Done!", { timeout: 3000 });
figma.notify("ERROR: " + e.message, { timeout: 10000 });
```

### Page Info

```js
var pages = figma.root.children;
var count = pages.length;
var pageName = pages[0].name;
```

## Code Template

```js
async function main() {
  try {
    // 1. Load fonts
    await figma.loadFontAsync({ family: "Inter", style: "Regular" });
    await figma.loadFontAsync({ family: "Inter", style: "Bold" });

    // 2. Get target page
    var pages = figma.root.children;
    var target = pages[pages.length - 1];
    await figma.setCurrentPageAsync(target);

    // 3. Clear old content
    var old = target.children.slice();
    for (var i = 0; i < old.length; i++) old[i].remove();

    // 4. Create design...
    var frame = figma.createFrame();
    frame.name = "Screen";
    frame.resize(375, 812);
    frame.fills = [{ type: "SOLID", color: { r: 1, g: 1, b: 1 } }];
    frame.x = 0;
    frame.y = 0;
    target.appendChild(frame);

    // 5. Done
    figma.viewport.scrollAndZoomIntoView([frame]);
    figma.notify("Design complete!", { timeout: 3000 });

  } catch (e) {
    figma.notify("ERROR: " + e.message, { timeout: 10000 });
  }
}

main();
```

## Pitfalls & Gotchas

### documentAccess: "dynamic-page" Mode

If `manifest.json` has `"documentAccess": "dynamic-page"`:
- ❌ `figma.currentPage = page` → ✅ `await figma.setCurrentPageAsync(page)`
- ❌ `figma.getNodeById()` → ✅ `await figma.getNodeByIdAsync()`
- ❌ `figma.closePlugin()` → ✅ `await figma.closePluginAsync()`

### Error Handling

- Always wrap code in `try-catch`
- Show errors via `figma.notify("ERROR: " + e.message, { timeout: 10000 })`
- Do not use emoji in text content (font may not support the glyph)
- Do not call `figma.closePlugin()` automatically (let user close manually)

### Free Tier Limits

- Max 3 Pages — do not create new Pages
- Work within existing Pages (clear and rebuild)

### Fonts

- Default: Inter (built into Figma)
- Supported styles: "Regular", "Medium", "Semi Bold", "Bold"
- Colors use `{ r, g, b }` format with 0-1 range

## Iteration Pattern

On each design iteration:
1. Clear old elements: `page.children.slice().forEach(c => c.remove())`
2. Recreate design with changes
3. Notify user to re-run the plugin

Popular in Development

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.