adding-workspace-apps
Skill này làm gì
Skill này giải thích cách thêm một ứng dụng mới vào workspace Agent-Native. Nó giúp quyết định một yêu cầu là tác vụ lặp lại đơn giản hay một ứng dụng riêng có màn hình và dữ liệu riêng. Skill dành cho người xây dựng muốn có ứng dụng mới trong workspace.
Khi nào nên dùng
- ✓Khi ai đó yêu cầu bạn tạo, xây dựng hoặc sinh ra một agent hoặc ứng dụng mới trong workspace.
- ✓Khi một yêu cầu có thể chỉ là một lời nhắc đơn giản hoặc cả một ứng dụng, và bạn cần quyết định cái nào.
- ✓Khi một ứng dụng mới cần thông tin xác thực và bạn cần biết cách cung cấp chúng an toàn.
Liên kết skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/adding-workspace-apps/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể xây dựng một ứng dụng mới trong workspace của tôi để theo dõi việc gia hạn khách hàng, có màn hình riêng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước tiên quyết định yêu cầu là hành vi workspace đơn giản hay một ứng dụng riêng. Một ứng dụng riêng được tạo trong thư mục riêng và gắn vào đường dẫn riêng, mà không thay đổi các ứng dụng hiện có.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Adding Workspace Apps
Classify The Ask First
When a user asks from Dispatch chat or through @agent-native in Slack or
Telegram to create, build, make, scaffold, or generate an "agent", classify
the ask first.
Simple Dispatch-native behavior such as a reminder, digest, monitor, routing
rule, saved instruction, or recurring workflow can stay in Dispatch as a
recurring job/resource/destination. Robust unique products or teammates that
need their own UI, data model, actions, integrations, or domain workflow should
become a separate workspace app under apps/<app-name>, mounted at
/<app-name>.
Where The App Lives
Do not implement a new app by adding a route, page, component, or file to
apps/chat or another existing app unless the user explicitly asks to modify
that existing app.
Vault Access
Dispatch vault access is workspace-wide by default: every saved vault key is available to every workspace app. Only create or request per-app vault grants when Dispatch's vault access setting is switched to manual mode.
When an app needs a provider credential, use the app's scoped secret or
workspace-connection resolver so Dispatch remains the source of truth. Do not
ask a non-admin builder to add a key to local project settings or .env; use
Dispatch's vault request workflow for a missing key and keep the value out of
app code.
Discovery, Links, And The UI Stack
The local workspace gateway discovers apps from
apps/<app-name>/package.json. Production Dispatch images that contain only
.output/ cannot scan those directories: set AGENT_NATIVE_WORKSPACE_APPS_JSON
on the Dispatch service at runtime and the same
VITE_AGENT_NATIVE_WORKSPACE_APPS_JSON while building its client bundle. List
only apps in that workspace, with each deployed path matching its
APP_BASE_PATH and proxy route. Do not reuse another organization's manifest.
Always save a concise, human-readable description in each package manifest;
Dispatch and A2A connected-agent context use the app name plus description so
agents know what it does. Use relative workspace links like /<app-name> and never
hardcode localhost, 127.0.0.1, 8080, 8100, or any dev port in app
cards, instructions, redirects, or navigation; the active workspace
gateway/browser origin owns the port. React Router apps must preserve
APP_BASE_PATH / VITE_APP_BASE_PATH in
app/entry.client.tsx via appBasePath() so the app hydrates correctly when
mounted at /<app-name>. Use the framework/template UI stack for standard UI:
shadcn/ui components and @tabler/icons-react. Do not add lucide-react or
another icon library. Read .agents/skills/shadcn-ui/SKILL.md before adding,
updating, or debugging shadcn components.
App Data Goes Through Actions
Normal app data must flow through actions. For CRUD that the agent can perform,
create defineAction files in actions/, mark reads with
http: { method: "GET" }, and call them from React with useActionQuery /
useActionMutation. Do not add duplicate JSON CRUD routes under /api/* for
the same data unless the route is for uploads, streaming, webhooks, OAuth, or
another route-only concern. Do not add routes whose main job is to wrap,
proxy, or re-export an action; the action endpoint already exists at
/_agent-native/actions/:name. Action-backed UI is what makes agent-created or
agent-edited records appear without a manual refresh.
PostgreSQL Database
App database code targets local PGlite and hosted Postgres. Define schemas with
@agent-native/core/db/schema helpers and write app reads/writes with Drizzle's
PostgreSQL query builder and drizzle-orm operators. Do not import raw schema
drivers in app templates. Keep raw SQL
for additive migrations, health checks, or carefully scoped maintenance. Do not use SQL as object
storage; file bytes belong in upload/private-blob providers with only references
saved to app tables.
Scaffolding
In local development, run
pnpm exec agent-native create <app-name> --template=<template> from the
workspace root. In production, Dispatch posts new-app requests to Builder
branch creation; Builder should still scaffold the separate workspace app. The
workspace dev gateway (pnpm dev) detects new apps/<app-name> directories
automatically.
Scaffolding the directory is not the app being live. Before saying the app is
created, request /<app-name> on the running gateway and confirm it returns
the new app, not a fallback route or another app's shell — then tell
Câu hỏi thường gặp
Khi nào một yêu cầu cần ứng dụng riêng?
Skill nói rằng một sản phẩm có màn hình, dữ liệu và quy trình nghiệp vụ riêng nên trở thành một ứng dụng riêng.
Tôi có thể thay đổi một ứng dụng hiện có thay thế không?
Chỉ khi bạn yêu cầu rõ ràng. Skill nói không thêm trang mới vào ứng dụng hiện có theo mặc định.
Khóa API được xử lý thế nào?
Skill nói dùng quy trình yêu cầu vault của workspace, và không bao giờ đặt giá trị vào mã ứng dụng.
Chi tiết
Mô tả gốc của tác giả
How to add an app to an Agent-Native workspace: classifying an "agent" request, scaffolding `apps/<app-name>`, app discovery and descriptions, mounting and base paths, action-first data, and finishing a chat-template app. Use when asked to create, build, scaffold, or generate a new agent or app in a workspace.
repo: BuilderIO/agent-native
Độ phổ biến
- Sao GitHub
- 7.6k
- Vị trí xếp hạng
- #13131
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
design-exploration
7.6kGiúp agent của bạn khám phá nhiều hướng thiết kế giao diện song song, để bạn chọn một hướng rồi tinh chỉnh thiết kế đã chọn.
visual-edit
7.6kGiúp agent của bạn mở một ứng dụng cục bộ đang chạy trong trình chỉnh sửa trực quan, để bạn xem và sửa các màn hình thật cùng nhau.
turn-into-app
7.6kBiến quy trình, bảng tính hoặc dự án thành ứng dụng trực quan có màn hình đầy đủ dữ liệu, với agent làm việc phía sau các điều khiển.
visual-plan
7.6kBiến một kế hoạch viết bằng văn bản thuần thành kế hoạch trực quan tương tác, có sơ đồ, bản đồ file, đoạn code và các câu hỏi còn mở.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.