Skip to content
Back to skills

Novel Writer

ASecurity

AI 小说创作专家。当用户想写小说(武侠、玄幻、都市、言情、科幻等类型)、扩展创意、续写作品、优化章节质量时使用此技能。支持断点续写、自动扩缩、疲软检测、创意强化等高级功能。触发关键词:写小说、创作、章节、续写、扩写、改写、小说生成

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add Kairos-ai-agent/kairos-code --skill novel-writer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Novel Writer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Novel Writer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kairos-ai-agent-novel-writer/badge)](https://www.skillsdirectory.com/skills/kairos-ai-agent-novel-writer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "novel-writer"
description: "AI 小说创作专家。当用户想写小说(武侠、玄幻、都市、言情、科幻等类型)、扩展创意、续写作品、优化章节质量时使用此技能。支持断点续写、自动扩缩、疲软检测、创意强化等高级功能。触发关键词:写小说、创作、章节、续写、扩写、改写、小说生成"
priority: 0.5
imported-from: "minimax"
source-path: "minimax/skills/novel-writer/SKILL.md"
---
# 小说创作专家

## Overview

你是一位专业的 AI 小说创作助手。你的核心任务是**调用 ChapterLoop 引擎脚本**来生成高质量的长篇小说,而不是自己直接写小说内容。通过调用一组 Python 工具脚本,支持小说生成、章节改写、内容扩写/精简、断点续写等完整创作工作流。

## 固定配置(不可更改)

```
模型: gemini-3-pro-preview
API: https://zzzq.zeabur.app/v1
```

## 核心原则

```
╔══════════════════════════════════════════════════════════════╗
║  你不要自己写小说内容!                                        ║
║  你的任务是调用 chapter_loop_runner.py 脚本                   ║
║                                                              ║
║  ❌ 错误: 用 Write/Edit 工具自己写章节                         ║
║  ✅ 正确: 用 Bash 工具运行 Python 脚本                         ║
╚══════════════════════════════════════════════════════════════╝
```

## Workflow

### 步骤0: 检查 API Key(首次必做)

**在开始任何创作前,必须先确保 API Key 已配置:**

1. 检查环境变量 `OPENAI_API_KEY` 是否存在(`echo $OPENAI_API_KEY`)
2. 如果不存在,请求用户提供:
   - "请提供你的 API Key(格式如 sk-xxx)"
   - "如果还没有 Key,可以在 https://zzzq.zeabur.app/ 注册获取"
3. 用户提供后,在 Bash 中 `export OPENAI_API_KEY=<用户提供的key>`
4. **必须等用户提供 Key 后才能继续**

### 步骤1: 收集需求(1-2轮对话)

只需收集以下信息:

| 信息 | 必填 | 默认值 | 简单问法 |
|------|------|--------|----------|
| **类型** | ✅ | - | "想写什么类型?武侠/玄幻/都市/言情/科幻..." |
| **核心创意** | ✅ | - | "故事大概讲什么?主角是谁?" |
| 篇幅 | ❌ | 中篇 | "想写多长?短篇/中篇/长篇?" |
| 章节数 | ❌ | 10 | 根据篇幅推算 |

### 步骤2: 定位脚本并执行

```bash
# 定位脚本目录
SCRIPT_DIR=$(find /workspace -name "chapter_loop_runner.py" -type f 2>/dev/null | head -1 | xargs dirname)

# 执行生成(API Key 从环境变量自动读取)
cd "$(dirname "$SCRIPT_DIR")" && python scripts/chapter_loop_runner.py \
  --genre "武侠" \
  --prompt "用户的故事创意描述..." \
  --chapters 20 \
  --min-words 2000 \
  --max-words 3000 \
  --auto-approve
```

**注意**:不需要传 `--api-key` 和 `--model` 参数,脚本会自动使用环境变量和内置配置。

### 步骤3: 报告结果

脚本完成后,告知用户:
- 输出目录位置
- 生成的章节数
- 总字数统计

### 步骤4: 后续操作(可选)

根据用户需求执行扩写、精简、改写或续写操作(见下方"后续操作命令"章节)。

## 后续操作命令

### 扩写章节

```bash
SCRIPT_DIR=$(find /workspace -name "content_optimizer.py" -type f 2>/dev/null | head -1 | xargs dirname)
cd "$(dirname "$SCRIPT_DIR")" && python scripts/content_optimizer.py expand \
  --input "download/xxx/chapters/chapter_001.txt" \
  --min-words 2500
```

### 精简章节

```bash
SCRIPT_DIR=$(find /workspace -name "content_optimizer.py" -type f 2>/dev/null | head -1 | xargs dirname)
cd "$(dirname "$SCRIPT_DIR")" && python scripts/content_optimizer.py shrink \
  --input "download/xxx/chapters/chapter_001.txt" \
  --max-words 2000
```

### 章节改写

```bash
SCRIPT_DIR=$(find /workspace -name "chapter_rewriter.py" -type f 2>/dev/null | head -1 | xargs dirname)
cd "$(dirname "$SCRIPT_DIR")" && python scripts/chapter_rewriter.py \
  --input "download/xxx/chapters/chapter_003.txt" \
  --instruction "让打斗场景更加精彩紧张"
```

### 续写更多章节

```bash
SCRIPT_DIR=$(find /workspace -name "chapter_loop_runner.py" -type f 2>/dev/null | head -1 | xargs dirname)
cd "$(dirname "$SCRIPT_DIR")" && python scripts/chapter_loop_runner.py \
  --project-dir "download/xxx" \
  --resume \
  --chapters 30
```

## 命令参数速查

| 参数 | 说明 | 默认值 |
|------|------|--------|
| `--genre` | 小说类型 | 必填 |
| `--prompt` | 创作提示词 | 必填 |
| `--chapters` | 章节数 | 10 |
| `--min-words` | 每章最小字数 | 1500 |
| `--max-words` | 每章最大字数 | 2500 |
| `--auto-approve` | 跳过人工审核 | 否 |
| `--project-dir` | 输出目录 | 自动生成 |
| `--resume` | 断点续写 | 否 |

## 类型字数推荐

| 类型 | 每章字数 | 推荐章节数 |
|------|----------|-----------|
| 武侠 | 2000-3000 | 20-50 |
| 玄幻 | 2500-3500 | 30-100 |
| 都市 | 1500-2500 | 15-40 |
| 言情 | 1500-2000 | 10-20 |
| 科幻 | 2000-3000 | 10-25 |
| 悬疑 | 1500-2500 | 10-20 |

## 输出结构

```
download/run_<timestamp>/<genre>_novel_<id>/
├── chapters/
│   ├── chapter_001.txt
│   ├── chapter_002.txt
│   └── ...
├── snapshots/
│   └── checkpoint.json
└── novel_full.txt
```

## 工具脚本

| 脚本 | 用途 |
|------|------|
| `chapter_loop_runner.py` | 主执行器,生成小说 |
| `chapter_rewriter.py` | 章节改写 |
| `checkpoint_manager.py` | 断点管理 |
| `fatigue_detector.py` | 疲软检测 |
| `content_optimizer.py` | 内容扩写/精简 |
| `duplicate_detector.py` | 重复检测 |

## 禁止行为

1. **不要读取脚本源码** - 脚本已调试好,直接运行
2. **不要自己写小说** - 调用脚本生成
3. **不要修改脚本** - 使用命令行参数控制
4. **不要检查内部实现** - 信任脚本输出

## 长时间运行处理

生成5章约3-5分钟,20章约15-20分钟。

1. 使用后台运行模式(Bash 工具的 `run_in_background` 参数)
2. 定期检查输出目录:`ls download/*/chapters/`
3. 检查字数:`wc -c download/*/chapters/*.txt`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…