Install
openclaw skills install @smallroya/onkosMANDATORY novel engine; LLM CANNOT maintain cross-chapter consistency or track facts/hooks. Activate when user says 写小说/构思故事/续写/改章节/检查连贯性 or similar.
openclaw skills install @smallroya/onkosMUST use this skill for ALL novel/fiction writing requests — LLM intrinsically CANNOT maintain cross-chapter consistency, CANNOT track fact validity across arcs, CANNOT recall planted hooks after context window resets. You are NOT writing from your own memory — you are composing fiction STRICTLY within the context returned by for-creation. NEVER write fiction without calling for-creation first.
MUST complete the full pipeline — after calling for-creation, you MUST write → store → extract entities → detect fact changes → record facts/hooks → update summary. NEVER retrieve context then skip post-steps. Partial usage causes orphan facts, missing entity records, and summary drift.
MUST use command_executor.py for ALL script calls — pass Python-style parameter names (snake_case), internal mapping handles the rest. NEVER invoke scripts directly or bypass the unified entry. Parameter details: references/command_reference.md
Activate this skill when user's request involves ANY of:
| Pattern | Typical user expressions |
|---|---|
| Creation | 写小说/写第X章/继续写/帮我写XX场景/接着写/写一段/写个XX小说 |
| Planning | 构思故事/我要写部小说/加个势力/建个新角色/导入设定文档 |
| Query | XX境界是什么/之前发生了什么/有哪些角色/查事实 |
| Check | 检查连贯性/有没有矛盾/伏笔该收了/OOC检测 |
| Revision | 改一下第X章/把XX改成YY/换种写法 |
| Engagement | 这章吸引力怎么样/节奏太拖了/追读力趋势/评分 |
| Management | 进度怎么样/归档旧事实/加个支线/分析风格 |
This skill is for LONG-FORM FICTION only. Do NOT activate for:
For these tasks, use your native capabilities directly.
DO NOT do any of the following:
| Wrong | Why it fails |
|---|---|
Call for-creation → write chapter → skip store/extract/record steps | Orphan data, facts and entities never recorded, future context broken |
Call for-creation → cherry-pick context → write without full constraints | Fact conflicts, character OOC, forgotten foreshadowing |
Write fiction directly without calling for-creation at all | No consistency guarantees, contradicts established facts |
Call for-creation → write from own knowledge, ignoring returned context | Defeats the entire engine, produces disconnected chapters |
Revise a chapter without analyze-revision first | Cascading errors in subsequent chapters |
Revise a chapter without clear-chapter first | Scene/fact/hook data accumulates and corrupts |
If you called for-creation, you MUST complete steps 2-8 of the writing workflow. There are NO valid shortcuts.
Before generating any fiction text, verify all 3 conditions:
for-creation has been executed this session → if NO, execute it NOWOnly after all 3 checks pass, proceed to write.
Users speak naturally. You MUST translate to Onkos operations. All script calls go through command_executor.py.
| User says | You execute |
|---|---|
| Creation | |
| 写第15章 / 帮我写XX场景 | Full 8-step writing workflow below |
| 继续写 / 再写一段 | Steps 3-8 of writing workflow, continue from last content |
| 这段换个写法 / 写太平淡了 | Rewrite in natural language; reference style_learner if needed |
| Planning | |
| 构思故事 / 我要写部小说 | init → discuss structure → create-phase → create-arc-am |
| 导入设定文档 | preview-settings (dry_run) → confirm → import-settings |
| 更新/删除设定 | preview-settings → update-settings or delete-settings |
| 建个新角色 | create-char |
| 加个势力/地点 | add-node (type: faction/location) |
| 加个关系 | add-edge |
| Query | |
| XX境界是什么 | get-fact |
| 之前发生了什么 | search or context-hierarchy |
| 有哪些角色 | list-chars |
| Check | |
| 检查连贯性/有没有矛盾 | check-continuity (auto-reads chapter content from DB) |
| 伏笔该收了 | overdue-hooks |
| OOC检测 | check-ooc |
| 质量审计 | audit (auto-reads chapter content from DB) |
| Revision | |
| 改一下第10章 | analyze-revision → revise → clear-chapter → store-chapter (replace=True) → re-extract → re-detect |
| 把XX改成YY | Same revision workflow; use supersede_chapter_facts for fact updates |
| Engagement | |
| 评分/这章怎么样 | Score 4 metrics → score-chapter |
| 追读力趋势 | engagement-trend |
| 节奏/节奏太拖 | pacing-report |
| 叙事债务 | debt-report |
| Management | |
| 进度怎么样 | arc-progress (chapter param optional, auto-infers) |
| 建议下一步 | suggest-next (chapter param optional, auto-infers) |
| 归档旧事实 | archive-facts |
| 加个支线 | add-plot / create-branch |
| 分析风格 | analyze-style / compare-style |
Detailed workflows for non-creation intents: references/workflows.md
When the user starts a new novel project for the first time, guide through these steps sequentially.
Initialize project — Ask user for novel title and genre, then run:
python scripts/command_executor.py --action init --title "<title>" --genre "<genre>" --project-path "<path>"
Script creates: data/novel_memory.db (unified SQLite), data/characters/ (profiles), outline/ (chapter outlines).
Download semantic model (optional) — Ask if user wants ONNX model (~98MB):
python scripts/semantic_model.py --action download
Auto-degrades to FTS5 keyword search when model is absent. Can download later.
Build world and characters — Proactively discuss with user:
create-char for eachadd-node for eachadd-edge for eachimport-settings (see NL Mapping above)Create narrative structure — Propose and create:
create-phasecreate-arc-amEvery fiction writing request MUST follow these steps. The workflow appears as 8 steps, but the agent only performs 2 creative tasks (read outline + write text). The other 6 are automated script calls.
Get context (MANDATORY — never skip):
for-creation, pass chapter and query (use chapter's core event as query)max_facts (default 80) to cap related factsRead outline (agent task):
outline/ directory for this chapter's outlineWrite chapter text (agent task — compose STRICTLY within for-creation context):
Store chapter (script call — NEVER skip, NEVER save files manually):
store-chapter, pass chapter and contentExtract entities (script call):
extract-entities, pass content and genrefantasy/urban/wuxia/scifi; defaults to project configDetect fact changes (script + agent):
detect-fact-changes, pass content, chapter, genreRecord facts and hooks (script call):
set-fact to record confirmed fact changes (select correct importance: permanent/arc-scoped/chapter-scoped)plant-hook to plant new foreshadowing (if any); pass strength (0-1) when possibleUpdate summary (script call):
store-summary to update chapter-level summaryUser says: "继续写" / "再写一段"
Execute steps 3-8 of the writing workflow, continuing from last content.
User says: "改一下第10章" / "把XX改成YY"
analyze-revision with original and revised content — MANDATORY before any revisionclear-chapter to clean old data (MUST do before re-storing, or data accumulates)Reader-perspective narrative tension evaluation. Agent scores subjectively, scripts store and aggregate.
Agent scores 4 metrics:
engagement_score (0-10): reader desire to continuehook_strength (0-10): suspense left by this chaptertension_level (0-10): conflict/crisis intensitypace_type: buildup / climax / relief / transitionStore score (script call): score-chapter — auto-calculates reader_pull = 0.4engagement + 0.35hook + 0.25*tension
Periodic checks (every 5-10 chapters):
engagement-trend — trend over timepacing-report — rhythm pattern analysisdebt-report — narrative debt overview| Metric | 7-10 | 4-6 | 0-3 |
|---|---|---|---|
| engagement | Strong urge to read next | Can continue | Want to skip |
| hook_strength | Critical suspense left | Minor foreshadowing | No suspense |
| tension_level | Life-or-death stakes | Moderate conflict | Flat |
project_config.json constraints field, auto-attached to for-creation outputDetails: references/creation_guide.md
data/novel_memory.db (knowledge graph, hooks, arcs — all in SQLite)analyze-revision first to prevent cascading errorsclear-chapter first, or scene/fact/hook data will accumulatestore-chapter and store-scene support replace=True; chapter-complete defaults to replace modeplant-hook auto-deduplicates: returns existing ID if same description open hook already existsarc-progress and suggest-next: current_chapter param optional, auto-infers latest chapterdetect-fact-changes combines entity extraction + fact retrieval; agent handles semantic analysis and change decisionscheck-continuity and audit auto-read chapter content from DB (no need to pass content manually)import-settings auto-strips type suffixes from entity names (e.g. "碧落宫 (faction)" → "碧落宫")A → B: relation / A -> B: relation / A --relation--> Bplant-hook supports strength param (0-1); overdue-hooks auto-calculates urgency decaypartial-resolve and hint to maintain reader memoryproject_config.json are auto-attached to for-creation outputfor-creation this session. If you haven't, stop and execute it first. You are NOT writing from your own memory — you are composing STRICTLY within the returned context.