Agent skill

Webnovel Publish

by lujih in lujih/webnovel-writer-opencode

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

GPL-3.0Auto-check passedWriting & Content

Install Webnovel Publish

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

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

GitHub CLI
$ gh skill install lujih/webnovel-writer-opencode webnovel-publish --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-publish .claude/skills/webnovel-publish && 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-publish
GitHub stars
214
Token cost
~1.5k tokens
SKILL.md length
245 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
GPL-3.0

At a glance

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

  • Works in 6 steps: :确认参数 → :首次配置(登录) → :查看书单 → …
  • Writing & Content work in your project
  • SKILL.md covers 目标, 支持平台, 环境设置 and 交互式流程, plus 6 more sections
  • Calls python, playwright and pip

What it does

Webnovel Publish is an agent skill from lujih/webnovel-writer-opencode. 将小说章节自动发布到国内主流小说平台(番茄等)。触发条件:"发布小说"、"发布章节"、"上传到番茄"、"自动发布"、"清理草稿"、"发布草稿"。

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `使用说明.md`). Compatibility notes: opencode

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

When your agent uses it

  • Writing & Content work in your project

Example prompts

  • “/webnovel-publish”

Requirements

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

Workflow steps

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

  1. :确认参数
  2. :首次配置(登录)
  3. :查看书单
  4. :创建新书
  5. :上传章节
  6. :草稿管理(新增功能)

What it can do on your machine

Read from SKILL.md and the folder at commit 853bf48. 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
    • playwright
    • 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 Publish loads about 1.5k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 245 words of instructions outside code blocks.

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

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 853bf48, republished under its GPL-3.0 licence (© lujih). 245 words, ~1,510 tokens.

Download SKILL.mdSave it as .claude/skills/webnovel-publish/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
webnovel-publish
description
将小说章节自动发布到国内主流小说平台(番茄等)。触发条件:"发布小说"、"发布章节"、"上传到番茄"、"自动发布"、"清理草稿"、"发布草稿"。
compatibility
opencode

小说自动发布

目标

将已完成小说章节自动发布到目标平台。首次需手动扫码登录,后续全自动运行。

支持平台

平台标识认证方式状态
番茄小说fanqie扫码登录(一次)可用
七猫小说qimao扫码登录(一次)实验性

环境设置

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}"

python -c "import playwright" 2>/dev/null || { echo "请先安装: pip install playwright && playwright install chromium"; exit 1; }

交互式流程

Step 0:确认参数

若用户指令模糊,按优先级询问:

优先级参数何时必须询问选项
1平台未指定平台fanqie / qimao
2操作未指定操作首次配置 / 创建新书 / 上传章节
3book_id上传时未绑定书籍输入 ID 或书名
4范围未指定章节范围全部 / 指定范围
5模式未指定当前仅支持草稿(draft)

可直接执行:

  • "发布到番茄" → 平台明确,进入菜单流程
  • "上传第 90-95 章" → 操作和范围明确
  • "发布全部到番茄" → 平台和范围明确
Step 1:首次配置(登录)
bash
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish setup-auth --platform fanqie

弹出浏览器窗口,扫码登录后自动保存认证状态。后续无需重复。
认证存储在 ~/.webnovel-publish/browser_data/{platform}/。

Step 2:查看书单
bash
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish list-books --platform fanqie

确认目标书籍是否存在,获取 book_id。

Step 3:创建新书
bash
# 交互式(会询问书名、简介)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish create-book \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

# 非交互式(跳过确认)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish create-book \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}" \
  --yes \
  --abstract "自定义简介"

自动从 state.json 读取:书名、题材、简介、主角名。
创建成功后自动绑定 book_id 到项目(写入 .webnovel/publish_config.json)。

Step 4:上传章节
bash
# 上传全部(使用项目绑定的 book_id)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish upload \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

# 指定 book_id 或书名(首次上传自动绑定)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish upload \
  --platform fanqie \
  --book 7631548393474493502 \
  --project-root "${PROJECT_ROOT}"

# 指定范围
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish upload \
  --platform fanqie \
  --range 90-95 \
  --project-root "${PROJECT_ROOT}"

# 跳过交互确认(脚本/CI 环境)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish upload \
  --platform fanqie \
  --yes \
  --project-root "${PROJECT_ROOT}"

已上传章节自动跳过,支持断点续传。
上传日志存储在 ~/.webnovel-publish/upload_log/{project_name}/{platform}_{book_id}.json。

Step 5:草稿管理(新增功能)
5.1 清理重复草稿
bash
# 预览模式(不实际删除,查看哪些章节有重复)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish clean-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}" \
  --dry-run

# 清理重复草稿(同章节号保留最新修改时间的,删除旧版本)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish clean-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

# 跳过确认
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish clean-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}" \
  -y

适用场景:多次上传同一章导致草稿箱有重复,想保留最新版本删除旧版本。

5.2 清空草稿箱
bash
# 清空草稿箱所有章节(跳过已发布的)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish clear-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

适用场景:想清空草稿箱重新开始,但不删除已正式发布的章节。

5.3 删除全部草稿
bash
# 删除草稿箱全部章节(包括已发布的,需二次确认 yes)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish delete-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

# 跳过确认(危险操作)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish delete-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}" \
  -y

危险操作:会删除所有草稿,包括已发布状态的章节,并清除上传记录。

5.4 发布草稿
bash
# 发布草稿箱中的章节(将草稿改为已发布状态)
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish publish-drafts \
  --platform fanqie \
  --range 1-10 \
  --project-root "${PROJECT_ROOT}"

# 发布全部草稿
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" publish publish-drafts \
  --platform fanqie \
  --project-root "${PROJECT_ROOT}"

适用场景:章节已在草稿箱,想批量发布到正式站。
注意:发布时会用草稿箱现有的 item_id,标题和内容从本地文件读取。

参数说明

参数说明默认值
--platform平台标识fanqie
--book书籍 ID 或书名从项目绑定读取
--range章节范围(1-50 / 1,3,5 / all)all
--mode发布模式(当前仅 draft)draft
--yes / -y跳过交互确认—
--dry-run预览模式(仅 clean-drafts 支持)—
--abstract书籍简介(create-book)自动生成
--project-root书项目根目录自动探测

子命令列表

命令功能典型用法
setup-auth扫码登录平台首次使用
list-books列出已有书籍查询 book_id
create-book创建新书自动从项目元数据生成
upload上传章节到草稿箱日常更新
clean-drafts清理重复草稿多次上传同章后去重
clear-drafts清空草稿箱(跳过已发布)重新开始前清理
delete-drafts删除全部草稿(危险)完全清空草稿箱
publish-drafts发布草稿到正式站批量上架

自动绑定机制

  • 首次 create-book 成功后自动绑定 book_id 到 .webnovel/publish_config.json
  • 首次 upload --book <id> 成功后自动持久化绑定
  • 后续 upload 无需传 --book,自动从绑定读取
  • 多书项目:用 --book 指定目标即可

卸载与重置

bash
# 清除认证状态
rm -rf ~/.webnovel-publish/browser_data/

# 清除上传日志
rm -rf ~/.webnovel-publish/upload_log/

# 清除项目绑定
rm "${PROJECT_ROOT}/.webnovel/publish_config.json"

充分性闸门

  • Playwright 已安装且 Chromium 可用
  • 平台认证状态有效
  • 目标书籍 book_id 已知或在书单中
  • 上传日志一致(不会重复上传)
  • 章节文件存在且非空

常见问题

问题解决
登录超时重新运行 setup-auth,3 分钟内扫码
认证过期重新运行 setup-auth(认证目录存在不代表有效)
浏览器不弹检查显示器配置,确保非 headless
Playwright 未安装pip install playwright && playwright install chromium
项目未绑定传 --book <id> 或先 create-book
book_id 不匹配检查是否误用了其他书的 ID
非交互环境报错添加 --yes 跳过确认
草稿箱有重复章节运行 clean-drafts --dry-run 预览,再去掉 --dry-run 执行
想重新上传所有章节先 delete-drafts 删除草稿和上传记录,再重新 upload
草稿上传了但想发布运行 publish-drafts --range <范围>

© 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

SKILL.md and 1 other file in .opencode/skills/webnovel-publish of lujih/webnovel-writer-opencode.

  • SKILL.md
  • 使用说明.md

Open the folder on GitHubat commit 853bf48

Compare with similar skills

Webnovel Publish 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 Publish compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Webnovel Publish this skilllujih/webnovel-writer-opencode214—~1.5kAutomated safety check: PassGPL-3.0
Socialcoreyhaines31/marketingskills54k4 repos~4.5kAutomated safety check: PassMIT
HumanizerAzure-Samples/interview-coach-agent-framework17338 repos~5.8kAutomated safety check: PassMIT
Avoid AI Writingconorbronsdon/avoid-ai-writing4.9k3 repos~8.1kAutomated safety check: PassMIT
JavaScript Concept Fact Checkerleonardomso/33-js-concepts67k1 repos~5kAutomated safety check: PassMIT
User-Facing Text Cleanupguillaumemeyer/watermarks-remover24k—~3.5kAutomated safety check: PassMIT

Similar skills

  • Social

    coreyhaines31/marketingskills

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, or Facebook, or wants to do social listening and engagement triage.

    54k GitHub starsUsed in 4 repos~4.5k tokens
    Writing & ContentAuto-check passed
  • Humanizer

    Azure-Samples/interview-coach-agent-framework

    Official

    Remove signs of AI-generated writing from text. An agent skill from Azure-Samples/interview-coach-agent-framework.

    173 GitHub starsUsed in 38 repos~5.8k tokens
    Writing & ContentAuto-check passed
  • Avoid AI Writing

    conorbronsdon/avoid-ai-writing

    Audit and rewrite content to remove AI writing patterns ("AI-isms").

    4.9k GitHub starsUsed in 3 repos~8.1k tokens
    Writing & ContentAuto-check passed
  • JavaScript Concept Fact Checker

    leonardomso/33-js-concepts

    Verifies the technical accuracy of JavaScript concept pages by checking code examples, MDN and ECMAScript claims and external links through a five-phase method.

    67k GitHub starsUsed in 1 repo~5k tokens
    Writing & ContentAuto-check passed
  • User-Facing Text Cleanup

    guillaumemeyer/watermarks-remover

    Audits prose for invisible Unicode characters and rewrites it while keeping facts, citations, code and required disclosures unchanged and the writer's voice intact.

    24k GitHub stars~3.5k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Install Anti Slop

    trycompai/crm

    Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository.

    11k GitHub starsUsed in 1 repo~881 tokens
    Writing & ContentAuto-check passed

More from lujih/webnovel-writer-opencode

All 15 skills in this repo
  • Webnovel Init

    lujih/webnovel-writer-opencode

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

    214 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Webnovel Query

    lujih/webnovel-writer-opencode

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

    214 GitHub stars~846 tokensUpdated yesterday
    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 yesterday
    Auto-check passed
  • Webnovel Export

    lujih/webnovel-writer-opencode

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

    214 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Webnovel Heal

    lujih/webnovel-writer-opencode

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

    214 GitHub stars~524 tokensUpdated yesterday
    Auto-check passed
  • Webnovel Delete

    lujih/webnovel-writer-opencode

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

    214 GitHub stars~301 tokensUpdated yesterday
    Auto-check passed

Questions about Webnovel Publish

What does Webnovel Publish do?

将小说章节自动发布到国内主流小说平台(番茄等)。触发条件:"发布小说"、"发布章节"、"上传到番茄"、"自动发布"、"清理草稿"、"发布草稿"。. Webnovel Publish is an agent skill from lujih/webnovel-writer-opencode.

When should I use Webnovel Publish?

Webnovel Publish fits situations like: writing & Content work in your project.

How do I install Webnovel Publish in Claude Code?

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

How do I install Webnovel Publish in Codex?

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

Can I use Webnovel Publish 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-publish -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-publish, .gemini/skills/webnovel-publish, .github/skills/webnovel-publish and .opencode/skills/webnovel-publish in your project.

What does Webnovel Publish need to run?

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

Does Webnovel Publish 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 Publish 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 Publish use?

Webnovel Publish 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 Publish use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Publish?

Skills that share tags, products or a category with Webnovel Publish: Social (coreyhaines31/marketingskills, 54k stars), Humanizer (Azure-Samples/interview-coach-agent-framework, 173 stars), Avoid AI Writing (conorbronsdon/avoid-ai-writing, 4.9k stars) and JavaScript Concept Fact Checker (leonardomso/33-js-concepts, 67k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Webnovel Publish?

lujih (a GitHub user) maintains it in lujih/webnovel-writer-opencode, which has 214 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 9, 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.