Webnovel Query logo

Webnovel Query

Community
ricky-theseus
webnovel-query

查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询。

Overview

Publisherricky-theseus
RepositoryDaisyWriter
Skill namewebnovel-query
Stars
77
Forks
5
Bundled files
3
LicenseGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ricky-theseus on GitHub. Read the source before you install it.

Installation

Install the Webnovel Query AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ricky-theseus/DaisyWriter/tree/master/skills/webnovel/query
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ricky-theseus/DaisyWriter.git /tmp/DaisyWriter
mkdir -p .claude/skills
cp -r /tmp/DaisyWriter/skills/webnovel/query .claude/skills/webnovel-query
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Webnovel Query in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Webnovel Query on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Webnovel Query is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Information Query Skill

Use when

用户询问关于故事设定、角色、力量体系、势力、伏笔、金手指、节奏等项目内信息时触发。

项目根保护

bash
export WORKSPACE_ROOT="${CLAUDE_PROJECT_DIR:-${OPENCODE_PROJECT_DIR:-$PWD}}"
export CLAUDE_PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-${OPENCODE_PLUGIN_ROOT:-}}"
export SCRIPTS_DIR="${CLAUDE_PLUGIN_ROOT}/scripts"
export SKILL_ROOT="${CLAUDE_PLUGIN_ROOT}/skills/webnovel-query"
export PROJECT_ROOT="$(python "${SCRIPTS_DIR}/webnovel.py" --project-root "${WORKSPACE_ROOT}" where)"
  • PROJECT_ROOT 必须包含 .webnovel/state.json
  • 禁止在 ${CLAUDE_PLUGIN_ROOT}/ 下读取或写入项目文件

查询分类 → 最窄工具

先识别查询类型,再用下表最窄工具。不默认全量加载,只在综合 / 跨多类型查询时用 memory-contract load-context。

查询类型关键词最窄工具
角色历史状态某角色在第N章时 / 时间点状态 / 境界变化knowledge query-entity-state
实体关系关系 / 敌友 / 师徒 / 阵营归属knowledge query-relationships
世界规则力量规则 / 设定铁律 / 境界体系约束memory-contract query-rules
伏笔 / open loop伏笔 / 紧急伏笔 / 未闭合悬念memory-contract get-open-loops
综合 / 复杂跨多类型、需要时间线 + 长期记忆联合memory-contract load-context
静态设定角色卡 / 力量体系 / 世界观 / 势力 / 标签格式Grep + Read 设定集

引用加载策略

按查询类型按需加载,先识别再加载。路径说明:references/ 指 skill 私有 skills/webnovel-query/references/;../../references/ 指共享 references。

查询类型Reference实际路径
数据流 / 优先级数据流规范${SKILL_ROOT}/references/system-data-flow.md
伏笔分析伏笔分析${SKILL_ROOT}/references/advanced/foreshadowing.md
节奏分析Strand 模式${SKILL_ROOT}/../../references/shared/strand-weave-pattern.md
格式查询标签规范${SKILL_ROOT}/references/tag-specification.md

不得同时加载两个以上 reference,除非用户请求明确跨多类型。

查询流程

  1. 识别查询类型:按「查询分类 → 最窄工具」表匹配关键词。

  2. 按优先级定位写前真源(写前真源 → 写后真源 → 投影层):

    1. .story-system/MASTER_SETTING.json - 全书主设定(题材、调性、核心禁忌)
    2. .story-system/volumes/*.json - 卷级合同(本卷目标、节奏策略)
    3. .story-system/chapters/*.json - 章级合同(本章焦点、动态上下文)
    4. latest accepted .story-system/commits/chapter_XXX.commit.json - 写后事实(已发布章节的定稿状态)
    5. memory-contract 系列查询 - 记忆编排结果(长期记忆、伏笔、时间线)
    6. .webnovel/state.json / index.db - 投影层(仅 fallback / read-model,类比网文后台的"角色卡"、"章节列表")

    优先级说明:

    • 写前真源(1-3):作者开写前必须遵守的"大纲、设定、禁区"
    • 写后真源(4):已发布章节的"定稿状态",不可篡改
    • 投影层(5-6):从写后真源自动生成的"查询视图",方便快速检索
  3. 调用最窄工具检索:按类型只调用所需命令,不默认全量 load-context。

bash
# 角色历史状态:某实体在指定章节时的状态
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" knowledge query-entity-state --entity "{entity_id}" --at-chapter {N}

# 实体关系:某实体在指定章节时的所有关系
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" knowledge query-relationships --entity "{entity_id}" --at-chapter {N}

# 世界规则
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" memory-contract query-rules --chapter {chapter_num}

# 伏笔 / open loop
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" memory-contract get-open-loops

# 仅综合 / 复杂查询:需要时间线 + 长期记忆联合时才用
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" memory-contract load-context --chapter {chapter_num}

静态设定(角色卡 / 力量体系 / 世界观 / 标签格式)直接用 Grep 定位行号再 Read 取片段,不经 memory-contract。

  1. 格式化输出:按下方模板输出。

输出格式

markdown
# 查询结果:{关键词}

## 概要
- **匹配类型**: {type}
- **数据源**: {实际命中的真源 / 投影层}
- **匹配数量**: X 条

## 详细信息
{结构化数据,含文件路径和行号}

## 数据一致性检查
{state.json 与静态文件的差异,若无差异则省略}

边界与失败恢复

  • 只读操作,不修改任何项目文件
  • 若数据源缺失,明确告知用户缺少什么文件
  • 若查询无匹配,返回空结果并建议检查范围
  • 若 .story-system/ 合同与 accepted commit 缺失,必须显式说明当前查询已降级到 legacy fallback

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Webnovel Query AI skill do?

查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询。

Why use Webnovel Query on TypingMind?

Because you install it once and use it with any model. Webnovel Query is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Webnovel Query in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ricky-theseus/DaisyWriter/tree/master/skills/webnovel/query. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Webnovel Query?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Webnovel Query?

As many as you like. As long as a model supports skills, you can use Webnovel Query with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Webnovel Query AI skill free?

Yes. It is published on GitHub by ricky-theseus under the GPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇