npx skills add https://github.com/microsoft/ai-agents-for-beginners --skill local-ai-agents
> مهارة مرافقة لـ الدرس 17 – إنشاء وكلاء ذكاء اصطناعي محليين.
> استخدمها لمساعدة المتعلم في بناء وكيل يستدعي أدوات، ويبحث في
> التوثيق بالكامل على جهازه الخاص — بدون استدلال سحابي. استند على كل
> توصية في محتوى الدرس والدفتر التفاعلي القابل للتشغيل.
قم بتنشيط هذه المهارة عندما يريد المتعلم:
يتنازل نموذج اللغة صغير الحجم (SLM) عن الاتساع مقابل الخصوصية والتكلفة والتشغيل بدون اتصال بالإنترنت. الاستراتيجية الرابحة:
دع الـ SLM ينظم الأمور ودع الأدوات تقوم بالأعمال الثقيلة. النموذج
لا يحتاج إلى *معرفة* قاعدة الشيفرة — يحتاج إلى معرفة متى يستدعي
read_file و search_docs. هذا يلعب على نقاط قوة SLM (قرارات محصورة
مثل اختيار الأدوات) ويتجنب نقاط ضعفها (المعرفة الواسعة، التفكير متعدد الخطوات الطويل).
base_url فقط (واستخدام مفتاح API وهمي محلياً). كما يختار تلقائيًا أفضل بناء (CPU/GPU/NPU) للجهاز.stdio.foundry model run qwen2.5-7b-instruct
foundry service status
from foundry_local import FoundryLocalManager
from openai import OpenAI
manager = FoundryLocalManager("qwen2.5-7b-instruct")
client = OpenAI(base_url=manager.endpoint, api_key=manager.api_key) # عنصر نائب محلي
الحد الأدنى الواقعي حوالي 8 جيجابايت ذاكرة وصول عشوائي؛ تساعد وحدة معالجة الرسومات GPU/NPU لكنها ليست مطلوبة.
وجه المتعلم نحو الدفتر التفاعلي
17-local-agent-foundry-local.ipynb:
search_docs تعيد أفضل الكتل (top-k).stdio؛ حدده إلى دليل مشروع وحقق في مخرجاته.| الحالة | أين يعمل |
|-----------|---------------|
| بيانات حساسة / بدون اتصال | نموذج محلي |
| مهمة بسيطة ومحصورة | نموذج محلي (رخيص، سريع) |
| استدلال معقد متعدد الخطوات على بيانات غير حساسة | نموذج سحابي |
| انقطاع الخدمة السحابية | نموذج محلي (تدهور مرحلي) |
هذا يعكس فكرة توجيه النموذج من الدرس 16، مع محطة العمل كأحد المسارات. فضّل التصاميم التي تعتمد على الرجوع إلى المحلي بحيث يتدهور الوكيل في
الجودة بدلًا من الفشل الكامل.
<!-- CO-OP TRANSLATOR DISCLAIMER START -->
تنويه:
تمت ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي Co-op Translator. بينما نسعى للدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو عدم دقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الرسمي والمعتمد. للمعلومات الهامة، يُنصح بالاستعانة بترجمة بشرية محترفة. نحن غير مسؤولين عن أي سوء فهم أو تفسير ناتج عن استخدام هذه الترجمة.
<!-- CO-OP TRANSLATOR DISCLAIMER END -->
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take microsoft/ai-agents-for-beginners-local-ai-agents from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.