شعار Notion Write Math Encoding Guard

Notion Write Math Encoding Guard

المجتمع
Rainy-W-cy
notion-write-math-encoding-guard

Prevent mojibake and formula corruption when creating or updating Notion pages that contain Markdown, LaTeX formulas, vectors/matrices, and mixed Chinese-English text. Use when Notion content includes non-ASCII symbols, math delimiters, previously corrupted escapes, or unstable Notion formula rendering.

نظرة عامة

الناشرRainy-W-cy
المستودعpractical-agent-skills
اسم المهارةnotion-write-math-encoding-guard
النجوم
29
التفريعات
2
الملفات المرفقة
2
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Rainy-W-cy/practical-agent-skills.git /tmp/practical-agent-skills
mkdir -p .claude/skills
cp -r /tmp/practical-agent-skills/skills/notion-write-math-encoding-guard .claude/skills/notion-write-math-encoding-guard
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

يُحمّل النموذج مهارة Notion Write Math Encoding Guard تلقائيًا بمجرد ورود طلب ذي صلة بها.

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

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

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

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

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

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

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

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

Notion Write Math Encoding Guard

Overview

Use this skill when Notion page content must stay readable after upload, especially for formula-heavy technical notes. The goal is not only to prevent mojibake, but also to keep formula presentation stable in Notion preview, fetch output, and later edits.

Workflow

  1. Determine language, math density, and whether the user wants full rewrite or local edits.
  2. Determine content ownership before drafting:
    • user-provided text that must be preserved
    • assistant-authored explanation that may be reformatted
  3. Classify formulas before drafting:
    • plain-text-safe
    • inline-math-needed
    • block-math-needed
  4. Build content in Notion-friendly Markdown with LaTeX-safe formulas and preview-stable layout.
  5. For existing pages, fetch first and decide replace_content vs update_content.
  6. Write to Notion.
  7. Fetch again and validate encoding, delimiters, wording fidelity, and rendering stability.

Authoring Rules

  • If the user gives text to write into Notion, preserve the user's wording and intent by default.
  • Do not autonomously rewrite, polish, summarize, or strengthen the user's wording unless the user explicitly asks for that.
  • You may only normalize formatting, formula delimiters, headings, spacing, list structure, and obvious encoding issues when writing the user's content into Notion.
  • When user wording and Notion preview stability conflict, keep the wording and change only the presentation layer.
  • Prefer block formulas ($$...$$) for complex expressions.
  • Use inline formulas ($...$) only for short symbols that truly need math rendering.
  • Prefer LaTeX commands over decorative Unicode math glyphs.
  • Use canonical forms: \\vec{x}, \\mathbf{x}, \\begin{bmatrix}...\\end{bmatrix}.
  • Keep punctuation in formulas ASCII-only.
  • Keep mixed-language prose outside formula delimiters where possible.
  • Prefer plain text for simple function names and short variables in prose.
  • Do not wrap every symbol in inline math by default.
  • Avoid mixing backticks and math delimiters around the same token.
  • For long-term notes, prefer "few block formulas + mostly plain text" over dense inline math.

Preview-Stable Notion Layout Rules

  • Write for Notion page preview first, not for raw Markdown aesthetics.
  • Avoid layouts that commonly render badly in Notion preview:
    • dense inline formulas inside long Chinese sentences
    • mixed backticks and math delimiters on the same token
    • deeply nested lists containing formulas
    • long multi-clause paragraphs that alternate prose and symbols repeatedly
  • Prefer short paragraphs, flat lists, and separated block formulas.
  • Keep headings concise and aligned with the user's original structure.
  • If the user provides an existing section order, preserve that order unless the user explicitly requests restructuring.
  • Do not add explanatory sections, transition sentences, or editorial comments unless the user asked for them.
  • If a table is likely to misalign or degrade in Notion preview, rewrite it into a flat bullet list only if this does not change the user-requested content structure.
  • When formatting user-provided content, optimize spacing and alignment only to improve Notion readability, never to change meaning.

Formula Style Guide

Use plain text when:

  • Mentioning a function name in prose
  • Describing thresholds or parameter ranges
  • Referring to simple scalars or settings
  • Explaining hardware control flow, FSM names, or module names

Examples:

  • Softmax
  • LayerNorm
  • exp(x)
  • sqrt(a)
  • h <= 4
  • N >= 3
  • a in [0, 2]

Use inline math when:

  • A short symbol would be ambiguous in plain text
  • A sentence needs one compact mathematical token

Examples:

  • $x_i$
  • $\\mu$
  • $\\sigma^2$

Use block math when:

  • The expression contains fractions, roots, summations, matrices, or updates
  • The formula is central to the explanation
  • The same formula may be referenced later

Examples:

$$ \mathrm{Softmax}(x_i) = \frac{e^{x_i}}{\sum_{j=1}^{N} e^{x_j}} $$

$$ x_{n+1} = \frac{1}{2}\left(x_n + \frac{a}{x_n}\right) $$

Notion Write Rules

  • For new pages, create with title in properties and body in content.
  • For existing pages, always fetch before editing.
  • Prefer full replace_content when corruption is widespread.
  • Prefer update_content for small, exact-match edits.
  • Avoid blind global replacements on formula-heavy content.
  • When a page has repeated formula corruption, prefer rebuilding the affected section from clean source text rather than patching escaped fragments in place.
  • If both encoding cleanup and formula-style cleanup are needed, prefer one controlled full rewrite over many small edits.
  • If the user asks to "write this content into Notion", treat the provided content as source-of-truth text.
  • In that case, editing scope is limited to:
    • encoding repair
    • math delimiter stabilization
    • line break and heading normalization
    • preview-safe list and paragraph formatting
  • In that case, do not:
    • rewrite the tone
    • add missing analysis on your own
    • compress or expand the substance
    • silently convert the content into a different style

Wording Fidelity Rules

  • Preserve terminology exactly when it appears intentional, including mixed Chinese-English technical phrases.
  • Preserve emphasis markers, section names, and user-specified ordering unless they directly cause rendering failure.
  • If a phrase is awkward but readable, keep it.
  • If a phrase is unreadable because of corruption, reconstruct the smallest necessary fragment only.
  • When you must repair a corrupted expression, keep the nearest recoverable wording rather than producing a cleaner paraphrase.

Validation Checklist

After writing to Notion, verify all checks:

  • Page fetch returns readable text in the requested language.
  • User-provided wording has not been unintentionally rewritten.
  • No mojibake markers such as ???, replacement bursts, or obviously garbled character runs.
  • Formula delimiters remain balanced.
  • Backslashes in LaTeX commands are preserved.
  • Critical formulas and vector/matrix snippets render in Notion UI.
  • Plain-text function names do not appear wrapped in accidental math delimiters.
  • API fetch noise is distinguished from true corruption:
    • escaped backslashes alone do not prove the page is broken
    • repeated $...$-style fragments or mixed backticks/math usually indicate unstable authoring
  • If API text shows escaped backslashes, verify UI rendering before concluding corruption.
  • Headings, bullets, spacing, and formula blocks remain visually aligned in Notion preview.

Failure Handling

If validation fails:

  1. Rebuild the affected section from clean source text.
  2. Reduce inline formulas; convert complex inline math to block formulas.
  3. Convert non-essential inline math to plain text function or variable notation.
  4. Revert any unnecessary wording changes and keep only formatting repairs.
  5. Re-apply update with exact snippet boundaries.
  6. Fetch again and re-check delimiters, backslashes, wording fidelity, and UI rendering.

Decision Heuristics

  • If the page is mostly readable but a few formulas are ugly, use update_content.
  • If formulas are broadly inconsistent, mixed with escaped fragments, or preview is unstable, use replace_content.
  • If the user wants a long-term notes page, optimize for stability, not for maximal LaTeX density.
  • If a formula-heavy page keeps regressing after edits, simplify the notation style rather than adding more escapes.
  • If the user provides final text for direct write-in, prefer preserving wording over stylistic optimization.
  • If preview stability can be fixed by layout changes alone, do not touch the wording.

Quick Snippets

See references/math-and-vector-snippets.md for safe equation, vector, and matrix templates.

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

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

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

ماذا تفعل مهارة الذكاء الاصطناعي Notion Write Math Encoding Guard؟

Prevent mojibake and formula corruption when creating or updating Notion pages that contain Markdown, LaTeX formulas, vectors/matrices, and mixed Chinese-English text. Use when Notion content includes non-ASCII symbols, math delimiters, previously corrupted escapes, or unstable Notion formula rendering.

لماذا تستخدم Notion Write Math Encoding Guard على TypingMind؟

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

كيف أثبّت Notion Write Math Encoding Guard في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Notion Write Math Encoding Guard؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Notion Write Math Encoding Guard؟

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

هل مهارة الذكاء الاصطناعي Notion Write Math Encoding Guard مجانية؟

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

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

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

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

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

عرض الكل

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

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