漫画生成器 logo

漫画生成器

Community
NanjingHJLP
漫画生成器

将描述性文字转换为漫画页面的完整工作流。支持素描(黑白线稿)和彩绘(彩色漫画)两种风格,可从直接输入或文件(.docx、.txt)读取文字,生成后可编辑单页,最终输出为 PDF 文档。

Overview

PublisherNanjingHJLP
Repositoryhjlp-skills
Skill name漫画生成器
Stars
26
Forks
4
Bundled files
8
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.

  • 8 bundled files

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

  • Open source

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

Installation

Install the 漫画生成器 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/NanjingHJLP/hjlp-skills/tree/main/skills/comic-generator
  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/NanjingHJLP/hjlp-skills.git /tmp/hjlp-skills
mkdir -p .claude/skills
cp -r /tmp/hjlp-skills/skills/comic-generator .claude/skills/nanjinghjlp-2
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 漫画生成器 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 漫画生成器 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 漫画生成器 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.

漫画生成器

本 Skill 提供将描述性文字转换为漫画页面的完整工作流。支持素描(黑白线稿)和彩绘(彩色漫画)两种风格,可从直接输入或文件(.docx、.txt)读取文字,生成后可编辑单页,最终输出为 PDF 文档。

工作流程概览

  1. 获取输入:接收用户直接输入的文本,或读取 Word (.docx) / 记事本 (.txt) 文件。
  2. 分割场景:将文本按段落、句子或用户指定的分隔符拆分为多个场景(每个场景对应一页漫画)。
  3. 选择风格:用户选择素描(sketch)或彩绘(color)风格。
  4. 生成图像:为每个场景生成漫画图像,图像上方或下方预留文字说明区域。
  5. 添加文字:在每页漫画下方添加对应的描述文字。
  6. 编辑功能:允许用户选择编辑特定编号的漫画图像或文字,重新生成该页。
  7. 预览:展示所有漫画页面(图像+文字)供用户确认。
  8. 输出 PDF:将所有页面组合成单个 PDF 文件。

详细步骤指南

1. 获取输入

直接输入:请用户粘贴或输入描述性文字。

文件读取:

  • 对于 .txt 文件:使用 Python 内置 open() 读取。

示例代码(读取文件):

python
def read_text_file(filepath):
    with open(filepath, 'r', encoding='utf-8') as f:
        return f.read()

2. 分割场景

询问用户希望如何分割文本:

  • 按段落(空行分隔)
  • 按句子(句号、问号、感叹号分隔)
  • 按自定义分隔符(如“###”)

提供默认分割方式(按段落)。

示例代码(按段落分割):

python
def split_by_paragraphs(text):
    paragraphs = [p.strip() for p in text.split('\n\n') if p.strip()]
    return paragraphs

3. 选择风格

提供两个选项:

  • 素描风格:黑白线稿,prompt 中添加“sketch, black and white, line drawing, comic style”
  • 彩绘风格:彩色漫画,prompt 中添加“color, vibrant, comic book style, detailed coloring”

4. 生成图像

对于每个场景文本,构建图像生成 prompt。建议格式:

[场景描述],漫画风格,[素描/彩绘],清晰构图,背景丰富,人物生动

注意:调用 image_generate 工具时,可根据用户选择的风格调整 prompt 和参数。素描风格可使用黑白提示词,彩绘风格使用彩色提示词。

图像尺寸建议使用 16:9 或 4:3 的横屏比例,以适应漫画页面。

5. 添加文字

每页漫画应包含图像和下方的说明文字。文字可使用相同场景文本,或用户提供的精简版本。

可考虑将文字直接叠加在图像上,或单独保存文字内容,在生成 PDF 时放置在图像下方。

6. 编辑功能

用户可能想修改某页漫画的图像或文字。实现方式:

  • 展示所有页面编号和预览
  • 询问要编辑的页面编号
  • 对于图像编辑:重新生成该页图像(可允许用户修改 prompt)
  • 对于文字编辑:允许用户修改该页文字
  • 更新后重新预览该页

7. 预览

将所有生成的图像(和文字)以列表形式展示给用户。可提供简略描述(如“第1页:场景描述...”)。若图像文件较多,可逐页显示或生成一个 HTML 预览页面。

8. 输出 PDF

使用 formPDF.exe 工具将图像和文字组合成 PDF。每页 PDF 包含图像和下方文字。

formPDF.exe 接受 JSON 格式的配置文件作为参数,生成指定布局的 PDF 文档。

命令行用法:

bash
formPDF.exe --config config.json --output output.pdf

配置文件格式(config.json):

json
{
  "pages": [
    {
      "image": "path/to/image1.png",
      "text": "第一页的描述文字"
    },
    {
      "image": "path/to/image2.png",
      "text": "第二页的描述文字"
    }
  ],
  "layout": {
    "page_width": 210,
    "page_height": 297,
    "margin": 10,
    "image_height": 180,
    "font_size": 12
  }
}

Python 调用示例:

python
import subprocess
import json
import os

def create_pdf(image_paths, texts, output_path):
    # 构建配置文件
    config = {
        "pages": [
            {"image": img, "text": txt} 
            for img, txt in zip(image_paths, texts)
        ],
        "layout": {
            "page_width": 210,
            "page_height": 297,
            "margin": 10,
            "image_height": 180,
            "font_size": 12
        }
    }
    
    # 保存临时配置文件
    config_path = "temp_config.json"
    with open(config_path, 'w', encoding='utf-8') as f:
        json.dump(config, f, ensure_ascii=False, indent=2)
    
    # 调用 formPDF.exe
    subprocess.run([
        "formPDF.exe",
        "--config", config_path,
        "--output", output_path
    ], check=True)
    
    # 清理临时文件
    os.remove(config_path)

打包资源

scripts/

  • text_processor.py:文本读取与分割工具
  • comic_generator.py:调用图像生成、管理页面编辑的主脚本

tools/

  • formPDF.exe:PDF 生成工具(接受 JSON 配置生成 PDF)
  • formPDF.py:PDF 生成工具源码(可用 PyInstaller 自行打包)

references/

  • prompt_guide.md:素描/彩绘风格 prompt 构建指南
  • editing_workflow.md:单页编辑的详细流程

assets/

  • layout_template.pdf:漫画页面布局参考(可选)

注意事项

  1. 图像生成成本:每页漫画都需要调用 image_generate,生成多页时需提醒用户可能耗时。
  2. 文字长度:过长的描述文字可能影响图像生成效果,建议用户精简场景描述。
  3. 文件管理:生成的图像文件应妥善保存于临时目录,PDF 输出后可按用户意愿清理。
  4. 错误处理:图像生成失败时应有重试机制;PDF 生成失败时提供错误信息。

示例对话

用户:“帮我将这段故事变成漫画,要彩绘风格。”

Agent:

  1. 询问输入方式(直接输入或文件)
  2. 获取文本后询问分割方式(按段落)
  3. 确认选择彩绘风格
  4. 开始为每个段落生成图像
  5. 展示预览,询问是否编辑任何页面
  6. 确认后生成 PDF 并交付

Skill 创建者:焊枪 最后更新:2025-03-11

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 漫画生成器 AI skill do?

将描述性文字转换为漫画页面的完整工作流。支持素描(黑白线稿)和彩绘(彩色漫画)两种风格,可从直接输入或文件(.docx、.txt)读取文字,生成后可编辑单页,最终输出为 PDF 文档。

Why use 漫画生成器 on TypingMind?

Because you install it once and use it with any model. 漫画生成器 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 漫画生成器 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/NanjingHJLP/hjlp-skills/tree/main/skills/comic-generator. 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 漫画生成器?

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 漫画生成器?

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

Is the 漫画生成器 AI skill free?

It is published on GitHub by NanjingHJLP. Check the repository for licensing terms. 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 👇