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.
连续写作多章。当用户要求多章写作时必须使用此 skill. An agent skill from lujih/webnovel-writer-opencode.
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batch --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-write-batch .claude/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.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/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .claude/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batchType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batch --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/webnovel-write-batch .agents/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .agents/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batch --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/webnovel-write-batch .cursor/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .cursor/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lujih/webnovel-writer-opencode.git --path .opencode/skills/webnovel-write-batch--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batch --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/webnovel-write-batch .gemini/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .gemini/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batchInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/webnovel-write-batch .github/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .github/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lujih/webnovel-writer-opencode webnovel-write-batch --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lujih/webnovel-writer-opencode.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/webnovel-write-batch .opencode/skills/webnovel-write-batch && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "webnovel-write-batch" agent skill from https://github.com/lujih/webnovel-writer-opencode/tree/master/.opencode/skills/webnovel-write-batch into .opencode/skills/webnovel-write-batch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "webnovel-write-batch", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
webnovel-write-batch连续写作多章。当用户要求多章写作时必须使用此 skill. An agent skill from lujih/webnovel-writer-opencode.
Webnovel Write Batch is an agent skill from lujih/webnovel-writer-opencode. 连续写作多章。当用户要求多章写作时必须使用此 skill。 触发条件 - "连续写N章"、"写第X-Y章"、"批量写X-Y章"、"一次写N章" - "重写第X-Y章"、"修改第X-Y章" - "多章"、"多章节" 区分规则 - 单章 → webnovel-write - 多章 → 必须使用本 skill
Its SKILL.md is about 3.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/batch-protocol.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.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit da00b7a. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
opencode
From compatibility in the SKILL.md frontmatter.
Webnovel Write Batch loads about 3.8k tokens when it runs, and up to ~6.5k if it reads all its reference files. Until then it costs about 45 tokens; SKILL.md has 342 words of instructions outside code blocks.
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.
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.
The full file from lujih/webnovel-writer-opencode at commit da00b7a, republished under its GPL-3.0 licence (© lujih). 342 words, ~3,819 tokens.
.claude/skills/webnovel-write-batch/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.以下规则针对 AI 在长循环中的已知偷懒模式。逐章执行前必须重现此清单。
| # | 禁止 | 正确做法 |
|---|---|---|
| 1 | 口头描述代替 Agent() 调用 | 必须使用 Agent 工具调用 context-agent / chapter-writer-agent / reviewer / data-agent |
| 2 | 跳过审查 | 每章必须运行 reviewer Agent + review-pipeline。blocking=false 也不能跳过 |
| 3 | 用 Read 工具代替验证命令 | 每步后必须运行 bash 验证命令(test -s / ls / python -c) |
| 4 | "稍后更新" batch_state | 每章完成后立即用 python -c 写 JSON,写完后重新读取验证 |
| 5 | 章数多了开始跳步/简化流程 | 每章必须完整执行本 skill 的 9 步,不得缩减。3 章后强制暂停 |
| 6 | 子代理失败后假装成功 | 每个 Agent() 调用后检查输出文件是否存在且非空。失败重试 1 次→仍失败则停止 |
| 7 | 审查和润色合并执行 | chapter-writer-agent 先写正文 → reviewer 审查 → 有 blocking 则回传修复。禁止在审查前自行修改 |
| 8 | 用简化版代替完整单章流程 | 每章 = 完整闭环。chapter-writer-agent 在干净上下文中执行创作,质量等同于单章 |
export SCRIPTS_DIR="${PWD}/.opencode/scripts"
export SKILL_ROOT="${PWD}/.opencode/skills/webnovel-write"
test -d "${SCRIPTS_DIR}" || { echo "错误: 未找到 ${SCRIPTS_DIR},请确保当前目录是 webnovel-writer 仓库根目录"; exit 1; }
export PYTHONUTF8=1
export PROJECT_ROOT="$(python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PWD}" where)"
# 归一化为正斜杠,避免路径中的 \b \n 等在 python -c 中被转义
export PROJECT_ROOT="${PROJECT_ROOT//\\//}"
test -n "$PROJECT_ROOT" && test -f "${PROJECT_ROOT}/.webnovel/state.json" || { echo "错误: PROJECT_ROOT 解析失败,请用 --project-root 显式指定"; exit 1; }禁止依赖 state.json 的 current_chapter 或对话记忆来确定起始章号。 章节文件是唯一真源。
LATEST=$(python -c "
import re
from pathlib import Path
text_dir = Path('${PROJECT_ROOT}') / '正文'
nums = []
for f in text_dir.rglob('第*章*.md'):
m = re.match(r'第0*(\d+)章', f.name)
if m:
nums.append(int(m.group(1)))
print(max(nums) if nums else 0)
")
echo "最新章节: 第${LATEST}章"若无法解析,询问用户明确范围。上限 3 章(可通过 --force 参数绕过,上限 5 章)。
BATCH_STATE="${PROJECT_ROOT}/.webnovel/batch_state.json"
if [ -f "$BATCH_STATE" ]; then
STATUS=$(python -c "import json; print(json.load(open('$BATCH_STATE',encoding='utf-8-sig')).get('status',''))")
if [ "$STATUS" = "running" ]; then
echo "检测到未完成的批量任务"
python -c "
import json
s = json.load(open('$BATCH_STATE', encoding='utf-8-sig'))
print(f' 已完成: 第{s[\"completed_chapters\"]}章')
print(f' 待恢复: 第{s[\"current_chapter\"]}章')
"
# 询问用户:继续 / 重新开始 / 放弃
elif [ "$STATUS" = "completed" ]; then
echo "上一次批量任务已完成。"
# 询问是否开始新批次
fi
fiif [ ! -f "$BATCH_STATE" ] || [ "$STATUS" != "running" ]; then
python -c "
import json, datetime
s = {
'task_id': f'batch_{datetime.datetime.now(datetime.timezone.utc).strftime(\"%Y%m%d_%H%M%S\")}',
'range': {'start': $S, 'end': $E},
'status': 'paused',
'current_chapter': $S,
'completed_chapters': [],
'failed_chapters': [],
'chapter_results': {},
'created_at': datetime.datetime.now(datetime.timezone.utc).isoformat()
}
open('$BATCH_STATE', 'w', encoding='utf-8').write(json.dumps(s, ensure_ascii=False, indent=2))
"
fi在进入逐章循环前执行一次 preflight,后续各章不再重复。
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" preflight每章 = 9 步完整闭环。创作在独立 subagent 干净上下文中执行。
步骤映射: 0=环境变量验证, A=上章完整性, 1=刷新合同, 1b=结构自检, 2=context-agent, 3=写作, 4=审查, 5=review-pipeline, 6=修复轮, 7=data-agent, 8=commit+验证, 9=更新状态
□ 0. 环境变量验证
□ A. 上章完整性检查(N > S 时)
□ 1. 刷新合同树
□ 1b. 结构自检
□ 2. Agent(context-agent) → 写作任务书
□ 3. Agent(chapter-writer-agent) → 起草+润色
□ 4. Agent(reviewer) → 审查结果
□ 5. review-pipeline → 判定 blocking
□ 6. blocking? → 提取反馈 → 回到 3(最多 2 轮)
□ 7. Agent(data-agent) → 事实提取
□ 8. chapter-commit + 验证投影 + Git 备份
□ 9. 更新 batch_state + 进度反馈每步执行前打印进度标识:
echo "[Ch{N} Step {M}/9] {step_name}..."test -n "$PROJECT_ROOT" || { echo "❌ PROJECT_ROOT 未设置"; exit 1; }
test -n "$SCRIPTS_DIR" || { echo "❌ SCRIPTS_DIR 未设置"; exit 1; }
test -d "$PROJECT_ROOT" || { echo "❌ PROJECT_ROOT 目录不存在: $PROJECT_ROOT"; exit 1; }
test -d "${PROJECT_ROOT}/.webnovel" || { echo "❌ ${PROJECT_ROOT}/.webnovel 不存在,PROJECT_ROOT 可能不正确"; exit 1; }
echo "✅ PROJECT_ROOT=${PROJECT_ROOT}"状态门: 若 batch_state.status 为 "paused",输出进度摘要并等待用户输入 "继续" 才将 status 改为 "running"。
if [ "$N" -gt "$S" ]; then
PREV=$((N - 1))
CHAPTER_FILE=$(python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" chapter-path --chapter $PREV)
if [ ! -s "${PROJECT_ROOT}/${CHAPTER_FILE}" ]; then
echo "❌ 第${PREV}章文件缺失。立即停止。"
exit 1
fi
IN_BATCH=$(python -c "import json; s=json.load(open('$BATCH_STATE',encoding='utf-8-sig')); print($PREV in s.get('completed_chapters',[]))")
if [ "$IN_BATCH" != "True" ]; then
echo "❌ 第${PREV}章未在 batch_state 中标记完成。立即停止。"
exit 1
fi
echo "✅ 第${PREV}章完整性检查通过"
fipython -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" placeholder-scan --format textgenre 从 .webnovel/state.json 的初始化配置快照读取。调用 story-system 前必须先从详细大纲解析真实本章目标,禁止传 {章纲目标}、第N章章纲目标 等占位 query。
# 用 skill_runner 传递 CJK,genre 自动从 state.json 读取,goal 从 stdin 传入
echo "${CHAPTER_GOAL}" | python -X utf8 "${SCRIPTS_DIR}/skill_runner.py" story-system \
--project-root "${PROJECT_ROOT}" --chapter {N}
if [ $? -ne 0 ]; then
echo "❌ story-system 合同刷新失败,阻断流程"
exit 1
fi必备文件:MASTER_SETTING.json、volume_{NNN}.json、chapter_{NNN}.review.json。缺失则阻断。
chapter_{NNN}.json 必须优先检查顶层 chapter_directive。chapter_focus 只能来自 chapter_directive.goal 或真实 query,不得从 dynamic_context 的参考摘要继承。
# 从章纲提取 intended_strand(统一小写,避免大小写不匹配)
INTENDED_STRAND=$(python -c "
import json
contract_file = '${PROJECT_ROOT}/.story-system/chapters/chapter_$(printf '%03d' {N}).json'
try:
d = json.load(open(contract_file))
s = d.get('chapter_directive', {}).get('strand', '')
print(s.strip().lower())
except: pass
")
python -X utf8 "${SCRIPTS_DIR}/skill_runner.py" check-structural \
--project-root "${PROJECT_ROOT}" --chapter {N} --intended-strand "${INTENDED_STRAND}" --format json \
--output "${PROJECT_ROOT}/.webnovel/tmp/structural_check.json"python -c "
import json, sys
d = json.load(open('${PROJECT_ROOT}/.webnovel/tmp/structural_check.json'))
if not d.get('passed'):
print('❌ 结构自检未通过,停止流程')
for c in d['checks']:
if c['severity'] == 'blocking' and not c['passed']:
print(f' BLOCKING: {c[\"name\"]}: {c[\"detail\"]}')
print(f' FIX: {c[\"fix\"]}')
sys.exit(1)
" || exit 1
# (use $? check for PowerShell compatibility)必须使用 Agent 工具调用 context-agent,不得由主流程自行整理。
Agent(
subagent_type: "context-agent",
prompt: "chapter={N}; project_root=${PROJECT_ROOT}; scripts_dir=${SCRIPTS_DIR}; storage_path=${PROJECT_ROOT}/.webnovel; state_file=${PROJECT_ROOT}/.webnovel/state.json(projection/read-model,仅兼容读取)。先 research,再按 本章硬性约束→CBN/CPNs/CEN→本章禁区→风格指引→dynamic_context补充参考 的顺序输出五段写作任务书。"
)验证:任务书非空且包含"硬性约束"或"CBN"字样。失败或返回空→重试 1 次→仍失败则停止。
核心变更:原来主线程的起草(Step 3)和润色(Step 5)合并为一次 Agent 调用,在干净上下文中完成完整创作闭环。
传入 prompt 结构:
Agent(
subagent_type: "chapter-writer-agent",
prompt: """
【章节】第{N}章
【字数】2000-2500 字
【写作任务书】
{context-agent 产出的完整任务书}
【章纲约束】
{从 chapter_{NNN}.json 提取的 chapter_directive.goal / time_anchor / countdown / chapter_end_open_question / must_cover_nodes / forbidden_zones}
【润色指南】
- 风格适配:与 MASTER_SETTING 保持一致的人称/视角/叙事距离
- 排版:标题格式 `## 第{NNNN}章 标题`,段落间空行,对话分行
- Anti-AI 终检:消除"不是...而是..."句式、段落首尾总结句、冗余"突然/忽然"、机械动作罗列、直接情感告知
【审查反馈】
(首轮为空。修复轮时填入:)
- [{category}] {description} (位置: {location})
"""
)验证:
CHAPTER_PATH=$(python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" chapter-path --chapter {N})
CHAPTER_FILE="${PROJECT_ROOT}/${CHAPTER_PATH}"
test -s "$CHAPTER_FILE" || { echo "❌ 章节文件为空"; exit 1; }
WORDS=$(python -c "
import re
t = open('$CHAPTER_FILE', encoding='utf-8').read()
print(len(re.findall(r'[一-鿿]', t)))
")
echo "字数: $WORDS"
if [ "$WORDS" -lt 1500 ]; then
echo "⚠️ 字数不足 1500"
fi字数不足→重试 chapter-writer-agent(提示字数不足)。仍不足→标记 warning 继续。
必须使用 Agent 工具调用 reviewer,不得由主流程伪造审查 JSON。
Agent(
subagent_type: "reviewer",
prompt: "chapter={N}; chapter_file=${CHAPTER_FILE}; project_root=${PROJECT_ROOT}; scripts_dir=${SCRIPTS_DIR}; REVIEW_OUTPUT=${PROJECT_ROOT}/.webnovel/tmp/review_results.json。
【自检系统状态 - 审查时需额外关注】
$(echo "$CHECK_RESULT" | python -c "
import json,sys
d=json.load(sys.stdin)
warnings=[c for c in d['checks'] if c['severity']=='warning' and not c['passed']]
if warnings:
for w in warnings:
print(f'- {w[\"name\"]}: {w[\"detail\"]}')
else:
print('(无异常)')
")
严格输出 reviewer schema JSON,并保存到 ${PROJECT_ROOT}/.webnovel/tmp/review_results.json。"
)python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" review-pipeline \
--chapter {N} \
--review-results "${PROJECT_ROOT}/.webnovel/tmp/review_results.json" \
--metrics-out "${PROJECT_ROOT}/.webnovel/tmp/review_metrics.json" \
--report-file "审查报告/第{N}章审查报告.md" \
--save-metrics验证审查结果:
python -c "
import json
d = json.load(open('${PROJECT_ROOT}/.webnovel/tmp/review_results.json'))
assert isinstance(d, dict), 'review_results 不是 JSON 对象'
blocking_count = len([i for i in d.get('issues',[]) if i.get('severity')=='blocking'])
print(f'blocking: {blocking_count}, score: {d.get(\"score\",\"unknown\")}')
"blocking_count > 0 → 进入修复轮(最多 2 轮)
修复轮流程:
round = 0
while blocking_count > 0 and round < 2:
1. 从 review_results.json 提取 blocking issues 文本:
python -c "import json; d=json.load(open('${PROJECT_ROOT}/.webnovel/tmp/review_results.json')); [print(f\"- [{i.get('category','')}] {i.get('description','')} (位置: {i.get('location','')})\") for i in d.get('issues',[]) if i.get('severity')=='blocking']"
2. Agent(chapter-writer-agent) 修复模式
将提取的 issue 列表填入 prompt 的【审查反馈】部分
prompt 明确指出:"修复模式:只修改上述审查反馈指出的具体问题,不大面积重写。保留未涉及部分的原文。"
python -X utf8 "${SCRIPTS_DIR}/skill_runner.py" clean-tmp --project-root "${PROJECT_ROOT}"
3. Agent(reviewer) 重新审查
→ 覆盖更新 review_results.json
4. review-pipeline 重新判定 blocking
5. round += 1
if blocking_count > 0:
标记本章 failed,记录 blocking issues 到 batch_state,继续下一章
else:
阻塞已清除,继续 Step 7必须使用 Agent 工具调用 data-agent,不得跳过或手动模拟。
# 清空旧 tmp 文件,保留 review_results.json(chapter-commit 仍需)
python -X utf8 "${SCRIPTS_DIR}/skill_runner.py" clean-tmp --project-root "${PROJECT_ROOT}" --keep review_results.jsonAgent(
subagent_type: "data-agent",
prompt: "chapter={N}; chapter_file=${CHAPTER_FILE}; project_root=${PROJECT_ROOT}; scripts_dir=${SCRIPTS_DIR}。从正文提取事实,生成 .webnovel/tmp/ 下的 fulfillment_result.json、disambiguation_result.json、extraction_result.json;不直接写 state/index/summaries/memory。"
)验证输出文件:
for f in fulfillment_result.json disambiguation_result.json extraction_result.json; do
FP="${PROJECT_ROOT}/.webnovel/tmp/${f}"
if [ ! -s "$FP" ]; then
echo "❌ 缺失: $f"
else
echo "✅ $f ($(wc -c < $FP) bytes)"
fi
done任一缺失→重试 Agent 调用 1 次。仍缺失→标记 failed 并停止。
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" chapter-commit \
--chapter {N} \
--review-result "${PROJECT_ROOT}/.webnovel/tmp/review_results.json" \
--fulfillment-result "${PROJECT_ROOT}/.webnovel/tmp/fulfillment_result.json" \
--disambiguation-result "${PROJECT_ROOT}/.webnovel/tmp/disambiguation_result.json" \
--extraction-result "${PROJECT_ROOT}/.webnovel/tmp/extraction_result.json"自动判定:blocking_count>0 或 missed_nodes 非空 或 pending 非空 → rejected,否则 accepted。
验证投影:projection_status 五项(state/index/summary/memory/vector)全部 done 或 skipped。
失败隔离:commit 未生成→重跑 2 次。projection 失败→只补跑失败项。不回退 Step 1-7。
python -X utf8 "${SCRIPTS_DIR}/skill_runner.py" verify-chapter-files \
--project-root "${PROJECT_ROOT}" --chapter {N} \
|| { echo "❌ 写后校验失败"; exit 1; }python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" backup \
--chapter {N} \
--chapter-title "{title}"备份必须以解析后的 PROJECT_ROOT 为准,禁止从工作区父目录执行裸全量 Git add。
python -c "
import json, pathlib, datetime
# 读取审查得分
review_path = '${PROJECT_ROOT}/.webnovel/tmp/review_results.json'
score = json.load(open(review_path)).get('score', 0)
# 更新 batch_state
p = pathlib.Path('$BATCH_STATE')
s = json.loads(p.read_text())
if $N not in s['completed_chapters']:
s['completed_chapters'].append($N)
s['current_chapter'] = $N + 1
s['chapter_results'][str($N)] = {
'status': 'success',
'score': score,
'words': $WORDS,
'completed_at': datetime.datetime.now(datetime.timezone.utc).isoformat()
}
p.write_text(json.dumps(s, ensure_ascii=False, indent=2))
# 重新读取验证(磁盘级校验)
s2 = json.loads(p.read_text())
assert $N in s2['completed_chapters'], '写入验证失败'
# 跨章完整性校验:范围内所有已完成的章都必须在 completed_chapters 中
contiguous = list(range($S, $N + 1))
actual = sorted(s2['completed_chapters'])
gaps = [ch for ch in contiguous if ch not in actual]
if gaps:
raise AssertionError(f'batch_state 不完整!缺失章节: {gaps}')
total_in_batch = $E - $S + 1
done = len(actual)
print(f'✅ batch_state 已验证 ({done}/{total_in_batch} 章已记录)')
"更新失败→重试 3 次。仍失败→停止。
若跨章校验发现缺失章节,说明前面某章的 Step 9 静默失败。必须补写缺失章到 completed_chapters 后再继续,不得忽略。
✅ 第{N}章完成 | 审查: {SCORE}/100 | 字数: {WORDS} | 进度: {N-S+1}/{E-S+1}当 (N - S + 1) % 3 == 0 且 N != E:
═══════════════════════════════════════
🚦 已完成第 {S}-{N} 章(共 {N-S+1} 章)
章节摘要:
第{S}章 ✅ score:{xx} words:{xxxx}
...
batch_state 完整性: ✅
确认下一步:
- "继续" 撰写第 {N+1}-{min(N+3, E)} 章
- "停止" 保存进度并退出
═══════════════════════════════════════
若用户设置 AUTO_CONTINUE=1,跳过暂停直接继续。═══════════════════════════════════════
📊 批量写作完成
| 章节 | 状态 | 得分 | 字数 |
|------|------|------|------|
| ... | ... | ... | ... |
总计: {count} 章 | 成功: {success} | 失败: {failed}
平均得分: {avg}
═══════════════════════════════════════更新 batch_state status = "completed"。
| 场景 | 处理 | 阻断 |
|---|---|---|
| 环境变量未设置/PROJECT_ROOT 错误 | 立即停止 | 阻断 |
| 上章完整性失败 | 立即停止 | 阻断 |
| preflight 失败(批前) | 修复环境→重试1次→停止 | 阻断 |
| 合同树刷新失败 | 检查缺失文件→修复→重试1次→停止 | 阻断 |
| context-agent 失败 | 重试1次→停止 | 阻断 |
| chapter-writer-agent 失败 | 重试1次→停止 | 阻断 |
| 字数不足 | 重试 chapter-writer-agent | 章内 |
| reviewer blocking(1-2轮) | 提取反馈→回传 chapter-writer-agent→重审 | 章内 |
| reviewer blocking(3轮) | 标记failed→继续 | 否 |
| data-agent 失败 | 重试1次→标记failed并停止 | 阻断 |
| chapter-commit 失败 | 修复→重试(3次)→停止 | 阻断 |
| projection 失败 | 只补跑失败项 | 章内 |
| batch_state 更新失败 | 重试3次→停止 | 阻断 |
© 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
SKILL.md and 1 other file (references) in .opencode/skills/webnovel-write-batch of lujih/webnovel-writer-opencode.
Open the folder on GitHubat commit da00b7a
Webnovel Write Batch 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Webnovel Write Batch this skilllujih/webnovel-writer-opencode | 214 | — | ~3.8k | Automated safety check: Pass | GPL-3.0 | |
| Socialcoreyhaines31/marketingskills | 54k | 4 repos | ~4.5k | Automated safety check: Pass | MIT | |
| HumanizerAzure-Samples/interview-coach-agent-framework | 172 | 37 repos | ~5.8k | Automated safety check: Pass | MIT | |
| Avoid AI Writingconorbronsdon/avoid-ai-writing | 4.9k | 3 repos | ~8.1k | Automated safety check: Pass | MIT | |
| JavaScript Concept Fact Checkerleonardomso/33-js-concepts | 67k | 1 repos | ~5k | Automated safety check: Pass | MIT | |
| User-Facing Text Cleanupguillaumemeyer/watermarks-remover | 24k | — | ~3.5k | Automated safety check: Pass | MIT |
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.
Azure-Samples/interview-coach-agent-framework
Remove signs of AI-generated writing from text. An agent skill from Azure-Samples/interview-coach-agent-framework.
conorbronsdon/avoid-ai-writing
Audit and rewrite content to remove AI writing patterns ("AI-isms").
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.
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.
freekmurze/dotfiles
When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms.
lujih/webnovel-writer-opencode
深度初始化网文项目。通过分阶段交互收集完整创作信息,生成可直接进入规划与写作的项目骨架与约束文件. An agent skill from lujih/webnovel-writer-opencode.
lujih/webnovel-writer-opencode
查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询. An agent skill from lujih/webnovel-writer-opencode.
lujih/webnovel-writer-opencode
将网文正文导出为 Markdown/TXT/EPUB/HTML/DOCX/PDF 格式。立即使用此 skill 当用户说:导出、导出小说、导出章节、生成电子书、导出 TXT、导出 Markdown、导出 EPUB、导出 HTML、导出 Word、导出 PDF、下载小说、输出正文。
lujih/webnovel-writer-opencode
修复问题章节——诊断、清理脏实体、重审查、重提交。触发:章节断裂、OOC偏离、设定矛盾修复. An agent skill from lujih/webnovel-writer-opencode.
lujih/webnovel-writer-opencode
将小说章节自动发布到国内主流小说平台(番茄等)。触发条件:"发布小说"、"发布章节"、"上传到番茄"、"自动发布"、"清理草稿"、"发布草稿"。
lujih/webnovel-writer-opencode
安全删除指定章节并清理关联投影数据(state/memory)。支持 dry-run 预览。触发:删除章节、回退写作、清理烂章。
Categories
连续写作多章。当用户要求多章写作时必须使用此 skill. An agent skill from lujih/webnovel-writer-opencode. Webnovel Write Batch is an agent skill from lujih/webnovel-writer-opencode.
Webnovel Write Batch fits situations like: writing & Content work in your project.
Run `npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a claude-code`. Or copy the skill folder (.opencode/skills/webnovel-write-batch in lujih/webnovel-writer-opencode) into .claude/skills/webnovel-write-batch in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lujih/webnovel-writer-opencode --skill webnovel-write-batch -a codex`. Or copy the skill folder (.opencode/skills/webnovel-write-batch in lujih/webnovel-writer-opencode) into .agents/skills/webnovel-write-batch in your project. Codex loads it when a task matches its description.
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-write-batch -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-write-batch, .gemini/skills/webnovel-write-batch, .github/skills/webnovel-write-batch and .opencode/skills/webnovel-write-batch in your project.
Going by SKILL.md and its folder, Webnovel Write Batch needs the command-line tools its instructions call (python). Our summary lists: Python 3. Compatibility (from SKILL.md): opencode.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Webnovel Write Batch 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.
About 3.8k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Webnovel Write Batch: Social (coreyhaines31/marketingskills, 54k stars), Humanizer (Azure-Samples/interview-coach-agent-framework, 172 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.
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.