Logo di Image To Editable Html

Image To Editable Html

OrganizzazionePopolare
fastclaw-ai
image-to-editable-html

Turn an image of a poster, flyer, menu, banner or UI screenshot into a single editable HTML file — every text line becomes real editable text, every object (a product with everything on and around it, an illustration, a logo, an icon) is cut from the background as one movable piece, and the page has a built-in editor (drag, resize, edit text, layers panel, export). Use when the user sends an image and asks to make it editable, split it into layers/components, "convert to HTML", or "拆图层 / 转成可编辑的网页".

Panoramica

Pubblicato dafastclaw-ai
Repositoryfastclaw
Nome della skillimage-to-editable-html
Stelle
1.4K
Fork
227
File inclusi
12
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 12

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da fastclaw-ai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Image To Editable Html in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/fastclaw-ai/fastclaw/tree/dev/skills/image-to-editable-html
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fastclaw-ai/fastclaw.git /tmp/fastclaw
mkdir -p .claude/skills
cp -r /tmp/fastclaw/skills/image-to-editable-html .claude/skills/image-to-editable-html
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Image To Editable Html in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Image To Editable Html non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Image To Editable Html non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Image → editable HTML

Input: one image (poster, menu or UI screenshot). Output: one self-contained .html file that looks like the image, where every element can be selected, moved, resized, edited or hidden, and which exports a clean copy.

Granularity: all text is live, editable text; everything else that stands in front of the background comes out as whole objects — an ice-cream cup with its scoop, spoon, wafer and the fruit beside it is one piece, not five. Moving it reveals a clean background.

How it works: OCR finds the text (sideways lines too); an image-editing model (nano-banana-2) removes the text and paints the empty background, two samples at a time since its output varies; a foreground-matting model (BiRefNet) cuts out the objects; flat graphics you name (logos, icons, divider lines) are found with SAM 3. Every model result is checked line by line and object by object, and whatever fails falls back to a local fill.

1. Find the image file

The user's image arrives as an attachment line such as [Attached: /workspace/image_x1y2z_0.jpg]. The file is in your Working Directory under that filename (on the host, use the Working Directory path from Runtime info, not /workspace). If there is no attachment, ask the user to send the image.

2. Name the flat graphics (optional)

Photographic objects are found automatically. Flat graphics usually count as background for a matting model, so name the ones that should also move: logos, badges, icons, divider lines, card shapes or buttons in UI screenshots. Separate names with ;. One name finds every instance (icon gets all icons). SAM 3 doesn't know every word, so give alternatives with |: avatar|profile picture, round badge|badge. name @ x,y (percent of width, height) keeps only the instance nearest that point.

Examples:

  • menu / poster: planet logo|logo; round badge|badge; round icon|icon; thin gold line
  • chat UI: search box; chat bubble; avatar|profile picture|person; red notification badge|red circle; icon

Leave it empty when there is nothing like that.

3. Run the pipeline in the background

It takes 2–4 minutes, more for busy images like menus (the very first run also spends a minute or two installing its Python environment). Tell the user in one short line that you're on it, then start it with exec and run_in_background: true:

bash
bash {baseDir}/scripts/run.sh run "<Working Directory>/<image file>" --extras "<names from step 2>" --title "<short title>"

Poll with bash_output until it exits. If it stops with FAL_ACCOUNT_ERROR (the image service's balance is used up or its key is invalid), nothing will work until that is fixed: tell the user in one plain sentence that the image service account needs topping up, and don't retry. The final stdout is a JSON summary:

  • html — the generated page (inside <image stem>-editable/ next to the image)
  • scene — scene.json, the editable source of the page
  • objects_preview — the source with every object tinted and labelled
  • objects / texts — every element: id, name or text, box [x, y, w, h]
  • check.static_ssim — unedited page vs the image (1.0 = identical; text set in a web font usually lands around 0.75–0.85)
  • check.editability — counts of problems found by moving and hiding every element: ghost text left in the background, text fragments inside image layers, broken areas revealed when an element is moved. All should be 0.

4. Review the objects

If you can view images, open objects_preview (every object tinted and numbered) and compare it with the image. Photo objects are named object; graphics carry the name you gave. A logo, icon or line that should move but isn't tinted → run step 3 again with it (or another word for it) in --extras.

5. Proof-read the text and set the fonts

OCR is good but not perfect, especially on stylised titles. Compare every entry in texts with the image and fix mistakes by editing scene.json (edit_file on the path from scene):

  • wrong or missing characters → correct the text field
  • a line that isn't real text (OCR noise on an icon) → delete that element
  • one word split into pieces because something covers part of it (e.g. "SW" + "ET" for SWEET behind an object) → keep one element, set its text to the whole word and its box to the union of the pieces, delete the others
  • an obviously wrong weight or colour on a headline → adjust font_weight (400/600/700/900) or color
  • a line with rotate (-90 / 90) is set sideways; a word partly hidden behind a product may be read short ("FFLE" for WAFFLE) — correct text

Then match the typography: look at each distinct style in the image and set font_family (any Google Fonts family name) plus a font_weight that family actually has. The page scales each line to its box, so pick the face whose letter shapes match; width is adjusted automatically. Good defaults: condensed heavy display → Anton (400) or Oswald (700); classic serif headline → Playfair Display; book serif body → EB Garamond; wide all-caps serif logo → Cinzel; geometric sans → Montserrat; clean sans / UI text → Inter; Chinese → Noto Sans SC or Noto Serif SC. Leave font_family unset when the default sans already matches.

Don't touch image elements or other box values. Then rebuild:

bash
bash {baseDir}/scripts/run.sh rebuild "<out dir containing scene/>"

(foreground exec is fine — it takes ~20 s). Skip the rebuild if nothing needed fixing.

6. Deliver

The person you're talking to is not technical. Never mention HTML, pages, files, layers, scene.json, element ids, versions, scores, models or commands — speak about "the picture", "product 03", "the background", "the title".

Reply with the result picture (preview in the summary) shown inline and the editable version (html) linked, both by path relative to your Working Directory:

![效果图](poster-editable/previews/poster-v1.png)
[打开可编辑版本](poster-editable/poster.html)

then one or two plain sentences, e.g. "拆好了:文字都能直接改,每个商品都能 单独替换或挪动。想改什么直接告诉我(比如把 03 换成草莓味、背景换成大理石), 也可以打开可编辑版本,双击文字直接改、拖动调整位置。"

If check.editability isn't all 0 or static_ssim is below ~0.7, say in plain words where it may look off ("左下角背景补得不太自然") and offer to fix it — not the numbers.

7. Follow-up changes in conversation

Once a design exists, never run the pipeline again for changes — edit the design with scene.py (foreground exec; seconds for text, 20–40 s per image edit, about a minute for a restyle):

bash
bash {baseDir}/scripts/run.sh scene <command> "<out dir>" [args]

<out dir> is the <image stem>-editable folder. Start every follow-up turn with status: it lists every element (id, type, box, text or name) and merges the edits the user made by hand in the page (user_edits says what they changed — mention it if it matters, never undo it). If you can view images, look at preview to locate things.

The user wants…Command
different wording, colour, font, size, position of a textset <id> text="…" color=#… font_family="…" font_weight=700 box=x,y,w,h
a new text lineadd-text "<text>" x,y,w,h --color "#…" --font-family "…"
one product / object changed ("换成草莓味")edit <id> "<instruction in English>"
the background changededit-bg "<instruction>"
something added ("加一枝薄荷")add "<what>" x,y,w,h — a free area next to where it belongs
something removedremove <id> [<id> …]
an object moved / resized / brought forwardset <id> box=x,y,w,h / set <id> z=front
an overall new look ("改成圣诞风")restyle "<instruction>" (objects get new ids)
"撤销" / go backundo (repeatable)
  • Text is never repainted by an image model: change wording with set, and when an image edit changes what a label should say (chocolate → strawberry), also set the matching text.
  • Image instructions work best in English, specific and visual: "replace the chocolate gelato with strawberry gelato and put two fresh strawberries beside the cup". --model gpt-image-2 is the alternative when nano-banana-2 (default) doesn't follow an instruction.
  • A message ending in 〔选中:图片 el9〕 or 〔选中:文字 t17「…」〕 was typed by the user with that element selected in the editable version — that id is the element to change. Never repeat ids back to the user.
  • Photo objects are all named object; tell them apart by box (row and column on the page) or the preview.

Every command re-renders the picture. Reply with the new picture inline (![效果图](…) with the new preview path — each change gets its own picture) and one plain line on what changed ("03 换成草莓味了,品名也改成了 Strawberry Fudge"); link the editable version again only if they may want to tweak it by hand. Don't explain how it was done. The editable version open in the chat refreshes by itself.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Image To Editable Html?

Turn an image of a poster, flyer, menu, banner or UI screenshot into a single editable HTML file — every text line becomes real editable text, every object (a product with everything on and around it, an illustration, a logo, an icon) is cut from the background as one movable piece, and the page has a built-in editor (drag, resize, edit text, layers panel, export). Use when the user sends an image and asks to make it editable, split it into layers/components, "convert to HTML", or "拆图层 / 转成可编辑的网页".

Perché usare Image To Editable Html su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Image To Editable Html è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Image To Editable Html in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/fastclaw-ai/fastclaw/tree/dev/skills/image-to-editable-html. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Image To Editable Html?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Image To Editable Html?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Image To Editable Html: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Image To Editable Html è gratuita?

È pubblicata su GitHub da fastclaw-ai. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇