design-mobile-apps

作者: designed-by-ai

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

npx skills add https://github.com/designed-by-ai/skills --skill design-mobile-apps

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 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 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 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. This table is enough to pick an endpoint; read the reference when you need a contract detail it doesn't carry.


Error Shapes

{
  "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 for replay versus a new attempt after either recoverable failure.

相關技能

azure-resource-visualizer
microsoft
將 Azure 資源群組轉換為詳細的架構圖,顯示資源關係與配置。探索資源群組內的所有資源,並分析其配置、相依性與相互連接。生成按邏輯層(網路、運算、資料、安全性、監控)組織的 Mermaid 圖表,包含 SKU 詳細資訊與連接標籤。映射跨網路連接、資料流、身分綁定與配置相依性等關係。
devopsdesigndevelopment
expo-native-ui
expo
框架(開源)。打造美觀、具原生感的 Expo 畫面。涵蓋 Apple HIG 樣式、語意色彩、原生控制項、SF Symbols、媒體、動畫、視覺效果、漸層、儲存與響應式佈局。路由與導航請使用 expo-router 技能。
designdevelopment
expo-router
expo
框架(開源)。Expo Router 的導航與路由。涵蓋基於檔案的路由、群組與動態路由、資料夾組織、帶有預覽與上下文選單的連結、原生堆疊、頁面標題、模態視窗與表單頁面、原生標籤、標題與工具列,以及標題搜尋列。
apidesigndevelopment
expo-ui
expo
框架(開源)。使用 @expo/ui 套件建構原生 UI:在 iOS 上使用真正的 SwiftUI,在 Android 上使用 Jetpack Compose,並從 React 在 Expo 或 React Native 應用程式中渲染。涵蓋通用跨平台元件(從 @expo/ui 匯入的 Host、Column、Row、Button、Text、List 等)、熱門 React Native 社群函式庫的替代方案(BottomSheet、DateTimePicker、Slider、Menu 等),以及平台專屬的 SwiftUI(@expo/ui/swift-ui,僅限 iOS)和 Jetpack Compose...
designdevelopment
ui-sdk
vercel
Builds interfaces with ui-sdk in React, Vue, Svelte, Solid or web components. Covers choosing and composing its components, building a component or behavior it doesn't ship from @ui-sdk/core (like a stepper, splitter, transfer list or emoji picker), making the interface usable by agents through createAgent, agent tools and WebMCP, and testing keyboard, focus, ARIA, server rendering and right to left, including writing tests for an existing component. Use whenever a project has @ui-sdk/*...
testingdesigndevelopment
Web Interface Guidelines
Vercel
審查UI程式碼是否符合Web介面指南。當被要求「審查我的UI」、「檢查無障礙性」、「審計設計」、「審查UX」或「檢查我的網站是否符合最佳實踐」時使用。
designdevelopment
accessibility-engineering
addyosmani
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
developmenttestingdesign
animate-expo
emilkowalski
在 React Native 和 Expo 中製作動畫,依照決定動畫是否自然的順序做出選擇——是否要動畫、在哪個執行緒執行、使用哪些屬性、採用彈簧還是定時動畫、手勢如何交接,以及如何降級。使用 Reanimated、Gesture Handler、Expo Router 和 expo-haptics 撰寫實作。適用於在 Expo app 中製作任何動畫、加入手勢、底部面板、畫面轉場、按壓回饋或觸覺回饋,或修復裝置上卡頓的動態效果。適用於……
developmentdesign