--- name: appscreendesign-agent description: Create, recreate and revise editable AppScreenDesign App Store screenshot projects from briefs, source screenshots or visual references through the AppScreenDesign REST API, SDK or MCP. Use when the task involves AppScreenDesign projects, templates, panels, editable layers, previews or exports. metadata: short-description: Build editable AppScreenDesign projects with MCP --- # AppScreenDesign Agent Use AppScreenDesign as an editable scene API. Choose transport based on what the agent has: - **REST API or SDK:** preferred when agent has `APPSCREENDESIGN_API_URL` and `APPSCREENDESIGN_API_KEY`. Read [REST API](references/rest-api.md), call documented `/v1/*` endpoints with `Authorization: Bearer`, and author complete `SceneDoc` objects. - **MCP:** preferred when host already exposes AppScreenDesign tools or when tool discovery and structured tool schemas are useful. MCP is an adapter over the same project, scene and render API; local stdio uses an API key and remote `/mcp` uses OAuth. API key authenticates requests. It does not itself teach an agent the design workflow. This skill supplies that workflow; REST endpoint schemas live in [REST API](references/rest-api.md), SDK contracts in `packages/sdk`, and MCP tool schemas in `apps/mcp/src/server.ts`. Do not upload a flattened reference or bypass editable scenes. Read only references needed for current task: - [Connection and tool map](references/tool-map.md) for MCP setup, discovery and permissions. - [REST API](references/rest-api.md) for API-key authentication, endpoint mapping and direct scene editing. - [Authoring and scene schema](references/scene-authoring.md) for editable layers and scene JSON. - [Task workflows](references/workflows.md) for template, reference, source capture and localization choices. - [Validation and recovery](references/validation.md) before previewing, exporting or handling errors. ## Routing Classify user inputs before mutating state: 1. **Visual reference only:** reproduce composition as editable layers. Do not upload reference or crops derived from it unless user explicitly requests that use. Use shapes, text, elements, devices and user-authorized artwork/captures. 2. **App screenshots supplied:** upload actual captures with REST `POST /v1/projects/:id/assets`, SDK `uploadAsset`, or MCP `upload_screenshot` / `upload_asset`, then bind them to device or image layers. Keep decorative composition editable. 3. **Existing project:** read it with `get_project`, `get_project_inputs` or `get_panel`, preserve scene metadata, then apply guarded edits. 4. **Template comparison:** use REST candidate routes/SDK comparison methods or MCP `compare_templates`, `get_candidates`, `preview_candidates` and `apply_candidate`. Comparison images are review artifacts, not final exports. 5. **Localization:** use REST localization routes/SDK methods or MCP localization tools and `locale` on each applicable read, write, upload, preview and export. Never overwrite another locale by omitting its locale. ## Required lifecycle 1. Authenticate and inspect access with REST `GET /v1/auth/me` or MCP `get_access`; never print the key. 2. Discover output requirements with REST `GET /v1/families` or MCP `list_families`. Discover templates with REST `GET /v1/templates?family=...` or MCP `list_templates`, inspect complete multi-panel template sequences with REST `GET /v1/templates/:id?family=...&panelIndex=...`, and inspect required inputs with REST `GET /v1/templates/:id/inputs?family=...` or MCP `get_template_inputs`. Discover typography, stickers, bundled artwork, and 3D/text controls via REST `GET /v1/fonts`, `GET /v1/elements`, `GET /v1/artwork`, `GET /v1/controls/text`, `GET /v1/controls/3d` (or MCP `list_fonts`, `list_elements`, `list_artwork`, `get_text_controls`, `get_3d_controls`). 3. Create or select project. Use REST `POST /v1/projects` or MCP `create_project` (or delete obsolete projects with `DELETE /v1/projects/:id` / MCP `delete_project`, and refresh pinned templates with `POST /v1/projects/:id/templates/refresh` / MCP `refresh_templates`). Use `blank-canvas` for custom layered composition; use ready template when it already expresses requested structure. 4. Establish ordered panels with REST `PUT /v1/projects/:id/panels` or MCP `set_panels`. MCP `organize_panels` handles `move`, `duplicate`, `delete`, `detach`, `connect` and `reconnect`; REST callers can also connect adjacent panels into panoramic spans with `POST /v1/projects/:id/panels/connect` or span an image across adjacent panels with `PUT /v1/projects/:id/shared-image`. Manage project assets with `GET /v1/projects/:id/assets` (`list_assets`) and `DELETE /v1/projects/:id/assets/:key` (`delete_asset`). A panel can be designed with `asset_key: null`. 5. Read each target scene with REST `GET /v1/projects/:id/panels/:position/scene` or MCP `get_panel`. Preserve `version`, `canvas`, `family`, `background`, `backgroundLayers`, `panorama`, `studio` and existing layer IDs unless task explicitly changes them. 6. Author complete scenes with REST `PUT /v1/projects/:id/panels/:position/scene` or MCP `save_panel`. Focused MCP helpers (`set_layer`, `transform_layers`, `set_background`, `set_background_layers`, `set_studio`, `set_copy`, `format_text_range`) map to REST scene/project writes; use the equivalent endpoint described in [REST API](references/rest-api.md) when MCP is unavailable. 7. Preview every panel with REST `POST /v1/projects/:id/panels/:position/preview` or MCP `preview_panel`. Fix missing images, missing copy, clipping, overlap warnings, unreadable contrast and unsafe text before export. 8. If delivery/export is requested, export with REST `POST /v1/projects/:id/render` or MCP `export_project`, using `reuse: true` and latest revision. Poll REST `GET /v1/renders/:id` or MCP `get_render`, inspect every panel using the authenticated panel route or MCP `preview_render`, then provide ZIP URL or final project link. ## Invariants - Use latest `revision` from REST project/scene responses, SDK responses, `get_project`, `get_panel` or previous mutation. REST `PATCH /v1/projects/:id`, `PUT /v1/projects/:id/panels` and `PUT /v1/projects/:id/panels/:position/scene` require `expectedRevision`. MCP focused tools may read and guard it internally. Stale writes require rereading and reconciling. - Use normalized canvas geometry for `box`: `x`, `y`, `width`, `height`. Ordinary boxes use `0..1`; layer boxes may bleed within schema bounds. Keep image source crops bounded to `0..1`. - Layer order is paint order: earlier layers are behind later layers. Build from background to frame, device/artwork, accents and text. - Keep layer IDs stable and unique. Use readable IDs such as `background`, `device-main`, `headline`, `subtitle`, `badge`, `separator`; never identify a layer by array index after edits. - Keep copy placeholders such as `{{caption.1}}` when localization or template copy should remain editable. REST `PATCH /v1/projects/:id` or MCP `set_copy` updates project copy; REST scene writes or MCP `set_layer` / `format_text_range` edit literal layer text. - Do not invent ratings, awards, product claims, testimonials, app features or source screenshots. Use verified user copy and supplied assets. If reference omits or crops content, state fidelity limit and build visible structure. - Never expose API keys, OAuth tokens, upload tickets or credential-bearing URLs in chat, logs or project text. - Treat successful save with preview error as saved. Inspect with `preview_panel` using returned revision instead of repeating mutation. ## Completion standard For a requested screenshot set, work is complete when project is saved, each requested panel has an editable scene and previews have been inspected. When final export is requested, export validation must pass and render must reach `done`. Report project ID/link, device family, locale, panel count, render ID/ZIP when applicable, and remaining fidelity limitations.