🚀 快速安装
复制以下命令并运行,立即安装此 Skill:
npx skills add https://skills.sh/aradotso/trending-skills/inkos-multi-agent-novel-writing
💡 提示:需要 Node.js 和 NPM
InkOS 多智能体小说创作系统 (InkOS Multi-Agent Novel Writing)
技能来自 ara.so — Daily 2026 Skills 合集
InkOS 是一个多智能体 CLI 系统,能够自主撰写、审核和修订小说。智能体处理完整的流程:写手 → 校验器 → 审核器 → 修订器,并在可配置的检查点设置人工审核关卡。
安装 (Installation)
npm install -g @actalk/inkos
# 或直接运行 (or run directly)
npx @actalk/inkos --version
要求 (Requirements): Node.js ≥ 20.0.0
快速开始 (Quick Start)
# 创建新的小说项目 (Create a new novel project)
inkos book create --title "吞天魔帝" --genre xuanhuan
# 写下一章 (Write the next chapter)
inkos write next 吞天魔帝
# 审核特定章节 (Audit a specific chapter)
inkos audit 吞天魔帝 --chapter 3
# 运行完整守护进程(持续创作)(Run the full daemon - continuous production)
inkos daemon start
项目结构 (Project Structure)
在 inkos book create 之后,项目目录包含:
story/
outline.md # 故事大纲(架构师智能体输入)(Story outline - architect agent input)
book_rules.md # 每本书的自定义规则和审核维度 (Per-book custom rules and audit dimensions)
chapter_summaries.md # 自动生成的每章摘要 (Auto-generated per-chapter summaries)
subplot_board.md # 支线进度跟踪(A/B/C 线)(Subplot progress tracking - A/B/C lines)
emotional_arcs.md # 按角色的情感弧线跟踪 (Per-character emotional arc tracking)
character_matrix.md # 角色互动矩阵 + 信息边界 (Character interaction matrix + info boundaries)
parent_canon.md # 仅番外:导入的正传约束 (Spinoff only: imported canon constraints)
style_profile.json # 风格指纹(如果使用了风格导入)(Style fingerprint - if style import used)
style_guide.md # LLM 生成的定性风格指南 (LLM-generated qualitative style guide)
chapters/
ch001.md
ch002.md
...
核心命令 (Core Commands)
书籍管理 (Book Management)
inkos book create --title "标题 (Title)" --genre xuanhuan # 流派: xuanhuan | xianxia | dushi | horror | general
inkos book list
inkos book status 吞天魔帝
创作流水线 (Writing Pipeline)
inkos write next 吞天魔帝 # 写下一章(自动加载所有上下文)(Write next chapter - auto-loads all context)
inkos write chapter 吞天魔帝 5 # 写特定章节 (Write specific chapter)
inkos audit 吞天魔帝 --chapter 3 # 审核章节(33 个维度)(Audit chapter - 33 dimensions)
inkos revise 吞天魔帝 --chapter 3 # 根据审核结果修订 (Revise based on audit results)
inkos revise 吞天魔帝 --chapter 3 --mode spot-fix # 仅定点修复(默认)(Point fix only - default)
inkos revise 吞天魔帝 --chapter 3 --mode rewrite # 完全重写(谨慎使用)(Full rewrite - use cautiously)
inkos revise 吞天魔帝 --chapter 3 --mode polish # 润色(无结构变更)(Polish - no structural changes)
流派系统 (Genre System)
inkos genre list # 列出所有内置流派 (List all built-in genres)
inkos genre show xuanhuan # 查看流派的完整规则 (View full rules for a genre)
inkos genre copy xuanhuan # 将流派规则复制到项目以进行自定义 (Copy genre rules to project for customization)
inkos genre create wuxia --name 武侠 # 从头创建新流派 (Create new genre from scratch)
风格匹配 (Style Matching)
inkos style analyze reference.txt # 分析风格指纹 (Analyze style fingerprint)
inkos style import reference.txt 吞天魔帝 # 将风格导入书籍 (Import style into book)
inkos style import reference.txt 吞天魔帝 --name "某作者"
番外(前传/续集/IF分支)(Spinoff – Prequel/Sequel/IF-branch)
inkos book create --title "烈焰前传" --genre xuanhuan
inkos import canon 烈焰前传 --from 吞天魔帝 # 导入正传约束 (Import parent canon constraints)
inkos write next 烈焰前传 # 写手自动读取正传约束 (Writer auto-reads canon constraints)
AIGC 检测 (AIGC Detection)
inkos detect 吞天魔帝 --chapter 3 # 检测章节中的 AIGC 标记 (Detect AIGC markers in chapter)
inkos detect 吞天魔帝 --all # 检测所有章节 (Detect all chapters)
inkos detect --stats # 查看检测历史统计 (View detection history statistics)
守护进程(持续创作)(Daemon – Continuous Production)
inkos daemon start # 启动调度器(默认:15 分钟/周期)(Start scheduler - default: 15 min/cycle)
inkos daemon stop
inkos daemon status
配置 (Configuration)
全局配置 (~/.inkos/config.json) (Global Config)
{
"llm": {
"provider": "openai",
"model": "gpt-4o",
"apiKey": "sk-...",
"temperature": 0.8
},
"daemon": {
"intervalMinutes": 15,
"dailyChapterLimit": 10,
"parallelBooks": 2
},
"webhook": {
"url": "https://your-server.com/hooks/inkos",
"secret": "your-hmac-secret",
"events": ["chapter-complete", "audit-failed", "pipeline-error"]
},
"aigcDetection": {
"provider": "gptzero",
"apiKey": "...",
"endpoint": "https://api.gptzero.me/v2/predict/text"
}
}
每本书的规则 (story/book_rules.md) (Per-Book Rules)
# 书籍规则:吞天魔帝 (Book Rules: 吞天魔帝)
## 禁忌 (Forbidden)
- 主角不得主动求饶
- 不得出现「命运」「天意」等宿命论表述
## 高疲劳词
- 震撼, 惊骇, 恐惧, 颤抖
## additionalAuditDimensions
- 数值系统一致性: 战力数值不得前后矛盾
- 角色成长节奏: 主角突破间隔不少于3章
## 写手特别指令
- 战斗场面优先感官描写,禁止数值报告
智能体架构 (Agent Architecture)
InkOS 依次运行五个专门的智能体:
架构师智能体 (ArchitectAgent) → outline.md, book_rules.md
↓
写手智能体 (WriterAgent) → ch00N.md (读取:大纲、摘要、弧线、矩阵、风格指南、正传)
↓
校验器智能体 (ValidatorAgent) → 11 条确定性规则,零 LLM 成本
↓ (发现错误 → 立即触发定点修复)
审核器智能体 (AuditorAgent) → 33 个 LLM 维度,temperature=0 以确保一致性
↓
修订器智能体 (ReviserAgent) → 定点修复 | 重写 | 润色 | 反检测
写后校验器规则(确定性,无 LLM)(Post-Write Validator Rules – Deterministic, No LLM)
| 规则 (Rule) | 条件 (Condition) |
|---|---|
| 禁用模式 (Forbidden patterns) | 不是……而是…… 结构 (不是……而是…… constructs) |
| 禁止破折号 (Em-dash ban) | —— 字符 (—— character) |
| 过渡词密度 (Transition word density) | 仿佛/忽然/竟然 ≤1 每 3000 字符 (≤1 per 3000 chars) |
| 高疲劳词 (High-fatigue words) | 每本书列表,≤1 每章 (Per-book list, ≤1 per chapter) |
| 元叙述 (Meta-narrative) | 编剧式叙述 (Screenwriter-style narration) |
| 报告术语 (Report terminology) | 散文中出现分析性框架术语 (Analytical framework terms in prose) |
| 作者说教 (Author moralizing) | 显然/不言而喻 等 (显然/不言而喻 etc.) |
| 集体反应 (Collective reaction) | 「全场震惊」等陈词滥调 (「全场震惊」 clichés) |
| 连续的“了” (Consecutive 了) | ≥4 句连续以“了”结尾 (≥4 consecutive sentences with 了) |
| 段落长度 (Paragraph length) | ≥2 个段落超过 300 字符 (≥2 paragraphs over 300 chars) |
| 书籍特定禁用 (Book-specific bans) | book_rules.md 禁用列表 (book_rules.md forbidden list) |
审核维度(共 33 个,LLM 评估)(Audit Dimensions – 33 total, LLM-evaluated)
关键维度包括:
- 维度 1-23:核心叙事质量(情节、角色、节奏、伏笔)(Core narrative quality – plot, character, pacing, foreshadowing)
- 维度 24-26:支线停滞、弧线扁平、节奏单调(所有 5 种流派)(Subplot stagnation, arc flatness, rhythm monotony – all 5 genres)
- 维度 27:敏感内容 (Sensitive content)
- 维度 28-31:番外特定(正传冲突、未来信息泄露、世界规则一致性、伏笔隔离)(Spinoff-specific – canon conflicts, future info leakage, world rule consistency, foreshadowing isolation)
- 维度 32:读者期望管理 (Reader expectation management)
- 维度 33:大纲偏离检测 (Outline deviation detection)
代码集成示例 (Code Integration Examples)
程序化使用 (TypeScript) (Programmatic Usage – TypeScript)
import { BookManager } from '@actalk/inkos'
import { WriterAgent } from '@actalk/inkos/agents'
import { ValidatorAgent } from '@actalk/inkos/agents'
// 创建和配置书籍 (Create and configure a book)
const manager = new BookManager()
const book = await manager.createBook({
title: '吞天魔帝',
genre: 'xuanhuan',
outlinePath: './my-outline.md'
})
// 为下一章运行写手流水线 (Run the write pipeline for next chapter)
const writer = new WriterAgent({ temperature: 0.8 })
const chapter = await writer.writeNext(book)
// 运行确定性验证(无 LLM 成本)(Run deterministic validation - no LLM cost)
const validator = new ValidatorAgent()
const validationResult = await validator.validate(chapter, book)
if (validationResult.hasErrors) {
// 自动触发定点修复 (Auto spot-fix triggered)
const reviser = new ReviserAgent({ mode: 'spot-fix' })
const fixed = await reviser.revise(chapter, validationResult.errors, book)
console.log('已修复违规项:', validationResult.errors.length)
}
Webhook 处理器 (Express) (Webhook Handler – Express)
import express from 'express'
import crypto from 'crypto'
const app = express()
app.use(express.raw({ type: 'application/json' }))
app.post('/hooks/inkos', (req, res) => {
const sig = req.headers['x-inkos-signature'] as string
const expected = crypto
.createHmac('sha256', process.env.INKOS_WEBHOOK_SECRET!)
.update(req.body)
.digest('hex')
if (sig !== `sha256=${expected}`) {
return res.status(401).send('无效签名 (Invalid signature)')
}
const event = JSON.parse(req.body.toString())
switch (event.type) {
case 'chapter-complete':
console.log(`书籍 "${event.book}" 的第 ${event.chapter} 章已完成 (Chapter ${event.chapter} of "${event.book}" complete)`)
// 触发人工审核关卡 (Trigger human review gate)
notifyReviewer(event)
break
case 'audit-failed':
console.log(`审核失败:${event.criticalCount} 个关键问题 (Audit failed: ${event.criticalCount} critical issues)`)
break
case 'pipeline-error':
console.error(`书籍 "${event.book}" 的流水线错误:`, event.error)
break
}
res.status(200).json({ received: true })
})
自定义流派定义 (Custom Genre Definition)
// genres/wuxia.ts
import type { GenreConfig } from '@actalk/inkos/types'
export const wuxia: GenreConfig = {
id: 'wuxia',
name: '武侠',
chapterTypes: ['江湖相遇', '武功切磋', '恩怨纠葛', '门派争斗', '武林大会'],
forbiddenPatterns: [
'内力值', '战力', '等级提升', // 无数值化战力系统 (No numerical power system)
'系统', '面板', '属性点'
],
fatiguedWords: ['震惊', '无敌', '碾压', '秒杀'],
languageRules: [
{
bad: '内力增加了100点',
good: '一股暖流沿经脉漫开,指尖的颤抖渐渐平息'
}
],
auditDimensions: [
'武功描写感官化',
'江湖规则内部一致性',
'恩怨情仇弧线完整性'
]
}
风格导入流水线 (Style Import Pipeline)
import { StyleAnalyzer } from '@actalk/inkos/style'
const analyzer = new StyleAnalyzer()
// 分析参考文本 (Analyze reference text)
const profile = await analyzer.analyze('./reference-novel.txt')
console.log(profile)
// {
// avgSentenceLength: 18.3,
// ttr: 0.42, // 类符-形符比 (Type-Token Ratio)
// rhetoricalDensity: 0.15,
// paragraphLengthDist: { p25: 45, p50: 89, p75: 156 },
// punctuationStyle: 'sparse'
// }
// 导入到书籍(生成 style_profile.json + style_guide.md)(Import into book - generates style_profile.json + style_guide.md)
await analyzer.importToBook('./reference-novel.txt', '吞天魔帝', {
authorName: '某作者'
})
审核修订循环 (Audit Revision Loop)
v0.4 版本的强化审核-修订循环可防止修订引入更多 AI 标记:
审核器智能体 (AuditorAgent) (temp=0)
↓ 发现关键问题 (critical issues found)
修订器智能体 定点修复 (ReviserAgent spot-fix)
↓
AI 标记数量比较 (AI marker count comparison)
↓ 标记增加?(markers increased?)
是 → 丢弃修订,保留原始版本 (YES → discard revision, keep original)
否 → 接受修订 (NO → accept revision)
↓
重新审核 (Re-audit) (temp=0)
确保审核一致性的关键设置 (Key settings for audit consistency):
- 审核器始终以
temperature: 0运行——消除同一章节 0-6 分的关键差异 (eliminates 0–6 critical variance on same chapter) - 默认修订模式为
spot-fix(仅修改有问题的句子)(default revision mode isspot-fix– only modify problem sentences) rewrite模式可用,但经测量会引入 6 倍于原来的 AI 标记 (rewritemode is available but measured to introduce 6× more AI markers)polish模式有边界锁定:不增删段落、不改名、不新增情节 (polishmode is boundary-locked: no paragraph add/delete, no name changes, no new plot)
番外正传约束 (Spinoff Canon Constraints)
当检测到 parent_canon.md 时,会自动激活 4 个额外的审核维度:
# parent_canon.md (由 `inkos import canon` 自动生成) (auto-generated by `inkos import canon`)
## 正传世界规则
- 力量体系: 炼体→炼气→炼丹→炼神→炼虚
- 地理: 九州大陆,东海以东无人居住
- 阵营: 正道五宗 vs 魔道三门
## 关键事件时间线
- 第1章: 主角获得吞天诀
- 第45章: 正道五宗盟约成立 [分歧点]
## 角色快照 (分歧点时状态)
- 林天: 炼气期第三层,未知父母身世
- 剑宗宗主: 在世,尚未叛变
## 伏笔状态 (正传专属,番外禁止回收)
- 古剑残片: 未解
- 神秘老人身份: 未解
故障排除 (Troubleshooting)
校验器对每章都触发 (Validator fires on every chapter)
检查 book_rules.md 中的疲劳词列表——其中列出的词强制每章 ≤1 次。移除不常用的术语。
审核结果在不同运行间差异巨大 (Audit results wildly inconsistent between runs)
确认审核器温度在配置中锁定为 0。如果使用代理 LLM API,确保它尊重 temperature: 0。
修订引入的 AI 标记比原文还多 (Revision introduces more AI markers than original)
这是预期行为——InkOS v0.4 会自动检测到并丢弃修订。如果反复发生,请明确从 rewrite 切换到 spot-fix 模式。
番外审核错误地标记事件 (Spinoff audit incorrectly flags events)
验证 parent_canon.md 中的分歧点时间戳是否准确。分歧点之前的事件受正传约束锁定;分歧点之后的事件在番外中可自由发挥。
守护进程在重复失败后停止一本书 (Daemon stops a book after repeated failures)
检查 daemon status 以查看被暂停的书籍。修复根本问题(通常是大纲模糊或 book_rules.md 矛盾)后,运行 inkos daemon resume 书名。
写手未应用风格指南 (Style guide not being applied by writer)
再次运行 inkos style import——如果 style_guide.md 缺失或为空,写手会静默跳过风格注入。检查参考文本是否 ≥5000 个字符,以确保可靠的指纹提取。
📄 原始文档
完整文档(英文):
https://skills.sh/aradotso/trending-skills/inkos-multi-agent-novel-writing
💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。

评论(0)