Aller au contenu
Skillpedia
Sites et interfaces (frontend)42k · #6410

slide-dsl

Ce qu’il fait

Cette skill est la référence de la manière dont les pages de diapositives sont stockées dans OpenMAIC, champ par champ. Elle s'adresse aux personnes ou aux IA qui modifient les diapositives au niveau des données, où une petite erreur peut casser une page.

Quand l’utiliser

  • ✓Quand vous devez modifier directement le contenu ou la mise en page sous-jacents d'une diapositive.
  • ✓Quand une modification de diapositive n'apparaît pas comme prévu.
  • ✓Quand vous devez savoir quel champ l'affichage utilise réellement pour une valeur.

Lien du skill

https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-dsl/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/slide-dsl/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Pouvez-vous changer la couleur d'arrière-plan de cette diapositive et vérifier que la modification s'affiche bien à l'écran ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'IA lit la structure stockée de la page, écrit le champ exact qu'utilise l'affichage, puis relit la page pour confirmer que la modification apparaît.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

The slide DSL

A slide page is a JSON document. Editing it well means writing the exact field that holds the thing you want to change, in the exact shape the renderer reads, and leaving every neighbouring field byte-identical.

Read this part first, because it changes how you should use everything below. The write path stores what you send. There is no markup allow-list, no sanitizer, no colour or font normalisation, no geometry clamping, no house style applied on the way in. patch_stage checks one thing — that the resulting document still matches the DSL structure schema (field names, types, required fields, closed objects) — and then persists your value byte for byte.

So there is nothing between you and the screen. A structurally legal page can still be an unreadable page: markup the renderer never styles, a colour on a field nothing paints, a formula snapshot that disagrees with its source. The guard rail catches shape, not meaning. This manual is the meaning. Where it tells you how the renderer behaves, that is the whole of your knowledge — write against it, then read the page back and check what you wrote is what is there.

Contents

  1. Reading before writing — the three read depths
  2. The document — content → canvas
  3. The canvas — viewport, theme, background, animations, paint order
  4. How an edit reaches the JSON — three ops, pointer rules
  5. What the structure schema refuses — the only hard boundary
  6. Two renderers paint your page — playback vs. preview
  7. Fields every element carries
  8. The ten element types — one section each
  9. The rendering truth of content HTML — the most important section
  10. Quick reference — one row per element type
  11. Where this sits
  12. Hard rules

Reading before writing

read_stage has three depths — detail:"tree", detail:"source" and detail:"text" — and they are not interchangeable.

detail What comes back Use it for
inventory (default) One compact line per element — id, type, plain-text text, left, top, width, height, src Finding an element. Never as a patch source.
source The exact persisted page JSON — the root every patch path is written against Every patch. Read it again after a write.
text Every text-bearing element as { path, id, type, text } plus one page-wide combinedText Proving old copy left no residue.
  • inventory strips the markup. Its text is the element's HTML with tags replaced by spaces and whitespace collapsed. A patch built from it invents style values that were never there and deletes the ones that were.
  • source always returns the whole page. There is no per-element projection, so array indices cannot drift between what you read and what you write. It returns the full content object — type, schemaVersion and the complete canvas, background, theme and animations included.
  • detail:"text" gives you pointers. Each path is that element's own /content/canvas/elements/N, so a residue check hands you the pointer to fix. Note that its text for a latex element is the LaTeX source, for code the lines joined by newlines, and for table the cells joined by |.

The document

A slide scene's content is:

{ type: 'slide', schemaVersion?: number, canvas: Slide }

type and schemaVersion sit outside /content/canvas/ and are therefore not reachable by a slide-canvas patch path — such a pointer begins /content/canvas/. Everything you can write lives under canvas.

The canvas

Field Required Meaning
Questions fréquentes

Le système nettoie-t-il le HTML que j'écris ?

Non. La skill indique que le système stocke ce que vous envoyez, donc le manuel est le guide de ce qui fonctionne.

Que vérifie-t-on lors de l'enregistrement ?

La skill indique que l'écriture est seulement vérifiée pour la structure de la page, et non pour le sens ou l'apparence.

Pourquoi vérifier une page après une modification ?

La skill indique qu'une page peut être valide dans sa structure tout en restant mal affichée à l'écran.

Détails

Description originale de l’auteur

The complete slide DSL manual — the canvas and its background, the ten element types field by field with units, defaults and legal values, where each type keeps its words, which field the renderer actually paints when two disagree, exactly what happens to the HTML you put in `content`, and the structure schema that is now the ONLY thing a write is checked against. Nothing filters your markup and nothing normalises your values, so this manual is the whole of what makes a page render correctly. Load it before patching a field you have not patched before, when a patch comes back rejected, when a

repo: THU-MAIC/OpenMAIC

Popularité

Étoiles GitHub
42k
Position au classement
#6410
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires