History Comics — Produce (Content + Topview)
This skill is the orchestrator. It does not replace the other two skills.
| Skill | Owns |
|---|---|
history-comics-content |
meta.json, story.md, story.en.md, prompt.md |
topview-generate |
Topview MCP auth, boards, credits, image submit/poll/upload |
history-comics-produce |
Sequencing, file layout, character-sheet lock, QA, local save |
Read both sibling skills before executing. Never invent Topview REST calls or
run topview-generate/scripts/*.py. Use host MCP tools from topview-mcp
(topview_*, ta_*) exactly as topview-generate specifies.
Do not use this skill for Amazon / Shopee / TikTok Shop / YouTube research.
Target layout
Every produced comic must end as:
content/<country>/<period>/<slug>/
├── meta.json
├── story.md
├── story.en.md
├── prompt.md
├── images/
│ ├── 00-character-sheet.png
│ ├── 01.png
│ ├── 02.png
│ └── manifest.json
└── comic.png # website cover = panel 01
comic.png stays at the comic root because the current site reads
/content/.../comic.png and hasImage is true when any image file exists
in the comic directory.
When to run which phase
| User ask | Phase A content | Phase B images |
|---|---|---|
| “写这个典故 / 生成条目 / scaffold” | Yes | No, unless they also ask to 出图 |
| “出图 / generate images / produce the comic” | Only if the four files are missing or stale | Yes |
| “完整做一遍 / full pipeline” | Yes | Yes |
If prompt.md is missing or still a legacy one-paragraph stub, run Phase A
first. Do not invent image prompts ad hoc.
Phase A — Author the entry
Follow history-comics-content in full. Stop after its validation checklist
passes. Then continue to Phase B only when the user asked for images or a
full pipeline.
Phase B — Generate images with Topview
Follow topview-generate Common Agent Workflow for every MCP action:
connect → auth if needed → pick/create board → live generation config →
submit → poll the same taskId → return URLs.
B0 — Preconditions
- Confirm
topview-mcpis connected. If discovery fails or tools are missing, invoke hostmcp_auth. If it returns a URL, send that exact URL and wait for the user to confirm sign-in. Do not switch to another image API. - Read
prompt.md. Extract, in order:- every fenced
English Prompt (Copy below)block (these are the only prompts that may be submitted); - the character English descriptors from
分镜规划; - the count-sensitive prop ledger.
- every fenced
- Call
topview_get_generation_configwithtype=imagefor bothtext_to_imageandimage_edit. Prefer GPT Image 2 when present (best bilingual text). Usemodels[].submitModelexactly. - Call
topview_get_creditbefore the first chargeable submit. Present one plan: panel count, model,16:9, resolution (2Kif supported), estimated credits, and whether later panels may auto-proceed. “Just do it” / “直接出图” counts as auto-proceed for the rest of this comic. - Reuse one board for the comic. Prefer an existing board named
history-comics / <中文标题>; otherwisetopview_create_boardwith that name.
B1 — Character sheet (required lock)
Before any story panel, generate one character-sheet image.
taskType:text_to_image- Prompt: same global style + period palette as
prompt.md; all named characters standing in a row, full-body, neutral stance, no speech balloons, no extra extras, each with the exact bilingual name label from the Series Bible (晏子 / Yan Zi). No story action. aspectRatio:16:9(or the closest live-config value)generateCount: 1
Poll to success, download the image to
images/00-character-sheet.png, then upload it with the Topview upload
flow (ta_upload_credential → PUT bytes → ta_upload_check_file). Keep
the resulting fileId as characterSheetFileId for every later panel.
Do not skip the sheet. Text-only character descriptions are not enough for cross-panel consistency.
B2 — Panels in order
For panel N of 1..K:
- Take the Nth English Prompt verbatim. Do not shorten it.
- Submit
image_edit(not plain text-to-image) with:prompt= that English PromptinputImageFileIds=[characterSheetFileId]plus the previous accepted panelfileIdwhenN > 1aspectRatio:16:9generateCount: 1- same
boardIdand model as the sheet
- Poll
topview_query_taskwith the sametaskTypeandtaskIduntilsuccessorfail. Timeouts are not failures; keep polling. - QA the result against the panel's Chinese description and prop ledger
(character colors, peach/sword counts, no gore, bilingual text present).
One
image_editrevision is allowed per panel if a ledger item is wrong. After a second failure, stop that panel, keep the last URL, and continue. - Download the accepted image to
images/0N.png(01.png,02.png, …). Upload it if a later panel will reference it and you do not already have a reusablefileId. - Independent panels must still run in order. Do not parallelize
story panels; later frames depend on earlier
fileIds.
If live config has no image_edit, fall back to text_to_image with the
same verbatim prompt, and say so in the handoff. Still generate the
character sheet first so a later edit pass can lock likeness.
B3 — Save locally
Write images/manifest.json:
{
"boardId": "",
"model": "",
"generatedAt": "YYYY-MM-DD",
"characterSheet": {
"local": "images/00-character-sheet.png",
"fileId": "",
"taskId": "",
"url": ""
},
"panels": [
{
"index": 1,
"local": "images/01.png",
"fileId": "",
"taskId": "",
"url": ""
}
]
}
Copy images/01.png to comic.png at the comic root (website cover).
Do not overwrite an existing comic.png unless this run produced a new
panel 01.
After files are on disk, tell the user to run cd web && npm run build:content
if they want the site index to pick up hasImage.
B4 — Handoff text
Keep the user-facing summary short. For each panel list the local path and
the download URL. Include the board link only when both boardId and
boardTaskId are known:
https://www.topview.ai/board/{boardId}?boardResultId={boardTaskId}
Hard rules
- Do not submit a shortened or rewritten English Prompt.
- Do not generate gore, weapon-to-body contact, corpses, or scary close-ups.
If Topview returns safety code
6001, revise only the unsafe clause and retry once. - Do not resubmit a still-running task.
- Do not route Topview creative tools through
get_tool_schema/call_tool. - Do not modify the official
topview-generateskill. If its MCP sequence changes, follow that skill, not this file's examples.
Current site gap
The website still shows a single comic.png. Multi-panel files in
images/ are the source of truth for production. Do not change web/ from
this skill unless the user explicitly asks to render a panel gallery.