Design Mobile Apps

作者 designed-by-ai03c20aec6dce無授權條款12 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

AI 產生的概覽

指導透過 Sleek REST API 設計行動應用程式畫面,並以 React Native 或 HTML 實作這些設計。

功能
提供使用 Sleek REST API 建立專案、依需求產生行動應用程式畫面設計,並取得其 HTML 與算繪截圖的說明。也涵蓋以 React Native 或 HTML 實作這些設計,包括版本選擇、原生轉換與驗收檢查。配套參考檔案記錄了設計流程、介面契約,以及 NativeWind、StyleSheet、UniWind 等樣式做法。
適用情境
適用於使用者希望依需求設計行動應用程式畫面,並進一步以程式碼實作的情境。適合將設計產生與 React Native 或 HTML 實作結合的工作流程。
執行需求
需要 SLEEK_API_KEY 環境變數,或透過裝置授權流程取得金鑰,並需要連線至 Sleek API 的網路存取。免費帳戶僅有有限的試用額度,持續使用需要付費方案。此技能不附帶指令碼,僅包含說明與參考文件。

Designing with Sleek

[Design mobile apps in minutes]

Overview

sleek.design provides a REST API at /api/v1/* to create projects, design screens from a brief, and fetch their HTML and renders.

Base URL: https://sleek.design Auth: Authorization: Bearer $SLEEK_API_KEY, except the public device start/poll endpoints Content-Type: send application/json for JSON request bodies. CORS: Enabled on all /api/v1/* endpoints Envelope: check HTTP status first. Successful JSON wraps its payload in data; lists also include sibling pagination. Errors use top-level code, status and message, with optional data.url. Successful screenshots and share cards return image bytes; 204 has no body. Ids: opaque 11-character tokens like V1StGXR8Z5j, with no type prefix. Nothing about an id says whether it names a project, screen, component, version or theme, so track each one by the response field it arrived in. Parsing responses: write the body to a file (curl -o run.json) and parse the file. Piping JSON through echo corrupts it: zsh expands the escaped \n inside string values into real newlines, which makes the body invalid JSON. API docs: OpenAPI spec at https://sleek.design/api/v1/spec.json; browsable docs at https://sleek.design/api/v1/docs. Fetch the spec for any contract detail not covered here.


Designing or implementing

A single run can take both directions — "design me a fitness app and build it in Expo" is a design pass followed by an implementation pass. Gate each pointer on the artefact in front of you rather than on a one-time reading of the request:

Designing — you are about to send a chat message to Sleek. Read designing.md [blocked] first; it carries the create → chat → screenshot loop, how to author a style direction, and when to seed one from a reference instead.

Implementing. Before writing code from a Sleek design, read implementing.md [blocked] for version selection, native conversion, working features, and acceptance checks.

User shot and review shot

Screenshots come in two framings, and each file below asks for one by name:

  • A user shot is the default render: viewport height, phone-shaped. This is the one you show the user.
  • A review shot adds fullHeight: true, one component per request. This is the one you judge your own work against.

Prerequisites: API Key

If SLEEK_API_KEY is not set, use the device flow so the user never handles the raw key:

  1. POST https://sleek.design/api/v1/device/start (no auth) with body {"source": "your-tool-slug"}. The response contains a verificationUrl, a human-checkable userCode, a secret deviceCode, and a poll interval in seconds.
  2. Show the user the verificationUrl and the userCode, and tell them to confirm the code matches before approving.
  3. Poll POST https://sleek.design/api/v1/device/poll with {"deviceCode": "..."} every interval seconds. On pending, keep waiting. On approved, store data.key privately as SLEEK_API_KEY on that first read: the key is handed over once. On expired or 404 NOT_FOUND, start a new flow. See Device: Poll [blocked] for the response contract.

Fallback: send the user to https://sleek.design/agents/setup, which handles sign-in, plan upgrade, and key creation in one place, and ask them to paste the key back to you. Keys can also be managed at https://sleek.design/dashboard/api-keys. The full key value is shown only once at creation, and a free account holds one active key at a time.

Plans: free accounts can try the API with their one-time trial credits (about one design run), so a new user can see their first design before any payment decision. Sustained use requires the Pro plan or higher. This file carries no figures on purpose — read the current price, billing periods and credit allowance from https://sleek.design/agents.md, which is generated from Sleek's live pricing, and quote them from there. When cost becomes relevant (the user asks, an upgrade is needed to continue, or you're about to send them to a payment page), state that pricing plainly, including the yearly option, so the user sees a payment step coming before they reach it.


Quick Reference: All Endpoints

Every endpoint the API exposes:

MethodPathScope
GET/api/v1/projectsprojects:read
POST/api/v1/projectsprojects:write
GET/api/v1/projects/:idprojects:read
DELETE/api/v1/projects/:idprojects:write
GET/api/v1/projects/:id/componentscomponents:read
GET/api/v1/projects/:id/components/:componentIdcomponents:read
GET/api/v1/referencesany valid key
POST/api/v1/projects/:id/chat/messageschats:write
GET/api/v1/projects/:id/chat/runs/:runIdchats:read
POST/api/v1/projects/:id/chat/runs/:runId/cancelchats:write
POST/api/v1/screenshotsscreenshots
POST/api/v1/share-cardsscreenshots
POST/api/v1/device/startpublic, no auth
POST/api/v1/device/pollpublic, no auth

Create a key holding only the scopes the task uses.

Every row above is specified in full — request body, response shape, field defaults, status codes — in endpoints.md [blocked]. This table is enough to pick an endpoint; read the reference when you need a contract detail it doesn't carry.


Error Shapes

json
{  "defined": true,  "code": "FORBIDDEN",  "status": 403,  "message": "...",  "data": { "url": "https://sleek.design/..." }}
HTTPCodeWhen
401UNAUTHORIZEDMissing/invalid/expired API key
403FORBIDDENValid key, wrong scope or plan
404NOT_FOUNDResource doesn't exist
400BAD_REQUESTValidation failure
409CONFLICTAnother run is active for this project
429TOO_MANY_REQUESTSRender cap: 1000 screenshots + share cards per hour per org, counted on API-key requests only
500INTERNAL_SERVER_ERRORServer error

401, 403 and 429 bodies may include data.url: a page where the user can fix the condition (create a key, upgrade the plan). Share it as-is.

Chat run-level errors (inside data.error):

CodeMeaning
out_of_creditsOrganization has no credits left
execution_failedAI execution error
cancelledRun cancelled via the cancel endpoint
request_message_persist_failedThe run failed before reaching the AI; the message was never stored

For out_of_credits, relay error.url and wait for the user to resolve it. Follow Safe retries [blocked] for replay versus a new attempt after either recoverable failure.

來源與署名

來源:designed-by-ai/skills位於skills/design-mobile-apps提交03c20ae

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架