filesystem-context
ما الذي تفعله
يساعد هذا النظام الذكاء الاصطناعي على إدارة المعلومات المهمة دون أن يثقل ذاكرته القصيرة المدى. يحفظ البيانات في ملفات ليصل إليها الذكاء الاصطناعي عند الحاجة، بدلًا من محاولة تذكر كل شيء دفعة واحدة.
متى تستخدمها
- ✓عندما يتلقى الذكاء الاصطناعي معلومات كثيرة دفعة واحدة.
- ✓عندما يحتاج الذكاء الاصطناعي إلى تذكّر شيء مهم لفترة طويلة.
- ✓عندما تحتاج أجزاء مختلفة من الذكاء الاصطناعي إلى مشاركة المعلومات.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/filesystem-context/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“احفظ نتائج هذا البحث في ملف حتى أرجع إليها لاحقًا.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يكتب الذكاء الاصطناعي المعلومات المهمة في ملفات. وعندما يحتاج إليها مرة أخرى، يبحث عن الجزء الضروري فقط ويقرأه، بدلًا من تحميل كل شيء في ذاكرته.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Filesystem-Based Context Engineering
The filesystem provides a single interface through which agents can flexibly store, retrieve, and update an effectively unlimited amount of context. This pattern addresses the fundamental constraint that context windows are limited while tasks often require more information than fits in a single window.
The core insight is that files enable dynamic context discovery: agents pull relevant context on demand rather than carrying everything in the context window. This contrasts with static context, which is always included regardless of relevance.
When to Use
Activate this skill when:
- Tool outputs are bloating the context window
- Agents need to persist state across long trajectories
- Sub-agents must share information without direct message passing
- Tasks require more context than fits in the window
- Building agents that learn and update their own instructions
- Implementing scratch pads for intermediate results
- Terminal outputs or logs need to be accessible to agents
Core Concepts
Context engineering can fail in four predictable ways. First, when the context an agent needs is not in the total available context. Second, when retrieved context fails to encapsulate needed context. Third, when retrieved context far exceeds needed context, wasting tokens and degrading performance. Fourth, when agents cannot discover niche information buried in many files.
The filesystem addresses these failures by providing a persistent layer where agents write once and read selectively, offloading bulk content while preserving the ability to retrieve specific information through search tools.
Detailed Topics
The Static vs Dynamic Context Trade-off
Static Context Static context is always included in the prompt: system instructions, tool definitions, and critical rules. Static context consumes tokens regardless of task relevance. As agents accumulate more capabilities (tools, skills, instructions), static context grows and crowds out space for dynamic information.
Dynamic Context Discovery Dynamic context is loaded on-demand when relevant to the current task. The agent receives minimal static pointers (names, descriptions, file paths) and uses search tools to load full content when needed.
Dynamic discovery is more token-efficient because only necessary data enters the context window. It can also improve response quality by reducing potentially confusing or contradictory information.
The trade-off: dynamic discovery requires the model to correctly identify when to load additional context. This works well with current frontier models but may fail with less capable models that do not recognize when they need more information.
Pattern 1: Filesystem as Scratch Pad
The Problem Tool calls can return massive outputs. A web search may return 10k tokens of raw content. A database query may return hundreds of rows. If this content enters the message history, it remains for the entire conversation, inflating token costs and potentially degrading attention to more relevant information.
The Solution Write large tool outputs to files instead of returning them directly to the context. The agent then uses targeted retrieval (grep, line-specific reads) to extract only the relevant portions.
Implementation
def handle_tool_output(output: str, threshold: int = 2000) -> str:
if len(output) < threshold:
return output
# Write to scratch pad
file_path = f"scratch/{tool_name}_{timestamp}.txt"
write_file(file_path, output)
# Return reference instead of content
key_summary = extract_summary(output, max_tokens=200)
return f"[Output written to {file_path}. Summary: {key_summary}]"
The agent can then use grep to search for specific patterns or read_file with line ranges to retrieve targeted sections.
Benefits
- Reduces token accumulation over long conversations
- Preserves full output for later reference
- Enables targeted retrieval instead of carrying everything
Pattern 2: Plan Persistence
The Problem Long-horizon tasks require agents to make plans and follow them. But as conversations extend, plans can fall out of attention or be lost to summarization. The agent loses track of what it was supposed to do.
The Solution
…
الأسئلة الشائعة
لماذا لا أعطي الذكاء الاصطناعي كل المعلومات دفعة واحدة؟
للذكاء الاصطناعي «ذاكرة قصيرة المدى» محدودة (تُسمى نافذة السياق). وإذا أعطيته معلومات كثيرة، فقد ينسى أهمها أو يرتبك.
كيف يعرف الذكاء الاصطناعي المعلومات المهمة التي يجب حفظها؟
دُرّب على تحديد المعلومات التي تبدو حاسمة للمهمة الحالية أو قد تكون مفيدة لاحقًا، ثم يقرر حفظها في ملفات.
هل هذا مثل «دفتر ملاحظات» للذكاء الاصطناعي؟
نعم، إلى حد كبير. يستخدم الذكاء الاصطناعي الملفات كدفتر ملاحظات أو خزانة حفظ لتخزين المعلومات المهمة واسترجاعها عند الحاجة.
التفاصيل
الوصف الأصلي من المؤلف
Use for file-based context management, dynamic context discovery, and reducing context window bloat. Offload context to files for just-in-time loading.
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #4614
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
technical-documentation
394kيساعد وكيلك على كتابة الوثائق التقنية ومراجعتها، وملفات التعليمات الخاصة بالوكلاء، لتكون سهلة المتابعة للناس وأدوات الذكاء الاصطناعي.
architecture-decision-records
280kيساعد وكيلك على تسجيل قرارات بنية المشروع المهمة، فيفهم سبب كل اختيار ويحتفظ بتاريخ واضح للتغييرات.
code-tour
280kيتيح لوكيلك إنشاء جولات شيفرة خطوة بخطوة مع مراجع دقيقة للملفات والأسطر، ويفيد للتعريف بالمشروع والشرح والمراجعة.