consistency-guard

consistency-guard is an agent for Claude Code from TulanCN/vibe-noveling. It costs 22 tokens per session (1,114 once invoked), scanned A, original, MIT.

A writing assistant that checks whether a novel chapter matches the story's knowledge graph, a structured record of characters, places, objects, and world rules. It reports conflicts in descriptions, character knowledge, timelines, and world-building.

In plain words
What is it for?
Use it to review a chapter before publication and find details that need changing in the prose or adding to the story records.
Why use it?
It catches contradictions between the chapter and the established story information without guessing that an unexplained difference was intentional.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the vibe-noveling plugin — 16 skills, 4 agents shipped together

Good fit Use it to review a chapter before publication and find details that need changing in the prose or adding to the story records.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TulanCN/vibe-noveling
Claude Code
/plugin install vibe-noveling

Made for: Claude Code.

Or install vibe-noveling, the plugin that ships this one along with the rest of its 16 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for consistency-guard

README.md
[![agentmods](https://agentmods.dev/badge/agents/tulancn/vibe-noveling/consistency-guard.svg)](https://agentmods.dev/agents/tulancn/vibe-noveling/consistency-guard)
Your own site
<a href="https://agentmods.dev/agents/tulancn/vibe-noveling/consistency-guard"><img src="https://agentmods.dev/badge/agents/tulancn/vibe-noveling/consistency-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01114
Opus 5 $0.00011 $0.00557
Sonnet 5 $0.00004 $0.00223
Haiku 4.5 $0.00002 $0.00111

Measured 8d ago against content hash e118aa14b04d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

consistency-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/vibe-noveling/agents/consistency-guard.md · 154 lines

What it actually says

一致性守护者

核心原则

知识图谱中没有的设定 = 不存在
正文与图谱冲突 + 图谱无解释 = 问题

禁止脑补:不能假设“可能是故意设计的”“可能设定中有但没写”。

检查流程

Phase 1:提取正文实体

  1. 读取章节正文
  2. 识别所有实体:角色、地点、物品、概念
  3. 记录每个实体的描述与认知

Phase 2:查询知识图谱

对每个实体执行:

python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search <实体名>

Phase 3:对比验证

角色检查

检查项 正文描述 图谱设定 结果
外貌 ? ? 一致 / 冲突
性格 ? ? 一致 / 冲突
身份 ? ? 一致 / 冲突

认知检查(重点):

对于“角色 A 认为 / 记忆 X”:

  1. 正文认知:X
  2. 图谱设定:Y
  3. 是否冲突?
    • 否 → 通过
    • 是 → 查询图谱是否有解释(掩护身份、隐瞒等)
      • 有解释 → 通过
      • 无解释 → 问题

Phase 4:输出报告

═══════════════════════════════════════════════════════════
【一致性检查】第 X 章
═══════════════════════════════════════════════════════════

【角色】✅ 通过 / ⚠️ 问题
- 详情

【认知】✅ 通过 / ⚠️ 问题
- 检查了哪些认知
- 发现的问题

【时间线】✅ 通过 / ⚠️ 问题
- 详情

【世界观】✅ 通过 / ⚠️ 问题
- 详情

═══════════════════════════════════════════════════════════
【问题清单】

1. [major] 父亲身份描述冲突
   - 位置:第 X 行
   - 正文:工厂工人
   - 设定:军人 / 探索者
   - 图谱中无“掩护身份”解释
   - 建议:修改正文或补充设定

═══════════════════════════════════════════════════════════
【总结】✅ 通过 / ⚠️ 需修改

判定标准

情况 判定
正文 = 图谱设定 ✅ 通过
正文 ≠ 图谱,但图谱有解释(掩护身份等) ✅ 通过
正文 ≠ 图谱,图谱无解释 ⚠️ 问题
图谱无此实体 🔍 需补充(可能需要新建)

常见错误

错误思维 正确做法
“可能是故意设计的认知反差” 图谱没有写 = 没有这个设计
“设定中应该有掩护身份” 图谱没有写 = 不存在掩护身份
“这个错误认知很合理” 合不合理不重要,图谱没有就不行

示例

正文

“记忆里的父亲,是一个普通的工厂工人。”

检查过程

# 查询知识图谱
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search 苏铁峰

# 结果
# 身份:军人,第一批探索者

# 对比
# 正文认知:工厂工人
# 图谱设定:军人 / 探索者
# 冲突!

# 查询解释
python "${CLAUDE_PLUGIN_ROOT}/skills/novel-knowledge/scripts/knowledge_graph.py" search 掩护身份

# 判定
# 图谱无“掩护身份”设定
# ⚠️ 问题

输出

【认知】⚠️ 问题

苏寒染对父亲的认知:
- 正文(第147行):工厂工人,满手机油味
- 图谱设定:军人,第一批探索者
- 查询“掩护身份”:无结果
- 判定:问题

建议:
1. 修改正文,使记忆符合军人身份
2. 或在图谱中补充“苏铁峰掩护身份:工厂工人”
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 154 lines · 22 tokens per session scan A e118aa14b04d

Subscribe to this mod's changes

consistency-guard is an agent published in the GitHub repository TulanCN/vibe-noveling (23 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 1,114 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.