شعار Stage Dsl

Stage Dsl

مؤسسةشائع
THU-MAIC
stage-dsl

دليل لقراءة مستند مرحلة OpenMAIC وتحريره باستخدام read_stage وpatch_stage وgrep_stage. حمّله قبل تعديل بنية لم يسبق لك تعديلها، أو عندما يرفض patch_stage عملية، أو كلما لم يكن المسار من مرحلة أو مخطط أو مشهد أو كائن محتوى أو إجراء إلى الحقل الذي تحتاج إليه واضحًا. يوجّهك إلى مراجع على مستوى الحقول للاختبارات القصيرة والعناصر التفاعلية والإجراءات ومشروعات PBL؛ وتظل مهارة slide-dsl المثبّتة الدليل الكامل للوحة الشرائح.

Add to TypingMind

نظرة عامة

الناشرTHU-MAIC
المستودعOpenMAIC
اسم المهارةstage-dsl
النجوم
37.6K
التفريعات
5.9K
الملفات المرفقة
4
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 4

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها THU-MAIC على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Stage Dsl في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/THU-MAIC/OpenMAIC.git /tmp/OpenMAIC
mkdir -p .claude/skills
cp -r /tmp/OpenMAIC/skills/agent-runtime/stage-dsl .claude/skills/stage-dsl
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Stage Dsl في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Stage Dsl تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Stage Dsl بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

The stage document map

This is a map, not the field manual.

Use it to decide which subtree owns a value, which path to read, and which reference chapter to load. Then read the exact source before writing.

The document model

The durable structure is:

text
stage
├── outline
└── scenes[]                    ordered by scene.order, shown as pages 1..N
    ├── id                     stable scene identity
    ├── order                  1-based page position
    ├── type                   slide | quiz | interactive | pbl
    ├── content                shape selected by scene.type
    │   ├── slide.canvas
    │   ├── quiz.questions[]
    │   ├── interactive.html / widgetConfig
    │   └── pbl.projectV2
    └── actions[]              ordered playback verbs

stage is the stage's metadata. outline is the generation plan. A persisted page is a scene. Its type and content.type must agree.

The three generic tools do not replace page-list operations. Insert, delete, reorder, and retitle pages with edit_deck.

Tool vocabulary

NeedToolHow
Read a sceneread_stage`path:/scenes/<order
Edit scene content or actionspatch_stage`target:/scenes/<order
Search visible text or sourcegrep_stageliteral search over the whole stage
List stages in folderslist_folder_stagesreturns the explicit stageId required by every stage tool
Insert, delete, reorder, or retitle pagesedit_deckpage-list operations stay outside the document patcher
Plan and build a new stageconversation + create_stage + generate_scenesettle the page plan in conversation, then call generate_scene once per page with an explicit brief
Set the classroom castset_rosterwrite the settled roster before page generation

Addressing with read_stage

PathResolves to
"" or omittedthe whole stage
/outlinethe persisted outline snapshot
/scenes/3the scene whose order is 3
/scenes/scene_abcthe scene with that stable id
/scenes/scene-abcthe historical hyphenated scene-id form
/scenes/3/actionsonly scene 3's action array

Orders are 1-based. Array indices inside source JSON are 0-based.

detail:"tree" is the compact structural inventory. It reports scene id, order, type, title, element/question/project counts, and action counts. It is for finding a target, never for reconstructing a write value.

detail:"source" is the exact JSON at the selected path. A scene source is the persisted scene object, so writable pointers begin /content/... or /actions/.... Inline media bytes larger than 2 KiB are replaced in this read projection by a read-only placeholder. The stored document is unchanged.

detail:"text" is the visible-text projection. Use it to find learner-facing copy or prove that old wording no longer remains. It deliberately omits known internal PBL prompts and runtime state.

Source and text responses are character-paged after 12,000 characters. Pass the returned nextOffset back as offset until it disappears.

Writing with patch_stage

target is one scene path: /scenes/<order|sceneId>.

Every call carries a human intent and one or more ops. The ops are atomic: the server applies them to a clone, validates the resulting scene, and writes once. If op 2 fails, op 1 is not persisted.

OpFieldsMeaning
setpath, valuereplace an existing leaf or add an optional object key
removepathdelete an existing object key or splice an array index
str_replacepath, oldText, newText, optional replaceAllreplace one exact occurrence of oldText inside the string field at path; replaceAll:true replaces every occurrence
add_elementelement, optional afterId or indexadd one complete id-less slide element
delete_elementelementIddelete one slide element by stable id

Set/remove/str_replace paths are JSON Pointers rooted at the scene source:

text
/content/canvas/elements/0/content
/content/questions/1/options/0/label
/content/widgetConfig/description
/content/projectV2/milestones/0/title
/actions/2/text

Escape / in an object key as ~1 and ~ as ~0. Array indices are canonical zero-based integers: 0, 1, 2, never 03, -1, or +1.

Every intermediate segment must exist. set may create only the final object key. remove requires the final key or array slot to exist.

For a change inside a large HTML document or long text field, prefer str_replace over rewriting the whole field with set: transcribing 27 KB of HTML to change one number is expensive, and any transcription error silently corrupts the page. Read detail:"source", pick a short unique anchor, replace it, then read back and grep_stage to verify. oldText must appear exactly once in the stored string; on multiple matches extend the anchor or set replaceAll:true. Neither oldText nor newText may contain a read-side media omission placeholder; newText may be empty to delete the anchor.

Scene metadata is not writable here. Paths must begin /content/ or /actions/; use edit_deck for page metadata and page-list changes.

Finding with grep_stage

scope:"text" searches the visible-text projection. scope:"source" searches serialized scene JSON, including field names and internal data.

Search is literal, case-insensitive, and applies NFKC to both query and source. Thus half-width AI finds full-width AI. Result start and end still slice the original, unnormalized scene string correctly.

A call returns at most 10 matches per scene and 30 overall, within its time and character budget. truncated:true always includes an opaque cursor. Repeat the same query, scope, and stage with that cursor to continue.

Read before write

For every edit:

  1. Read the target scene with detail:"source".
  2. Locate the exact field and array index in that source.
  3. Load the matching field-reference chapter below if this structure is new to you or a previous patch was rejected.
  4. Patch the smallest leaf that expresses the intent.
  5. Read the same source path again and verify the stored value.
  6. Use detail:"text" or grep_stage when the check is “no old copy remains.”

Never build a patch from tree; it intentionally omits neighbouring fields.

Never copy a <… bytes omitted: …> media placeholder into a write. Supply a new real URL/src or leave that field untouched.

Route to the field manual

What you need to writeRead this first
Slide canvas, background, theme, any of the ten slide element typesRead the installed slide-dsl skill at the location shown in <available_skills>. It is the complete manual and its examples already use scene-root /content/canvas/... pointers.
Quiz questions, options, answers, grading fieldsreferences/quiz.md
Interactive HTML or typed widget configurationreferences/widget.md
Narration, spotlight, whiteboard, video, discussion, or widget playback actionsreferences/actions.md
PBL projectV2 roles, milestones, microtasks, packaged design, or runtime-owned fieldsreferences/pbl.md

Validation boundary

Slides use the closed slide element schema and reject unknown fields, wrong types, missing required fields, id changes, and element-type changes.

Quiz writes add a closed question/option check around the current document validator. Interactive content is closed at its content root, but historical widgetConfig objects remain intentionally tolerant below that root. PBL is closed at its content root, while the existing projectV2 validator requires its core containers and deliberately tolerates historical runtime extension fields.

That difference matters: “accepted” means the current persisted contract accepted the shape, not that every value is pedagogically sound or every renderer consumes it. The reference chapters name the hard boundary and the known semantic boundary separately.

Hard rules

  • Read source before every patch and read it again afterward.
  • Patch one leaf when one leaf is enough.
  • Use scene-root paths: /content/... and /actions/....
  • For a change inside a large HTML or long text field, use str_replace with a short unique anchor instead of rewriting the whole field.
  • Use add_element and delete_element for slide element identity changes.
  • Do not use patch_stage for page insertion, deletion, reordering, or titles.
  • Do not write media omission placeholders.
  • A rejected atomic batch changed nothing.
  • When uncertain, stop guessing and read the matching reference chapter.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Stage Dsl؟

دليل لقراءة مستند مرحلة OpenMAIC وتحريره باستخدام read_stage وpatch_stage وgrep_stage. حمّله قبل تعديل بنية لم يسبق لك تعديلها، أو عندما يرفض patch_stage عملية، أو كلما لم يكن المسار من مرحلة أو مخطط أو مشهد أو كائن محتوى أو إجراء إلى الحقل الذي تحتاج إليه واضحًا. يوجّهك إلى مراجع على مستوى الحقول للاختبارات القصيرة والعناصر التفاعلية والإجراءات ومشروعات PBL؛ وتظل مهارة slide-dsl المثبّتة الدليل الكامل للوحة الشرائح.

لماذا تستخدم Stage Dsl على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Stage Dsl عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Stage Dsl في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/THU-MAIC/OpenMAIC/tree/main/skills/agent-runtime/stage-dsl. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Stage Dsl؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Stage Dsl؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Stage Dsl معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Stage Dsl مجانية؟

نعم. نشرها THU-MAIC على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇