Logo van 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.

Overzicht

UitgeverRainy-W-cy
Repositorypractical-agent-skills
Skillnaamnotion-write-math-encoding-guard
Sterren
29
Forks
2
Meegeleverde bestanden
2
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 2

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door Rainy-W-cy op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Notion Write Math Encoding Guard in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Notion Write Math Encoding Guard in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Notion Write Math Encoding Guard automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Notion Write Math Encoding Guard niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-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.

Waarom Notion Write Math Encoding Guard gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Notion Write Math Encoding Guard bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Notion Write Math Encoding Guard in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/Rainy-W-cy/practical-agent-skills/tree/main/skills/notion-write-math-encoding-guard. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Notion Write Math Encoding Guard gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Notion Write Math Encoding Guard gebruiken?

Zoveel als je wilt. Je kunt Notion Write Math Encoding Guard gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Notion Write Math Encoding Guard gratis?

Ja. Deze skill is door Rainy-W-cy op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇