Agent skill

Webnovel Export

by lujih in lujih/webnovel-writer-opencode

将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。

GPL-3.0Auto-check passedDocuments & Office

Install Webnovel Export

skills CLI
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-export -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lujih/webnovel-writer-opencode webnovel-export --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/webnovel-export .claude/skills/webnovel-export && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
webnovel-export
GitHub stars
214
Token cost
~1.1k tokens
SKILL.md length
213 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
GPL-3.0

At a glance

将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。

  • Works in 4 steps: :确认参数 → :列出章节 → :导出 → …
  • Tasks that involve Word documents
  • SKILL.md covers 目标, 支持格式, 环境设置 and 执行流程, plus 4 more sections
  • Calls python and pip

What it does

Webnovel Export is an agent skill from lujih/webnovel-writer-opencode. 将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode

It sits in Documents & Office, covering Word documents, PDF and Markdown. It works with Microsoft Word and python-docx. The repository describes itself as: 本项目是基于webnovel-writer 改编的 OpenCode 版本,目标是让用户在OpenCode 使用长篇网文创作系统,解决 AI 写作中的「遗忘」和「幻觉」问题,支持 200 万字量级 连载创作。 The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Word documents
  • Tasks that involve PDF
  • Tasks that involve Markdown

Example prompts

  • “/webnovel-export”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): opencode

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. :确认参数
  2. :列出章节
  3. :导出
  4. :验证

What it can do on your machine

Read from SKILL.md and the folder at commit da00b7a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    opencode

    From compatibility in the SKILL.md frontmatter.

Context cost

Webnovel Export loads about 1.1k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 213 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lujih/webnovel-writer-opencode at commit da00b7a, republished under its GPL-3.0 licence (© lujih). 213 words, ~1,062 tokens.

Download SKILL.mdSave it as .claude/skills/webnovel-export/SKILL.md (or your agent's skills folder).
name
webnovel-export
description
将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。
compatibility
opencode

正文导出

目标

将网文正文导出为多种格式,便于发布或存档。导出是只读操作,不修改项目文件。

支持格式

格式扩展名依赖说明
Markdown.md无原文拼接,适合存档
TXT.txt无纯文本,去 Markdown 标记
EPUB.epubebooklib电子书,带目录 + CSS 排版
HTML.html无单文件网页,内嵌 CSS + 目录
DOCX.docxpython-docxWord 文档,中文排版(首行缩进)
PDF.pdfweasyprint(可选)印刷品质,自动分页

环境设置

bash
export SCRIPTS_DIR="${PWD}/.opencode/scripts"
test -d "${SCRIPTS_DIR}" || { echo "错误: 未找到 ${SCRIPTS_DIR},请确保当前目录是 webnovel-writer 仓库根目录"; exit 1; }

export PROJECT_ROOT="$(python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PWD}" where)"
test -n "$PROJECT_ROOT" && test -f "${PROJECT_ROOT}/.webnovel/state.json" || { echo "错误: PROJECT_ROOT 解析失败,请用 --project-root 显式指定"; exit 1; }
echo "项目路径: ${PROJECT_ROOT}"

test -d "${PROJECT_ROOT}/正文" || { echo "错误: ${PROJECT_ROOT}/正文/ 不存在,无章节可导出"; exit 1; }

执行流程

Step 0:确认参数

若用户指令未明确包含以下参数,必须先询问用户:

参数何时询问选项
格式用户未指定导出格式Markdown / TXT / EPUB / HTML / DOCX / PDF
范围用户未指定章节范围全部 / 指定范围(1-50)/ 指定卷
书名未指定且需元数据(EPUB/PDF/HTML)默认项目目录名
作者EPUB/DOCX/PDF 未指定—
CSS用户提到"排版""样式"默认内置中文排版 CSS

明确指令示例(直接执行):

  • "导出为 EPUB" → 格式明确
  • "导出第 1-50 章为 DOCX" → 格式和范围明确
  • "导出全部为 PDF" → 格式和范围明确

模糊指令示例(必须询问):

  • "导出小说" → 格式不明
  • "导出" → 所有参数不明
  • "下载小说" → 同上

推荐一次性告知所有格式让用户选择,减少来回。

Step 1:列出章节
bash
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export list

确认章节数量和范围。

Step 2:导出
bash
# Markdown
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format md

# TXT
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format txt

# EPUB(需 ebooklib)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format epub --author "作者名"

# HTML(单文件,含目录和内嵌 CSS)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format html

# DOCX(中文排版:首行缩进、宋体、1.8 倍行距)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format docx --author "作者名"

# PDF(需 weasyprint,未安装时提示安装)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format pdf

# 指定范围
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format docx --range 1-50

# 按卷导出
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format epub --volume 1

# 自定义样式
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format html --style "${PROJECT_ROOT}/export-style.css"

# 自定义输出路径
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" export export --format txt --output "${PROJECT_ROOT}/导出/第一卷.txt"
Step 3:验证
bash
ls -la "${PROJECT_ROOT}/导出/" && echo "导出完成"

参数说明

参数说明适用格式默认值
--formatmd / txt / epub / html / docx / pdf全部md
--range1-50 / 1,3,5 / all全部all
--volume按卷导出(覆盖 --range)全部—
--output输出文件路径全部导出/{书名}.{ext}
--title书名(元数据)全部项目目录名
--author作者名EPUB/DOCX/PDF—
--cover封面图路径EPUB图片/封面/ 下最新
--cover-size封面裁剪尺寸EPUB1200x1600
--style自定义 CSS 路径EPUB/HTML/PDF内置中文排版 CSS

CSS 自定义

项目根目录放置 export-style.css 自动生效。默认排版:

  • 首行缩进 2em
  • 1.8 倍行距
  • 章节标题居中
  • 场景分隔符 * * *
  • 思源宋体 / 宋体

充分性闸门

  • 正文/ 目录存在且有章节文件
  • 导出命令返回码为 0
  • 导出/ 下有非空输出文件

常见问题

错误原因解决
未找到章节正文/ 目录不存在先用 /webnovel-write 写章节
EPUB 导出失败ebooklib 未安装pip install ebooklib
DOCX 导出失败python-docx 未安装pip install python-docx
PDF 导出失败weasyprint 未安装pip install weasyprint
封面未裁剪Pillow 未安装pip install Pillow,不影响导出
HTML 排版异常CSS 编码问题确保 export-style.css 为 UTF-8

© lujih, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .opencode/skills/webnovel-export of lujih/webnovel-writer-opencode.

Open the folder on GitHubat commit da00b7a

Compare with similar skills

Webnovel Export next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Webnovel Export compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Webnovel Export this skilllujih/webnovel-writer-opencode214—~1.1kAutomated safety check: PassGPL-3.0
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Gzh Designisjiamu/gzh-design-skill3.9k1 repos~2.2kAutomated safety check: PassAGPL-3.0
Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html908—~4.8kAutomated safety check: PassMIT
Markdown to Word Convertercat-xierluo/SuitAgent206—~559Automated safety check: PassMIT
Doc Cleanernotoriouslab/doc-cleaner309—~712Automated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed
  • Huashu Markdown Publishing Pipeline

    alchaincyf/huashu-md-html

    Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.

    908 GitHub stars~4.8k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Markdown to Word Converter

    cat-xierluo/SuitAgent

    Converts Markdown files into Word documents formatted to Chinese typesetting conventions, with presets for academic, legal, report and book layouts.

    206 GitHub stars~559 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Doc Cleaner

    notoriouslab/doc-cleaner

    Convert PDF, DOCX, XLSX, and text files to clean, structured Markdown.

    309 GitHub stars~712 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    122 GitHub stars~504 tokensUpdated 14 days ago
    Documents & OfficeAuto-check passed

More from lujih/webnovel-writer-opencode

All 14 skills in this repo
  • Webnovel Init

    lujih/webnovel-writer-opencode

    深度初始化网文项目。通过分阶段交互收集完整创作信息,生成可直接进入规划与写作的项目骨架与约束文件. An agent skill from lujih/webnovel-writer-opencode.

    214 GitHub stars~2.8k tokensUpdated 2 days ago
    Auto-check passed
  • Webnovel Query

    lujih/webnovel-writer-opencode

    查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询. An agent skill from lujih/webnovel-writer-opencode.

    214 GitHub stars~846 tokensUpdated 2 days ago
    Auto-check passed
  • Webnovel Write Batch

    lujih/webnovel-writer-opencode

    连续写作多章。当用户要求多章写作时必须使用此 skill. An agent skill from lujih/webnovel-writer-opencode.

    214 GitHub stars~3.8k tokensUpdated 2 days ago
    Auto-check passed
  • Webnovel Heal

    lujih/webnovel-writer-opencode

    修复问题章节——诊断、清理脏实体、重审查、重提交。触发:章节断裂、OOC偏离、设定矛盾修复. An agent skill from lujih/webnovel-writer-opencode.

    214 GitHub stars~524 tokensUpdated 2 days ago
    Auto-check passed
  • Webnovel Publish

    lujih/webnovel-writer-opencode

    将小说章节自动发布到国内主流小说平台(番茄等)。触发条件:"发布小说"、"发布章节"、"上传到番茄"、"自动发布"、"清理草稿"、"发布草稿"。

    214 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Webnovel Delete

    lujih/webnovel-writer-opencode

    安全删除指定章节并清理关联投影数据(state/memory)。支持 dry-run 预览。触发:删除章节、回退写作、清理烂章。

    214 GitHub stars~301 tokensUpdated 2 days ago
    Auto-check passed

Questions about Webnovel Export

What does Webnovel Export do?

将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。. Webnovel Export is an agent skill from lujih/webnovel-writer-opencode.

When should I use Webnovel Export?

Webnovel Export fits situations like: tasks that involve Word documents; tasks that involve PDF; tasks that involve Markdown.

How do I install Webnovel Export in Claude Code?

Run `npx skills add lujih/webnovel-writer-opencode --skill webnovel-export -a claude-code`. Or copy the skill folder (.opencode/skills/webnovel-export in lujih/webnovel-writer-opencode) into .claude/skills/webnovel-export in your project. Claude Code loads it when a task matches its description.

How do I install Webnovel Export in Codex?

Run `npx skills add lujih/webnovel-writer-opencode --skill webnovel-export -a codex`. Or copy the skill folder (.opencode/skills/webnovel-export in lujih/webnovel-writer-opencode) into .agents/skills/webnovel-export in your project. Codex loads it when a task matches its description.

Can I use Webnovel Export in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lujih/webnovel-writer-opencode --skill webnovel-export -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/webnovel-export, .gemini/skills/webnovel-export, .github/skills/webnovel-export and .opencode/skills/webnovel-export in your project.

What does Webnovel Export need to run?

Going by SKILL.md and its folder, Webnovel Export needs the command-line tools its instructions call (python and pip). Our summary lists: Python 3. Compatibility (from SKILL.md): opencode.

Does Webnovel Export access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Webnovel Export safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Webnovel Export use?

Webnovel Export is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Webnovel Export use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Webnovel Export?

Skills that share tags, products or a category with Webnovel Export: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 3.9k stars), Huashu Markdown Publishing Pipeline (alchaincyf/huashu-md-html, 908 stars) and Markdown to Word Converter (cat-xierluo/SuitAgent, 206 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Webnovel Export?

lujih (a GitHub user) maintains it in lujih/webnovel-writer-opencode, which has 214 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: lujih/webnovel-writer-opencode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.