zh-novel-writer - 批量生成引擎
v1.0.3批量生成网络小说章节。通过环境变读取 API keys 并调用外部 LLM API (ModelScope, Fyra, Ph8) 生成中文小说内容。 使用场景:用户给出大纲并要求"批量生成章节"、"写第X章到第Y章"、"后台静默写作"。 前置要求:需设置环境变量 NOVEL_MODELSCOPE_KEY 或 N...
MIT-0
Security Scan
OpenClaw
Benign
medium confidencePurpose & Capability
The skill's name/description (批量生成小说章节 via external LLMs) matches the included code and instructions: it needs at least one external LLM API key (ModelScope, Fyra, or Ph8) and calls those endpoints. However, registry metadata incorrectly lists no required environment variables/primary credential while the SKILL.md and script clearly require NOVEL_MODELSCOPE_KEY / NOVEL_FYRA_KEY / NOVEL_PH8_KEY — this packaging mismatch is a concern for correctness but not evidence of malicious intent.
Instruction Scope
Runtime instructions and the script are narrowly scoped to: read an outline JSON, construct chapter prompts, call external LLM endpoints, stitch segmented responses, and write markdown files. This stays within the stated purpose. Important privacy/billing note: the script sends user-provided outline contents and previous-chapter excerpts to third-party APIs, so any sensitive content included in inputs will be transmitted to those providers.
Install Mechanism
Instruction-only with a Python script; no remote downloads or opaque installers. Dependency is httpx (pip), which is standard. No extract/download from arbitrary URLs or package managers were used, so install risk is low.
Credentials
The required environment variables (API keys for ModelScope/Fyra/Ph8) are appropriate for contacting the stated LLM services. The problem is that the registry metadata did not declare these required env vars or primary credential, creating an inconsistency. There are no extra unrelated credentials requested.
Persistence & Privilege
The skill is not always: true and does not request elevated or persistent system-wide privileges. It runs as a user tool (invoked manually) and writes generated chapters to the user-specified output directory only.
Assessment
What to consider before installing/using:
- Privacy & billing: Using this skill will send your outline text, chapter excerpts, and prompt contents to whichever third-party LLM API you configure (ModelScope, Fyra, or Ph8). Do not include secrets or sensitive personal data in outlines or prompts. Be aware API usage may incur charges on the linked accounts.
- API keys: The package metadata failed to list required environment variables, but the code requires at least one of NOVEL_MODELSCOPE_KEY, NOVEL_FYRA_KEY, or NOVEL_PH8_KEY. Only set keys for accounts you trust; prefer disposable or limited-billing keys if possible.
- Inspect inputs/outputs: The script will read the outline file you point at and will write chapter files to the output directory. Ensure the outline path does not point to any sensitive files and run the script in a directory you control.
- Run safely: If you want to be cautious, run the script in an isolated environment (container or VM) and monitor network calls. You can also review and/or modify the CONFIG dictionary in the script to verify endpoints and headers before using.
- Packaging correctness: The mismatch between registry metadata and the SKILL.md (env vars not declared in metadata) is likely a packaging oversight — consider asking the publisher for clarification or updating metadata before broad deployment.
If you need higher assurance, request the publisher to declare required env vars in registry metadata, provide a signed release, or supply usage examples showing how keys are scoped and billed.Like a lobster shell, security has layers — review code before you run it.
chineselatestnovelwriting
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Novel Writer — 网络小说批量生成
前置要求
- Python 3 +
pip install httpx - 至少设置一个 API key 环境变量:
export NOVEL_MODELSCOPE_KEY="your_modelscope_key"
export NOVEL_FYRA_KEY="your_fyra_key"
export NOVEL_PH8_KEY="your_ph8_key"
External API Endpoints
| 服务 | URL | 环境变量 |
|---|---|---|
| ModelScope | https://api-inference.modelscope.cn/v1/chat/completions | NOVEL_MODELSCOPE_KEY |
| Fyra | https://Fyra.im/v1/chat/completions | NOVEL_FYRA_KEY |
| Ph8 | https://ph8.co/v1/chat/completions | NOVEL_PH8_KEY |
用户文本会发送到以上 API 端点以生成小说内容。
Quick Start
- 确认大纲文件和章节范围
- 读
references/api-config.md获取 API 配置说明 - 运行
scripts/batch_generate.py
Workflow
大纲 → 逐章prompt → 逐个调用外部 LLM API → 分段生成 → 保存文件
脚本说明
scripts/batch_generate.py:
- 分段生成章节(单次 API 输出有限制时自动分段追加)
- 多 API 容错:按 ModelScope → Fyra → Ph8 顺序尝试
- 429 限流自动等 30 秒重试
- 未配置 API key 的 API 会被自动跳过
References
- API 配置 →
references/api-config.md - Prompt 模板 →
references/prompt-template.md
Files
4 totalSelect a file
Select a file to preview.
Comments
Loading comments…
