Files
story-skill/bridge/SKILL.md
root cf8f68533c init: story-skill - standardized novel continuation agent workflow
- Agent identity + mandatory workflow (AGENTS.md)
- Style continuation skill (SKILL.md)
- 5 reference file templates (characters/world_building/timeline/style/plot_state)
- Batch reading protocol with sequential sub-agents + spot-check review
- Bridge script for Gateway API calls with auto novel copy
- METHODOLOGY.md explaining the three pillars
- README.md with installation guide
2026-05-31 17:45:01 +08:00

51 lines
1.3 KiB
Markdown

---
name: novelist-bridge
description: 调用小说家 agent 进行小说风格续写。自动复制小说原文到 novelist 工作区。
---
# Novelist Bridge
通过 Gateway API 同步调用 `novelist` agent 进行小说创作。
**自动将小说原文复制到 novelist 工作区**,让 novelist 能在本地直接读取原文正文,而不是仅靠标题推断。
## 脚本位置
`scripts/ask_novelist.py`
## 用法
```bash
# 基本用法(自动查找默认小说文件)
python scripts/ask_novelist.py "续写请求内容"
# 指定小说文件路径
python scripts/ask_novelist.py --novel /path/to/novel.txt "续写请求内容"
# 从 stdin 读取
echo "续写内容" | python scripts/ask_novelist.py
```
## 配置
修改 `ask_novelist.py` 顶部的常量:
| 变量 | 说明 |
|------|------|
| `GATEWAY_URL` | Gateway API 地址 |
| `GATEWAY_TOKEN` | Gateway API Token |
| `NOVELIST_MODEL` | novelist agent model ID |
| `NOVELIST_WORKSPACE` | novelist 工作区路径 |
| `NOVEL_TARGET_NAME` | 复制到工作区后的文件名 |
## 调用链路
```
caller agent → ask_novelist.py → 复制小说到 novelist 工作区 → Gateway API → novelist agent → 回复
```
## 注意事项
- 超时默认 180 秒
- 如果 novelist 正在忙,会排队等待
- 脚本自动跳过已存在的相同文件(按文件大小比对),减少磁盘写操作