MCPInstall

webnovel-query

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

Installs
610
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/lingfengqaq/webnovel-writer --skill webnovel-query
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads webnovel-query automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Information Query Skill

Use when

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

项目根保护

export WORKSPACE_ROOT="${CLAUDE_PROJECT_DIR:-$PWD}"
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。

# 角色历史状态:某实体在指定章节时的状态
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. 格式化输出:按下方模板输出。

输出格式

# 查询结果:{关键词}

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

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

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

边界与失败恢复

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

FAQ

What does the webnovel-query skill do?

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

How do I install webnovel-query?

Run npx skills add https://github.com/lingfengqaq/webnovel-writer --skill webnovel-query in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/webnovel-query/ (personal) or .claude/skills/webnovel-query/ (project).

Which AI agents can use webnovel-query?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is webnovel-query safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains webnovel-query?

It is published by lingfengqaq in lingfengqaq/webnovel-writer. It has 610 recorded installs.

More from lingfengqaq/webnovel-writer

View all →

webnovel-write

lingfengqaq/webnovel-writer

产出可发布章节,完整执行上下文→起草→审查→润色→提交→备份。

Docs & Writing869 installs

webnovel-review

lingfengqaq/webnovel-writer

使用审查 Agent 评估章节质量,生成报告并写回审查指标。

webnovel-plan

lingfengqaq/webnovel-writer

基于总纲生成卷纲、时间线和章纲,并把新增设定增量写回现有设定集。

webnovel-init

lingfengqaq/webnovel-writer

深度初始化网文项目。通过分阶段交互收集完整创作信息,生成可直接进入规划与写作的项目骨架与约束文件。

Docs & Writing674 installs

webnovel-learn

lingfengqaq/webnovel-writer

从当前会话提取成功写作模式并写入 projectmemory.json

webnovel-dashboard

lingfengqaq/webnovel-writer

启动只读小说管理面板,查看项目状态、实体图谱与章节内容。

Data & Databases499 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs