Story Html Publisher logo

Story Html Publisher

Community
hassancs91
story-html-publisher

Final step of the AI Storybook pipeline. Consolidates the scenes, images, and per-scene audio into ONE self-contained HTML storybook — a swipe/tap player with every image and audio clip embedded as base64 so the single file works offline and can be shared as-is. Reads {slug}_scenes.json, {slug}_images.json, and {slug}_audio/, then writes {slug}_story.json and {slug}.html. Use this skill whenever the user wants to build the final storybook, export to HTML, package the story, make the storybook file, generate the HTML, or wrap up the pipeline. Trigger on phrases like "build the storybook HTML", "export to HTML", "make the final file", "package the storybook", "generate the storybook", "wrap up the pipeline", or whenever the scenes + images + audio all exist and the user wants the single shareable file. Produces a single self-contained .html (images + audio embedded).

Overview

Publisherhassancs91
Repositoryclaude-image-generation
Skill namestory-html-publisher
Stars
110
Forks
64
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hassancs91 on GitHub. Read the source before you install it.

Installation

Install the Story Html Publisher AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/story-html-publisher
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git /tmp/claude-image-generation
mkdir -p .claude/skills
cp -r /tmp/claude-image-generation/.claude/skills/story-html-publisher .claude/skills/story-html-publisher
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Story Html Publisher in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Story Html Publisher on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Story Html Publisher is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Story HTML Publisher

Takes everything the upstream skills produced and emits one self-contained HTML storybook: a swipe/tap player where each scene is one screen (illustration + narration text), with the playback controls in a fixed footer. It opens with a dedicated cover page — the first illustration shown clean, playing only the short spoken title. Every image and audio clip is embedded as a base64 data URI, so the single .html file works offline, opens with a double-click, and can be emailed or dropped on any static host with no assets folder.

This skill does no creative work — no new text, images, or audio. It only reads, validates, pairs, embeds, and writes. If something is missing upstream, it reports the gap rather than fabricating.

When this skill applies

The pipeline's earlier skills have run and the user wants the final output: "build the storybook", "export to HTML", "make the final file", "wrap up the pipeline".

Does NOT apply to stories that haven't been through scene-splitter + story-illustrator + story-narrator — point the user to the missing step.

Required inputs

In stories/{slug}/:

ArtifactProducerPath
Scenes spinescene-splitter{slug}_scenes.json
Image registrystory-illustrator{slug}_images.json
Audio clipsstory-narrator{slug}_audio/{slug}_part_NN.mp3
Title clip (optional)story-narrator{slug}_audio/title.mp3

Everything pairs by scene index: scenes[i].index = N → image from images.json.shots[] where index = N → audio {slug}_part_NN.mp3.

Workflow — four stages with one hard gate

Stage 1: Discover and validate

  1. Determine the slug (user argument → the *_scenes.json in the working dir → ask).
  2. Locate the three inputs. Confirm each scene has both an image (in images.json) and an audio file. Build a pairing table: index → text snippet → image present? → audio present?
  3. Reconstruction sanity check: the scene count in scenes.json should match the number of shots in images.json and the number of _part_NN.mp3 files.
  4. Report findings:

    Found 9 scenes, 9 images, 9 audio clips (+ title clip). All paired. Ready to build. If anything is missing, list the gaps. Don't proceed to build with gaps unless the user says "build partial" (the build script will embed what exists and leave placeholders for the rest).

Stage 2: Build the HTML

Run the build script (preferred):

bash
python .claude/skills/story-html-publisher/assets/build_html.py {slug}

It downloads/reads every image and audio file, embeds them as data URIs, injects them into assets/player-template.html, and writes stories/{slug}/{slug}_story.json + stories/{slug}/{slug}.html. Read references/build-html.md for what it does, options, and how to do it by hand if the script can't run.

On Windows use python; on macOS/Linux use python3. Stdlib only — no installs needed.

Stage 3 — HARD GATE: review the storybook

Report:

  1. Output path: stories/{slug}/{slug}.html, its size (MB), and scene count
  2. Any warnings the build emitted (missing image/audio for a scene)
  3. A one-liner: "Open stories/{slug}/{slug}.html in your browser to read the finished storybook."

Then prompt:

Storybook built — open it and review, then reply:

  • done to finish
  • rebuild to regenerate the HTML (e.g. after swapping an image/audio file)
  • fix image N / fix audio N — if a scene's media is wrong, regenerate it upstream (illustrator/narrator), then rebuild

This is the final review surface — the user reads the actual storybook here. Don't declare success before they've had the chance to open it.

⚠️ The .html can be large (several MB) because media is embedded. It opens fine in a browser but may be slow to preview inside a chat/artifact viewer — tell the user to open it locally in a real browser.

Stage 4: Finish

On done, confirm in one line: "Storybook ready: stories/{slug}/{slug}.html ({N} scenes, {size} MB). Fully self-contained — share or host it anywhere."

What the finished storybook does

  • A dedicated cover page (slide 0): the first illustration shown clean — no overlaid title text, no scrim, no glyph — with the title in the header. It plays the optional spoken title clip, then auto-advances into scene 1.
  • One scene per screen after that: illustration + narration text, controls in a fixed footer
  • Tap the image (or the footer play button) to play/pause the scene's narration. No play glyph is drawn on the image.
  • Swipe (left = next, right = prev), arrow keys, on-screen buttons, or tap a progress dot to navigate
  • Auto-play toggle: when a scene's narration ends, advance to the next scene. Every slide is uniform (one image, one clip, advance on ended) — no title→body audio chaining
  • A "The End" screen with a "Read again" button at the finish
  • Serif body text matching the serif title, LTR English, warm storybook styling, responsive (phone + desktop), no external dependencies

What this skill does NOT do

  • Does NOT generate new content (text/images/audio) — it only packages.
  • Does NOT upload anywhere — local file output only. (The result is portable; the user can host it wherever.)
  • Does NOT modify upstream artifacts.
  • Does NOT support multiple stories per run — one story per invocation.

Reference files

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Story Html Publisher AI skill do?

Final step of the AI Storybook pipeline. Consolidates the scenes, images, and per-scene audio into ONE self-contained HTML storybook — a swipe/tap player with every image and audio clip embedded as base64 so the single file works offline and can be shared as-is. Reads {slug}_scenes.json, {slug}_images.json, and {slug}_audio/, then writes {slug}_story.json and {slug}.html. Use this skill whenever the user wants to build the final storybook, export to HTML, package the story, make the storybook file, generate the HTML, or wrap up the pipeline. Trigger on phrases like "build the storybook HTML...

Why use Story Html Publisher on TypingMind?

Because you install it once and use it with any model. Story Html Publisher is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Story Html Publisher in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/story-html-publisher. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Story Html Publisher?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Story Html Publisher?

As many as you like. As long as a model supports skills, you can use Story Html Publisher with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Story Html Publisher AI skill free?

Yes. It is published on GitHub by hassancs91 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇