decisions
Skill này làm gì
Skill này giải thích cách dùng một trợ giúp quyết định trong ứng dụng Agent-Native để gắn nhãn hoặc chấm điểm một tin nhắn hay đầu vào. Trợ giúp trả về một câu trả lời và không bao giờ thực hiện hành động đi kèm. Skill dành cho lập trình viên thêm định tuyến thông minh hoặc phân loại vào ứng dụng.
Khi nào nên dùng
- ✓Khi bạn cần quyết định một tin nhắn có phải là yêu cầu thuộc loại nhất định không.
- ✓Khi bạn muốn chấm điểm một đầu vào theo các mức được sắp thứ tự.
- ✓Khi bạn cần chọn một giá trị từ một tập lựa chọn có tên.
Liên kết skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/decisions/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ể kiểm tra các tin nhắn khách hàng đến và cho tôi biết tin nào là yêu cầu hủy không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Lập trình viên truyền đầu vào và các câu hỏi có tên cho trợ giúp. Trợ giúp trả về một kết quả có nhãn, và ứng dụng quyết định sẽ làm gì với nó.
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.
Decisions
Rule
Use decide() to classify or score supplied inputs. It returns a result and
never performs, authorizes, or replaces the action selected from that result.
How
Pass an explicit ownerEmail, an input string or array of parts, and named
questions to decide() from @agent-native/core/decisions:
import { decide } from "@agent-native/core/decisions";
const result = await decide({
ownerEmail: "owner@example.com",
input: [{ type: "text", text: "Please cancel Friday's lunch reservation." }],
questions: [
{
type: "predicate",
name: "isCancellationRequest",
instructions: "Does the message ask to cancel a reservation?",
},
],
});
input can be a plain string or contain text, structured JSON, or an image URL.
Questions are named and use one of these shapes:
| Type | Fields | Use |
|---|---|---|
predicate |
name, instructions |
Evaluate one stated predicate |
choice |
name, instructions, choices: { value: string, description: string }[] |
Choose among the supplied string values |
score |
name, instructions, levels: { label: string, description: string }[] |
Score against 2–10 ordered levels |
Provider and model capabilities can differ. Treat question support as
capability-aware. Only claim a provider/model supports a question type after
that combination has been verified. An ok result includes provider, model, and answers keyed by question name;
cached and usage are optional. A not_configured result includes the
missing_credentials reason and configured provider list. A failed result has
a typed reason and may include provider and questionNames. Handle these
statuses as distinct outcomes; never turn a failure into an answer.
Provider routing and caches
Provider order is configurable per workspace. New customer workspaces try
Builder Jev first, then a personal Jev key, then OpenAI. Within Jev, the
Builder gateway is tried before falling back to a direct key. If no provider
is configured, decide() returns not_configured.
getDecisionsStatus() reports credential readiness separately from provider
capabilities. The Builder Jev proxy is verified for predicate and choice.
Jev score remains unverified and disabled by its capability flag, so
decide() skips Jev for score questions and continues to the next configured
provider. A Jev-only score request returns failed with
unverified_capability. The OpenAI Decisions API supports scores with 2–10
ordered levels; its request and response mapping is covered by documented
fixtures.
Key any per-provider threshold or cache by both provider and model. cacheKey
enables caching only when supplied. Cache identity includes the owner,
organization, provider, model, cache key, input, and questions. The in-memory
cache has a 60-second TTL and a 256-entry cap.
Related skills
- actions — keep action behavior focused and deterministic.
Câu hỏi thường gặp
Trợ giúp có hủy hoặc thay đổi gì không?
Không. Nó chỉ trả về kết quả và không thực hiện hay cho phép hành động nào.
Nó có thể hỏi những loại câu hỏi nào?
Nó hỗ trợ các vị ngữ có/không, lựa chọn giữa các giá trị có tên và điểm trên hai đến mười mức.
Mọi mô hình có hỗ trợ mọi loại câu hỏi không?
Skill nói khả năng hỗ trợ khác nhau theo nhà cung cấp và mô hình, nên mỗi tổ hợp phải được kiểm tra trước khi dùng.
Chi tiết
Mô tả gốc của tác giả
How to use `@agent-native/core/decisions` for capability-aware classification and scoring. Use when implementing or reviewing decision evaluation, provider ordering, per-provider thresholds, or decision-result caches.
repo: BuilderIO/agent-native
Độ phổ biến
- Sao GitHub
- 7.6k
- Vị trí xếp hạng
- #13153
- 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.