illustrated-explainer-spec
БесплатноБез исполняемых скриптовНе проверенSpec for building an infinite drill-down AI illustrated explainer web app where users type a topic and click to drill into generated watercolor-style images.
от reason-machines★ 99 звёзд на GitHubОб этом скилле
Illustrated Explainer Spec Implementation Guide
Skill by ara.so — Daily 2026 Skills collection.
What This Project Is
A spec (not a library) for building a locally-run single-page web app where:
- User types a topic → AI generates a 16:9 watercolor-style illustrated explainer page
- User clicks anywhere on the image → AI generates a "drill-into" next page for that spot
- This repeats infinitely, preserving painting style across all pages
- Content-addressed caching means identical queries/clicks never re-generate
The spec is stack-agnostic — you choose the framework, image model API, and language. This skill shows you how to implement it end-to-end.
Architecture Overview
Browser (thin client)
└── POST /api/page ──► Server
├── hash → check disk cache
├── composite red marker onto parent image
├── call image model (text + optional image)
└── write PNG → return page object
Page Object Shape
interface Page {
id: string; // deterministic hash
imageUrl: string; // e.g. "/generated/abc123.png"
parentId: string | null;
parentClick: { x: number; y: number } | null; // normalized 0–1
initialQuery: string | null; // only on page 1
}
Recommended Stack (Node.js + Google Gemini)
mkdir explainer && cd explainer
npm init -y
npm install express sharp crypto @google/generative-ai cors dotenv
.env
GEMINI_API_KEY=your_key_here
CACHE_VERSION=v1
PORT=3000
Server Implementation
server.js — Full Reference Implementation
import express from 'express';
import fs from 'fs';
import path from 'path';
import crypto from 'crypto';
import sharp from 'sharp';
import { GoogleGenerativeAI } from '@google/generative-ai';
import 'dotenv/config';
const app = express();
app.use(express.json());
app.use(express.static('public'));
app.use('/generated', express.static('public/generated'));
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const VERSION = process.env.CACHE_VERSION || 'v1';
const GENERATED_DIR = path.join('public', 'generated');
fs.mkdirSync(GENERATED_DIR, { recursive: true });
// ── Content-addressed IDs ──────────────────────────────────────────────────
function hashFirstPage(query) {
const normalized = query.trim().replace(/\s+/g, ' ').toLowerCase();
return crypto
.createHash('sha256')
.update(`first${VERSION}${normalized}`)
.digest('hex')
.slice(0, 32);
}
function hashChildPage(parentId, x, y) {
const rx = Math.round(x * 100) / 100;
const ry = Math.round(y * 100) / 100;
return crypto
.createHash('sha256')
.update(`child${VERSION}${parentId}${rx}${ry}`)
.digest('hex')
.slice(0, 32);
}
// ── Style description (single source of truth) ────────────────────────────
const STYLE_DESCRIPTION = `Painting style (must remain consistent across every page):
- Light warm paper background with generous margins
- Clean, even dark gray or black ink outlines, consistent thin line weight
- Soft watercolor washes, pale palette: ivory, pale green, pale blue, light gray, with restrained warm accents
- A large serif title printed at the top center of the image
- Calm, well-composed scene with breathing room
Strict exclusions:
- No decorative borders, seals, parchment aging, ornate fonts, or vintage texture
- No 3D render, photorealism, neon, dark themes, or modern app UI cards
- No dense paragraphs of text, watermarks, or tiny unreadable labels
- No tourist map roads, landmarks, transit, or "traveler-guide" framing`;
function firstPagePrompt(query) {
return `${STYLE_DESCRIPTION}
Subject: ${query}
Compose a single 16:9 illustrated explainer page about the subject above.
Let the scene's content (objects, layout, metaphor) be whatever best
explains the subject — cross-section, exploded view, timeline, anatomy,
flow, comparison, or scene — chosen to fit this specific topic.
Output a single PNG image, 16:9. Print the title clearly inside the image.`;
}
const CHILD_PAGE_PROMPT = `${STYLE_DESCRIPTION}
You are continuing an illustrated explainer book.
The provided image is the previous page. A red circle marks
the area the reader pointed at.
Generate the next page: a single 16:9 image that goes deeper
into whatever the red circle is on — zoom in, expand its inner
structure, or show its mechanism.
Critical: match the painting style of the provided image exactly
— same line weight, same paper tone, same pastel palette, same
title typography. The two pages must feel like consecutive spreads
in the same hand-drawn book.
Do NOT include the red circle or any cursor mark in the output.
Output a single PNG image, 16:9.`;
// ── Red marker compositing ─────────────────────────────────────────────────
async function compositeRedMarker(imagePath, nx, ny) {
const img = sharp(imagePath);
const { width, heig
Установить illustrated-explainer-spec в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл illustrated-explainer-spec?
Spec for building an infinite drill-down AI illustrated explainer web app where users type a topic and click to drill into generated watercolor-style images.
Как установить скилл illustrated-explainer-spec?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл illustrated-explainer-spec запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic