---
name: figpea-agent
description: Drives the Figpea design editor programmatically through its window.figpea scriptable API over a browser-automation MCP (Playwright MCP, Chrome DevTools MCP, or similar) — opening the editor with ?agent=1, opening existing PSD, Adobe XD, Figma (.fig), SVG, and PDF files, discovering the surface with describe(), authoring and mutating layers, and iterating with screenshots.
---

# Figpea Agent

`window.figpea` is Figpea's versioned, JSON-serializable command surface for agents. It is available only when the editor URL carries `?agent=1`; every method returns `{ ok, value }` or `{ ok, code, message }` and never throws across the boundary.

Start with `await figpea.describe()` to discover the live surface before calling anything else.

This file carries no reference body on purpose: a copy frozen here would be wrong between editor releases. The body named below is generated by the editor's own build and served fresh from there, so it always matches the editor you are driving — and nothing here needs re-pinning when the API changes.

The authoritative body is `GET https://editor.figpea.com/agent/skill.md` — the live artifact, always current. Three ways to get it:

- in the runtime: `await figpea.SKILL()` (or `figpea.SKILL("authoring-loop")` for one section)
- over MCP: the `figpea_skill` tool
- over HTTP: `curl https://editor.figpea.com/agent/skill.md`