composable-mini-apps
Skill này làm gì
Skill này hướng dẫn thiết kế các ứng dụng nhỏ trong một workspace dùng chung, mỗi ứng dụng có một nhiệm vụ rõ ràng. Nó giải thích khi nào một ứng dụng nên gọi ứng dụng ngang hàng và khi nào nên dùng action riêng. Skill dành cho người xây dựng các ứng dụng workspace theo module.
Khi nào nên dùng
- ✓Khi bạn quyết định một tính năng nên là một ứng dụng nhỏ mới hay là một phần của ứng dụng hiện có.
- ✓Khi một tác vụ có thể cần dữ liệu hoặc khả năng thuộc về ứng dụng khác trong workspace.
- ✓Khi hai quy trình dùng chung một hàm trợ giúp và bạn cần quyết định nó nên đặt ở đâu.
Liên kết skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/composable-mini-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
“Tính năng nhắc nhở hóa đơn nên là một ứng dụng nhỏ riêng trong workspace của tôi, hay là một phần của ứng dụng thanh toán?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent giao cho mỗi ứng dụng một nhiệm vụ với tên action và thông tin xác thực riêng. Nó chỉ gọi một ứng dụng khác khi người dùng yêu cầu hoặc tác vụ cần thứ mà chỉ ứng dụng đó cung cấp.
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.
Composable Mini-Apps
Rule
Prefer many one-job apps in a workspace over one oversized app. A headless app can own a provider, dataset, workflow, or specialist action surface without a full UI. This architecture does not make every task a cross-app task: use the current app's actions by default. Call a peer only when the user asks or the outcome requires data, credentials, or a capability only that peer can provide. A peer's availability or ability to enrich the result is not enough. The app that owns an artifact remains responsible for authoring and editing it.
Shape
- Give each mini-app one clear job, a concise
package.jsondescription, and action names that describe the job it owns. - Keep provider credentials and upstream API details in the app that owns that provider or workflow. When a task needs its peer-exclusive data, credentials, or capability, delegate that bounded work instead of copying integration code.
- Use a tiny status/config screen only when users need to inspect state. A pure headless app is fine when its job is invoked by agents, automations, or sibling apps.
- If two workflows only share a helper, put the helper in
packages/shared; keep the workflow actions in separate apps.
Discovery And Invocation
The main agent should discover available siblings before assuming capability:
- Runtime agents receive an
<available-apps>block built fromdiscoverAgents(). Workspace siblings are layered in bydiscoverWorkspaceAgents(). It carries one line per app — enough to know a sibling exists, not enough to know what it can do. - Use the built-in
describe-workspace-appstool for actual capability. It reads each peer's live/.well-known/agent-card.jsonand returns its purpose plus any optional stable machine contracts; passapp: "<id>"for one peer's full description. Use it only when the requested outcome depends on peer-exclusive data or capability and you cannot tell which peer owns it or whether a known peer can provide it, or when the user asks which app can do the job. - Never hand-maintain a markdown or code list of what each workspace app does.
A stale catalog is worse than none: it reads as authoritative while pointing
at capabilities that moved or vanished. An app's purpose belongs in its own
package.jsondescription(which flows into the workspace manifest and the<available-apps>block), and its capabilities belong in its exposed actions — both of whichdescribe-workspace-appsreads live. - UI shells, headless surfaces, and scripts can read the same registry through
GET /_agent-native/agents?selfAppId=<app-id>. - Code or CLI callers should use the first-class message-based A2A invocation
path (
invokeAgent()/agent-native invoke) when they need to ask an app by id, name, or URL. - In the agent loop, use
call-agentwith the sibling app id only when the requested outcome depends on peer-exclusive data or capability, or the user explicitly asks you to involve that app. A sibling's availability or ability to enrich the result is not enough. Never call the current app throughcall-agent; use local actions instead. - Send a natural-language objective by default so the sibling can apply its own
instructions, skills, schemas, data dictionary, credentials, and tools.
invokeAgentAction()orcall-agentwithaction+inputis only for an explicit stable semantic read contract whose complete input is already known. Never expose or call an implementation action as a workaround for slow or failed message delegation.
Send narrow prompts to siblings: name the exact question, relevant ids, date ranges, and expected output shape. Preserve returned ids and URLs verbatim.
Artifact Handoff
Mini-apps should hand off compact artifacts, not giant pasted transcripts or provider dumps. When a mini-app creates something another app may use, return or store an artifact with:
artifactType- what kind of output this is, such asdeal-set,call-evidence,brief,dashboard, orreport.artifactId- the stable app-owned id, file path, or resource id.createdAt- an ISO timestamp.source- provider/app/source ids used to create it.summary- a short human-readable explanation.itemsorrecords- the bounded structured data downstream apps need.links- fully qualified URLs for user-visible artifacts.
Downstream apps should receive artifact ids, URLs, and narrow foll
Câu hỏi thường gặp
Mọi tác vụ có cần gọi chéo ứng dụng không?
Không. Skill nói mặc định dùng action của ứng dụng hiện tại.
Hàm trợ giúp dùng chung nên để ở đâu?
Skill gợi ý một thư mục packages dùng chung cho các hàm trợ giúp mà nhiều ứng dụng cùng dùng.
Một ứng dụng có thể không có giao diện không?
Có. Ứng dụng headless có thể chạy một công việc cho agent hoặc các ứng dụng khác mà không có màn hình riêng.
Chi tiết
Mô tả gốc của tác giả
Build focused workspace apps and cross-app workflows, using A2A only when a task needs a peer-owned capability. Use when designing mini-app boundaries.
repo: BuilderIO/agent-native
Độ phổ biến
- Sao GitHub
- 7.6k
- Vị trí xếp hạng
- #13147
- 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ự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.