SkillsGrove
SkillsGrove/Documentos de oficina/Brain-ai-biz/Brain-edit-slides/deck-edit-mode

deck-edit-mode

Instalación

$npx skills add https://github.com/Brain-ai-biz/Brain-edit-slides --skill deck-edit-mode
$git clone --depth 1 https://github.com/Brain-ai-biz/Brain-edit-slides.git /tmp/Brain-edit-slides && mkdir -p ~/.claude/skills && cp -r /tmp/Brain-edit-slides/. ~/.claude/skills/deck-edit-mode
Instala por favor esta Agent Skill por mí: https://github.com/Brain-ai-biz/Brain-edit-slides/tree/14550d4aab8e1fa232b9db461e975fd3dc290e17/. Lee primero su SKILL.md y sus scripts, y solo instálala en mi carpeta de skills cuando hayas confirmado que es segura.

Resumen

Descripción original · MITAdd a Canva-style visual Edit Mode to any HTML presentation/slide deck. Use this skill EVERY TIME you create, generate, or finish building an HTML presentation, slide deck, or מצגת for the user - inject the editor automatically as the final step. Also use when the user asks to "make my deck editable", "add edit mode", "הוסף מצב עריכה", "תעשה שאוכל לערוך את המצגת", or wants to move/edit/add elements in an existing HTML deck.
El SKILL.md siguiente se reproduce de Brain-ai-biz/Brain-edit-slides (commit 14550d4) bajo la licencia MIT. El texto no se ha modificado; solo se omiten los metadatos de cabecera del archivo, las imágenes se muestran como enlaces y los archivos muy largos se truncan. Copyright 2026 Eden Bibas / Brain. Licencia: LICENSE. Solo se muestra el archivo de instrucciones; consulta el repositorio original para ver los scripts.

Deck Edit Mode

Adds an in-browser visual editor to any self-contained HTML slide deck: an "✏️ עריכה" button that lets the user drag elements, edit text inline, paste screenshots (Cmd+V), add images/blur/shapes/textboxes, recolor text, nudge with arrow keys, undo/redo, autosave - and save the edited file. No server, no dependencies. Everything stays inside the single HTML file.

When to run

  1. Automatically - after you create or significantly rebuild any HTML presentation for the user, inject the editor as the last build step.
  2. On request - when the user asks to make an existing deck editable.

How to inject

python3 <skill-dir>/scripts/inject_editor.py path/to/deck.html

The script is idempotent: running it again upgrades the editor in place (it replaces the previous editor block, never duplicates). It appends the editor CSS before the last </style> and the editor JS before </body>. Always keep a backup copy of the deck before the first injection.

Deck compatibility - IMPORTANT, adapt when needed

The editor expects the common Claude-generated deck shape:

  • A fixed-resolution stage container with id="deck" (default 1920x1080), scaled to fit the window with transform: scale(...).
  • Slides as .slide elements where the visible one has class .active.
  • Optionally a global show(n) function for navigation and entry animations on .anim elements.

Decks are built by many different skills, so BEFORE injecting, read the target HTML and check the structure. If it differs, adapt - the constants live at the top of scripts/editor.js:

Deck difference What to adapt
Stage container has another id/class In editor.js, change getElementById('deck') to match, and the two 1920 / 1080 design-resolution constants (scale(), guides CSS in editor.css) to the deck's design size
Slides aren't .slide / .active Update the .slide / .active selectors in editor.js (activeSlide, eligible, export)
Full-bleed backgrounds / wrappers get selected by mistake Add their selectors to the DENY list
A text-like element refuses double-click editing Add its selector to the TEXTY list
Animated number counters ([data-count]-style) The editor already syncs data-count on edit and bakes values on export; if the deck uses a different attribute, mirror that logic
Single-page (non-slide) presentation Treat the whole page container as one "slide": give it class slide active or adapt activeSlide()

After injecting, ALWAYS verify: open the file (or screenshot it headless), confirm the deck still renders identically in present mode, the ✏️ button appears, and edit mode opens. If anything looks broken, restore the backup.

What the user gets (tell them after injecting)

  • ✏️ עריכה button (bottom-right) toggles edit mode
  • Click = select · drag = move (center snap-guides, Alt disables) · double-click = edit text (Escape cancels)
  • Cmd+C / Cmd+V copy-paste elements · paste a screenshot directly · drag image files from the desktop · Cmd+D duplicate
  • Toolbar: add image / blur / shape / textbox · ⤴ select parent group · z-order · center H/V · font size · color swatches (whole element, or a selected word while editing)
  • Arrow keys nudge 1px (Shift = 10px) · Cmd+Z undo · Cmd+Shift+Z redo
  • Autosave to the browser; a restore bar appears if work was lost
  • 💾 שמור / Cmd+S downloads <name>-edited.html - the user replaces the original file with it. Backgrounds, fonts and numbers are preserved (URLs are absolutized and counters baked at export)

Auto-injection for every future deck

On first install, offer the user to add this line to their project's CLAUDE.md so the behavior survives across sessions:

After creating any HTML presentation, inject Edit Mode:
python3 <skill-dir>/scripts/inject_editor.py <deck.html>
Ver el texto completo de la licencia (MIT)
MIT License

Copyright (c) 2026 Eden Bibas / Brain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.