From Design
Open a running local app in Design overview mode as URL-backed iframe screens for visual editing, flow review, duplication, and route-state exploration. Use when the user asks to inspect, compare, or edit a real local app visually in Design.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-native-design:visual-editThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use `/visual-edit` when the user wants to inspect or edit a real local app
Use /visual-edit when the user wants to inspect or edit a real local app
visually instead of generating standalone Alpine HTML. The source of truth is
the running localhost app plus its route URLs. Design shows those routes as
iframe-backed screens on the infinite canvas.
connectionId, routeId, path,
url, bridgeUrl, title, and viewport size./checkout?step=shipping,
/checkout?step=payment, /checkout?step=done, etc.localhost:1234/onboarding/1 means
http://localhost:1234/onboarding/1./visual-edit entry route can open before the viewer signs in. Public
/design/:id editor links can also render read-only public designs without a
session./_agent-native/open deep links.
Do not surface URLs with _session= tokens. Query sessions are only a
fallback after normal cookie resolution, so an existing browser session can
still open the design as a different user and show "Design not found".From the target app repo, make sure its dev server is running, then run:
npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --daemon
Use the app's real port. The command starts a detached local bridge on
http://127.0.0.1:7331 by default, waits for /health, prints the
manifest JSON, and keeps the bridge alive after the agent command exits.
For a manual health/manifest check:
curl http://127.0.0.1:7331/manifest.json
Do not use --json for an editable session. --json, --once, and
--dry-run print the manifest and exit, so Design will fall back to a
non-editable live iframe as soon as it tries to refresh the snapshot.
Prefer the single authenticated open-visual-edit action. It registers or
refreshes the localhost bridge, creates or reuses a Design project, places
URL-backed screens, stores the active visual-edit context, and navigates to
overview mode in one call. This avoids creating a private design under a
synthetic CLI user and then handing the browser a tokenized URL that may be
shadowed by an existing session.
pnpm action open-visual-edit '{
"title": "Docs homepage visual edit",
"devServerUrl": "http://localhost:5173",
"bridgeUrl": "http://127.0.0.1:7331",
"rootPath": "/absolute/path/to/app",
"routeManifest": { "...": "from /manifest.json" },
"paths": ["/", "/pricing", "/checkout?step=payment"]
}'
The action returns designId, connectionId, screens, urlPath, and
openUrl. Keep those IDs in the chat context for follow-ups.
For a numbered flow the user describes in chat, keep the labels and order:
pnpm action open-visual-edit '{
"designId": "<existing-design-id>",
"connectionId": "<existing-connection-id>",
"devServerUrl": "http://localhost:1234",
"routes": [
{ "url": "localhost:1234/onboarding/1", "title": "Screen 1" },
{ "url": "localhost:1234/onboarding/2", "title": "Screen 2" },
{ "url": "localhost:1234/onboarding/3", "title": "Screen 3" }
]
}'
For responsive follow-ups, call open-visual-edit again with the same
designId and connectionId, plus explicit viewport dimensions:
pnpm action open-visual-edit '{
"designId": "<existing-design-id>",
"connectionId": "<existing-connection-id>",
"devServerUrl": "http://localhost:5173",
"paths": ["/"],
"defaultWidth": 390,
"defaultHeight": 844,
"startX": 1600,
"startY": 0
}'
If no routes or paths are supplied, open-visual-edit uses every route
from the localhost manifest.
Fallback, only when open-visual-edit is unavailable:
connect-localhost, passing the
/manifest.json result as routeManifest and capabilities.create-design.add-localhost-screens.navigate.link, deepLink, or MCP App embed returned by Design actions so
the user sees the canvas. In Codex Desktop or VS Code, prefer opening that
Design URL in the available preview/webview panel; otherwise surface the
"Open design" link.openUrl / action link, not a hand-built
/design/:id?_session=... URL.vscode://builder.agent-native/open?url=<encoded-design-url>. Its
Agent Native: Open Design Canvas command also starts the local bridge and
opens hosted Design in the VS Code side panel.add-localhost-screens, confirm the Design editor is in overview mode
with the requested URL-backed frames visible. Do not stop at "screens added"
when the user asked to inspect or edit visually.Keep localhost screens as URL files plus screenMetadata[fileId]. Do not
replace them with copied srcdoc HTML unless the user explicitly asks for a
frozen snapshot. To change a state, rerun add-localhost-screens with the new
path/query or duplicate the screen and update the copy's URL metadata.
list-localhost-connections returns the expected connection and routes.Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Implements work from a spec or tickets using TDD at agreed seams, with regular typechecking and test runs, followed by code review.
npx claudepluginhub vzn-care/agent-native --plugin agent-native-design