decisions
ما الذي تفعله
تشرح هذه المهارة كيفية استخدام مساعد القرار في تطبيقات Agent-Native لتصنيف رسالة أو مدخل أو تقييمه. يعيد المساعد إجابة ولا ينفذ الإجراء الذي يليها أبداً. وهي مخصصة للمطورين الذين يضيفون توجيهاً ذكياً أو فرزاً إلى التطبيق.
متى تستخدمها
- ✓عندما تحتاج إلى قرار هل الرسالة طلب من نوع معين.
- ✓عندما تريد تقييم مدخل وفق مستويات مرتبة.
- ✓عندما تحتاج إلى اختيار قيمة واحدة من مجموعة خيارات مسماة.
رابط المهارة
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/decisions/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك فحص رسائل العملاء الواردة، وإخباري أيها طلبات إلغاء؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يمرر المطور المدخل والأسئلة المسماة إلى المساعد. يعيد المساعد نتيجة مصنفة، ويقرر التطبيق ما يفعله بها.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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.
الأسئلة الشائعة
هل يلغي المساعد أو يغير أي شيء؟
لا. يعيد نتيجة فقط، ولا ينفذ أي إجراء ولا يفوضه.
أي أنواع من الأسئلة يستطيع طرحها؟
يدعم أسئلة نعم أو لا، والاختيار بين قيم مسماة، والتقييم بين مستويين وعشرة مستويات.
هل تدعم كل النماذج كل أنواع الأسئلة؟
تنص المهارة على أن الدعم يختلف بحسب المزوّد والنموذج، لذلك يجب التحقق من كل مزيج قبل استخدامه.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 7.6k
- الترتيب
- #13153
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
design-exploration
7.6kيساعد وكيلك على استكشاف عدة اتجاهات تصميم لواجهة المستخدم جنباً إلى جنب، ثم تختار أنت واحداً، ويحسّن الوكيل التصميم المختار.
visual-edit
7.6kيساعد وكيلك على فتح تطبيق محلي يعمل في محرر مرئي، لتراجع شاشاته الحقيقية وتحررها معاً.
turn-into-app
7.6kيحوّل سير عمل أو جدول بيانات أو مشروعاً إلى تطبيق مرئي مصقول، فيه شاشات مملوءة بالبيانات ووكيل يعمل خلف أدوات التحكم.
visual-plan
7.6kيحوّل خطة نصية عادية إلى خطة مرئية تفاعلية فيها مخططات وخرائط ملفات ومقتطفات كود وأسئلة مفتوحة.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.