context-fundamentals
ما الذي تفعله
يشرح هذا الدليل كيف يتذكر الذكاء الاصطناعي المعلومات التي تعطيها له ويستخدمها. ويوضح كيفية تنظيم هذه المعلومات ليعمل الذكاء الاصطناعي بشكل أفضل.
متى تستخدمها
- ✓عندما أُنشئ مساعدًا جديدًا بالذكاء الاصطناعي.
- ✓عندما لا يتصرف الذكاء الاصطناعي كما هو متوقع.
- ✓عندما أريد توفير «المال» (الرموز) وجعل الذكاء الاصطناعي أسرع.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-fundamentals/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“كيف أنظم التعليمات للذكاء الاصطناعي حتى يفهم ما عليه فعله بشكل أفضل؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يستخدم الذكاء الاصطناعي «مساحة عمل» (سياقًا) تشمل تعليماتك وسجل المحادثة والأدوات التي يستطيع استخدامها. وتنظيم هذه المساحة جيدًا يساعده على التركيز على ما هو مهم.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Context Engineering Fundamentals
Context is the complete state available to a language model at inference time. It includes everything the model can attend to when generating responses: system instructions, tool definitions, retrieved documents, message history, and tool outputs. Understanding context fundamentals is prerequisite to effective context engineering.
When to Use
Activate this skill when:
- Designing new agent systems or modifying existing architectures
- Debugging unexpected agent behavior that may relate to context
- Optimizing context usage to reduce token costs or improve performance
- Onboarding new team members to context engineering concepts
- Reviewing context-related design decisions
Core Concepts
Context comprises several distinct components, each with different characteristics and constraints. The attention mechanism creates a finite budget that constrains effective context usage. Progressive disclosure manages this constraint by loading information only as needed. The engineering discipline is curating the smallest high-signal token set that achieves desired outcomes.
Detailed Topics
The Anatomy of Context
System Prompts System prompts establish the agent's core identity, constraints, and behavioral guidelines. They are loaded once at session start and typically persist throughout the conversation. System prompts should be extremely clear and use simple, direct language at the right altitude for the agent.
The right altitude balances two failure modes. At one extreme, engineers hardcode complex brittle logic that creates fragility and maintenance burden. At the other extreme, engineers provide vague high-level guidance that fails to give concrete signals for desired outputs or falsely assumes shared context. The optimal altitude strikes a balance: specific enough to guide behavior effectively, yet flexible enough to provide strong heuristics.
Organize prompts into distinct sections using XML tagging or Markdown headers to delineate background information, instructions, tool guidance, and output description. The exact formatting matters less as models become more capable, but structural clarity remains valuable.
Tool Definitions Tool definitions specify the actions an agent can take. Each tool includes a name, description, parameters, and return format. Tool definitions live near the front of context after serialization, typically before or after the system prompt.
Tool descriptions collectively steer agent behavior. Poor descriptions force agents to guess; optimized descriptions include usage context, examples, and defaults. The consolidation principle states that if a human engineer cannot definitively say which tool should be used in a given situation, an agent cannot be expected to do better.
Retrieved Documents Retrieved documents provide domain-specific knowledge, reference materials, or task-relevant information. Agents use retrieval augmented generation to pull relevant documents into context at runtime rather than pre-loading all possible information.
The just-in-time approach maintains lightweight identifiers (file paths, stored queries, web links) and uses these references to load data into context dynamically. This mirrors human cognition: we generally do not memorize entire corpuses of information but rather use external organization and indexing systems to retrieve relevant information on demand.
Message History Message history contains the conversation between the user and agent, including previous queries, responses, and reasoning. For long-running tasks, message history can grow to dominate context usage.
Message history serves as scratchpad memory where agents track progress, maintain task state, and preserve reasoning across turns. Effective management of message history is critical for long-horizon task completion.
Tool Outputs Tool outputs are the results of agent actions: file contents, search results, command execution output, API responses, and similar data. Tool outputs comprise the majority of tokens in typical agent trajectories, with research showing observations (tool outputs) can reach 83.9% of total context usage.
Tool outputs consume context whether they are relevant to current decisions or not. This creates pressure for strategies like observation masking, compaction, and selective tool result retention.
Context Windows and Attention Mechanics
The Attention Budget Constraint
…
الأسئلة الشائعة
ما هي «الرموز» (tokens)؟
الرموز أجزاء من الكلمات أو الحروف. يستخدمها الذكاء الاصطناعي لمعالجة المعلومات، وكلما زادت الرموز زادت «تكلفة» تفكير الذكاء الاصطناعي.
ما هي «موجّه النظام» (System Prompt)؟
هي التعليمات الرئيسية التي تخبر الذكاء الاصطناعي من هو وكيف يجب أن يتصرف. تشبه تحديد شخصيته وقواعده الأساسية.
لماذا تنظيم المعلومات مهم؟
تنظيم المعلومات جيدًا يساعد الذكاء الاصطناعي على إيجاد ما يحتاجه بسرعة، ويمنعه من الضياع أو استخدام معلومات غير ذات صلة، فيصبح أكثر كفاءة ودقة.
التفاصيل
الوصف الأصلي من المؤلف
Context is the complete state available to a language model at inference time. It includes everything the model can attend to when generating responses: system instructions, tool definitions, retrieved documents, message history, and tool outputs.
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #4253
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.