A fixed teacher character explains one concept clearly in one issue of comics. The current assistant (Claude or Codex) writes the story and the prompt for each page, and reviews the images page by page before delivery; image generation is handed to Codex's built-in imagegen to execute as-is; the script handles checking and verification.
Below, S refers to this skill's script directory:
S=<本 SKILL.md 所在目录>/scripts
Default configuration
风格:小课堂(styles/classroom.md);画风跟着角色参考图走
比例:3:4(提示词第二句写 A vertical 3:4 manga comic page…,见「提示词铁律」;实测 1086×1448)
主角:默认角色(~/.comic-maker/characters/<角色ID>/,settings.py 管理);讲 AI 时配角用 AI Helper 小机器人
每期:封面「开课」+ 正文 4–7 页 + 结尾「下课」
出图:Codex 内置 imagegen(scripts/render_codex.py),默认用你 Codex 自己配置的模型
Step 0: Character (check first every time you start)
python3 $S/settings.py get default(printing out the character profile JSON = there is a default character; reporting "no default character" = there isn't one yet):
- Has a default character: tell the user "This issue's teacher is X (series name), say the word if you want to change", and go straight on.
- Doesn't have one(first time use): first run the
python3 $S/doctor.pyself-check, then followtemplates/character.mdto prepare the character——- Has your own IP: give one image + name, write the character profile (the field table is in
templates/character.md), and save it after the user confirms. - Doesn't have one: ask three things (what to draw, accessories, art style, default colored pencil watercolor) → produce 3–4 candidates → user picks → save.
- Has your own IP: give one image + name, write the character profile (the field table is in
- "Use TuanTuan for this issue":
settings.py get <角色ID>reads that character, for this issue only;"Use TuanTuan from now on":settings.py use <角色ID>。
Startup: decide the collaboration mode first
- Quick mode(the user says "just do it", "you decide", "pick a topic at random"): don't ask item by item, directly give the story line table + layout for each page, generate images after showing it once; only ask the user to look after the images are generated.
- Confirmation mode(default): stop and wait for the user at these points: ① when creating a new character, the character profile (name, appearance, series name); ② the story line and layout; ③ the cover attempt when using it for the first time / just after changing characters. Don't interrupt otherwise.
Workflow
Step 1: Material comprehension
- The user gave an article / file: read it through first, extract the core definition and 3–5 key points; use only the numbers and facts from the original text.
- Only a topic was given: explain based on common knowledge, and don't put facts you're unsure about into the dialogue.
- Real people in the original text (the author's friends, celebrities) are not drawn as characters; product names can be written as text, but don't draw brand logos.
Step 2: Story line + layout (the user makes the call once)
- Choose the structure according to
templates/story-structure.md(problem-solution / tutorial / story), 6–9 pages by default (if the user specifies a page count, follow the user's; for 3–5 pages use the "compressed version"),the first page is always the "Class Begins" cover, and the last page is always the "Class Dismissed" ending(seestyles/classroom.md"Series fixed pages"). - Choose the layout for each page according to
templates/layout-patterns.md, with an ASCII sketch. - Write in each panel: the scene (who is doing what, specific props), dialogue bubbles, narration / annotations.
- Principle: each panel is ascene, not an information point; there is a coherent story line (problem → solution → result); rich elements; not too much or too little text (2–5 specified pieces of text per page).
Step 3: Write the prompts
- Follow
templates/prompt-template.mdto write, one file per page:<任务目录>/prompts/00.txt、01.txt …(00 = cover). Fill in the character's English name, appearance, and series name exactly as in the character profile;<hand>replace with paw / hand / wing depending on the character;for topics that don't discuss AI, delete the line with the little AI robot。 - Good example:
examples/mcp/(MCP issue 1, 8 pages, example character Orange, 3 thumbnails); look at one before writing a new issue. - After finishing each one, check it against the self-check list at the end of the template.
Step 4: Generate images + verify
python3 $S/render_codex.py <任务目录> --check # 只检查提示词(出图前也会自动查)
python3 $S/render_codex.py <任务目录> --only 00 --title "系列名 · 主题" # 第一次用 / 刚换角色:先出封面看角色像不像(确认模式等用户说像再继续;快速模式自己看像就继续)
python3 $S/render_codex.py <任务目录> --title "系列名 · 主题" # 出 prompts/ 里还没出的页
- Reference image: the default character's
ref.png; placingref.pngor--refin the task directory can temporarily swap it. If neither is present it will error out, prompting you to prepare the character first. - Automatic check (stops immediately on error, exit code 2): whether the first sentence, Follow the exact same…, and All Chinese text clearly readable are all present; whether there is a URL; whether a color scheme is specified; whether the English double quotes are paired.
- Image generation: one Codex process per 3 pages, 3 running at the same time, about 4–6 minutes for 9 pages; pages that are full or failed are automatically rerun in the next round.
- If you change a page's prompt, just rerun: the script detects the prompt has changed, moves the old image to
_v1/and regenerates it. --onlymatches by the start of the filename:--only 00generates only the cover,--only 0generates 00–09.- Outputs:
review.html(ordered by page 1…N, clickable ♡ to copy back),发布/01.png…(in order, drag directly into Xiaohongshu).
Look at each page before delivery (mandatory, the current assistant looks at the images itself): the script's "prompt verbatim" only means the prompt imagegen received was not rewritten,it does not mean the text in the image was drawn correctly。
- Whether the specified text has typos; whether the character looks right; whether there are any brand logos.
- Whether the small text the model added on its own (blackboard, sticky notes, book spines)overstates things or contradicts the original text. Everyday slogans can stay; anything that states facts wrongly should be raised to the user.
- When reporting, split into two items: prompt verbatim N/N; image text reviewed, with problems listed one by one.
When Codex runs this skill itself
Do not call render_codex.py to generate images (it will start another Codex). Follow steps 1–3 to write prompts/, run render_codex.py <任务目录> --check, then for each file call the built-in imagegen: prompt = the file's full text verbatim,referenced_image_paths = the absolute path of the default character ref.png (settings.py get default in ref), do not pass num_last_images_to_include; save as out/<同名>.png; note the start time before generating images, and finally run render_codex.py <任务目录> --page-only --since "YYYY-MM-DD HH:MM" to verify and generate the comparison page and publishing folder.
Step 5: Iterate
- For pages the user is satisfied with, first copy the prompt to
baselines/, then edit. - Change only one thing at a time(add one sentence or change one sentence), leave everything else untouched.
- Do not rewrite the prompt wholesale.
Iron rules for prompts
- First sentence:
Use the same style and character design as the reference image.; second sentence writeA vertical 3:4 manga comic page with N panels. Follow the exact same art style, color palette, character design, and border style as the reference image. - Never specify colors(leave the color scheme to the reference image).
- For each panel, write the position and proportion, specific visual elements, dialogue and narration (Chinese inside English double quotes).
- Closing paragraph:
Rich visual details: …+No brand logos anywhere.+All Chinese text clearly readable.+ emotional atmosphere. If you want it clean (so the model doesn't add small text), also addNo other words besides the quoted text. - In the promptdo not write a URL, reference images go through
referenced_image_paths; do not passnum_last_images_to_include(only 1–5; passing 0 causes an error).
Related files
- Style:
styles/classroom.md - Character:
templates/character.md(import IP / generate candidates); data is in~/.comic-maker/, upgrading the skill will not overwrite it; when the home directory is not writable (Codex sandbox), it is automatically saved to the current project's.comic-maker/; you can also use the environment variableCOMIC_MAKER_HOMEto specify - Template:
templates/story-structure.md、templates/layout-patterns.md、templates/prompt-template.md - Example:
examples/mcp/(8 prompts + 3 thumbnails),examples/character/(example character Orange and its generation prompt) - Script:
scripts/doctor.pyself-check,scripts/settings.pycharacter,scripts/render_codex.pyimage generation,scripts/mark.js