Logo von Notion Write Math Encoding Guard

Notion Write Math Encoding Guard

Community
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.

Übersicht

HerausgeberRainy-W-cy
Repositorypractical-agent-skills
Skill-Namenotion-write-math-encoding-guard
Sterne
29
Forks
2
Mitgelieferte Dateien
2
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 2 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von Rainy-W-cy auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Notion Write Math Encoding Guard in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

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
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Notion Write Math Encoding Guard in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Notion Write Math Encoding Guard automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Notion Write Math Encoding Guard nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill 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.

Warum Notion Write Math Encoding Guard in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Notion Write Math Encoding Guard besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Notion Write Math Encoding Guard in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Notion Write Math Encoding Guard nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Notion Write Math Encoding Guard verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Notion Write Math Encoding Guard damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Notion Write Math Encoding Guard kostenlos?

Ja. Der Skill wird von Rainy-W-cy auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇