AI Agent Hub
Back to skills
Onkos: AI-Powered Long Novel Co-Author icon

Onkos: AI-Powered Long Novel Co-Author

Content Creation Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

To install this skill, please follow the guide at https://skillhub.cn/install/skillhub.md and install the package @user_c0f1d332/onkos.

About this skill

The Core Challenge: Information Overload and Narrative Inconsistency

When crafting long novels of hundreds of thousands or even millions of characters, authors face two primary hurdles. First is context overload: to write chapter 100, an AI model needs to understand the plot, character states, planted foreshadowing, and established rules of all 99 preceding chapters—a context far exceeding any LLM's window. Second is consistency maintenance: human memory struggles to ensure "the name of the artifact Lin Feng used in Chapter 30" is the same as "he's still using the same artifact in Chapter 150." Foreshadowing (like a "mysterious ring") may be forgotten, and a character's behavior might become inconsistent (Out-Of-Character, or OOC) across chapters. These "narrative holes" severely damage reader immersion.

Onkos's Solution: Multidimensional Memory and Structured Management

Onkos is more than a simple writing interface; it's a collaborative system built around a persistent narrative memory. It tackles the above challenges through these core modules:

  • 6-Level Layered Context Compression (context_retriever.py): This is the system's core. Instead of trying to feed the entire text, it intelligently assembles a "context package" for the current writing task. This package dynamically includes the full-book summary, the current phase/arc summary, the previous chapter summary, relevant facts (e.g., protagonist's current realm, key item locations) retrieved via fact_engine.py, and active foreshadowing. It’s like providing the AI with a dynamic, focused "memory recall."
  • Fact and Graph Engine (fact_engine.py & knowledge_graph.py): All important information extracted from the text (character relationships, item ownership, event outcomes) is stored as structured facts and linked to knowledge graph nodes of types like person, faction, or location. This enables precise queries like "What is Su Yao's background?" or "What is the relationship between the Azure Cloud Sect and the Heavenly Sword Sect?" without relying on the model's fuzzy memory.
  • Character Psychological Modeling (character_simulator.py): During creation or checks, the system simulates a character's Big Five personality traits, behavioral taboos, and speaking style to detect deviations from their established persona (OOC), helping authors maintain consistency.
  • Foreshadowing Tracker (hook_tracker.py): Newly planted foreshadowing is recorded with an "expected resolution chapter." The system periodically scans for overdue hooks, alerting the author: "The foreshadowing about that mysterious ring has been pending for 50 chapters—should it be resolved?"

Standardized Workflow and Key Operations

Onkos enforces a seven-step standardized writing workflow to ensure the narrative database is reliably updated after each chapter:
1. Retrieve Context: Call for-creation to fetch all compressed context relevant to the chapter.
2. Review Outline: Check and confirm the chapter's content plan.
3. Write Content: Draft based on the context and outline.
4. Store Chapter: Call store-chapter to save the content in segmented form to the database.
5. Extract Entities: Call extract-entities to identify characters, locations, etc., from the new content.
6. Log Facts & Foreshadowing: Log important new facts with set-fact and potentially plant new hooks with plant-hook.
7. Update Summaries: Update the chapter summary; periodically update the arc summary.

Revising a written chapter is a high-risk operation. Before modification, you must first call analyze-revision to perform an impact analysis, assessing the ripple effect on subsequent chapters and facts. When executing a revision, you must first clear-chapter to purge old data for that chapter, then re-execute the writing and storage workflow to avoid data contradictions and redundancy.

Applicable Boundaries and Considerations

  • Technical Dependencies: Requires the jieba segmentation library and an optional ONNX semantic model (for smarter retrieval). Without the ONNX model, the system degrades gracefully to a keyword-based FTS5 search.
  • Collaborative Nature: This is a tool to augment the creator's capabilities, not a black box for fully automated novel generation. Plot conception, prose polishing, and final decision-making remain with the author. The system's role is information management, consistency checking, and context maintenance.
  • Data Consistency: All state (facts, foreshadowing, graph) is stored in a unified SQLite database (data/novel_memory.db). Scripts operating on the database use Python-style parameter names (e.g., current_chapter), dispatched via command_executor.py.
  • Proactive Agent Design: The system requires the AI agent to be proactively engaged—for instance, suggesting character personality models during creation or proposing story arc structures during planning, rather than passively awaiting instructions. This necessitates an efficient collaborative rhythm between the user and the AI.

Use Cases

  • While writing Chapter 300, you need to retrieve the exact description and current status of the 'Mysterious Jade Pendant' foreshadowing planted in Chapter 50 to plan its resolution.
  • A team collaboratively writes a 500-chapter fantasy web novel and must periodically run 'continuity checks' to ensure character actions remain consistent across different authors' contributions.
  • Based on reader feedback, you decide to revise the settings of the 'Azure Cloud Sect' from Chapter 20; before revising, you must analyze the impact of this change on the subsequent 50 chapters and all logged facts.
  • You want to add a hidden motive for the antagonist and need to use the character psychological modeling feature to verify if this new motive conflicts with the character's established 'Big Five Personality' profile.

Best For

  • Authors serializing long-form web fiction (e.g., Xianxia, Xuanhuan) who must manage a vast world-building, hundreds of characters, and plot threads spanning years.
  • Lead writers and narrative designers for interactive narratives or large-scale RPGs, tasked with managing complex branching plots, character state trees, and foreshadowing that persists throughout the game.
  • Novelists or game world architects building complex, self-consistent sci-fi/fantasy universes whose setting documents span hundreds of interlinked pages.
  • Content teams creating long-form materials (e.g., wikis, series of technical documentation) who need to maintain cross-document consistency in terminology and factual accuracy.