← 返回 Skills 市场
yuzhihui886

Consistency Checker

作者 yuzhihui886 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
149
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install consistency-checker
功能描述
一致性检查器 - 检测小说章节中的一致性问题。当需要检查角色名称、特征、时间线、地点描述是否前后一致时使用。
使用说明 (SKILL.md)

Consistency Checker - 一致性检查器

Overview

读取角色档案和章节正文,自动检测一致性问题,包括角色名称不一致、特征矛盾、时间线混乱、地点描述矛盾等。

使用场景

  • 需要检查章节与角色档案的一致性
  • 需要发现前后矛盾的描述
  • 需要确保时间线连贯
  • 需要在发布前进行一致性审核

检测项目

检测项 说明
角色名称 检测同一角色的不同称呼/译名
特征矛盾 检测与角色档案矛盾的描述(如眼睛颜色、年龄等)
时间线 检测时间描述是否连贯(如"第二天"vs"三天后")
地点矛盾 检测地点描述是否前后一致
关系矛盾 检测角色关系是否与档案一致

CLI 使用

# 基本用法
python3 scripts/check_consistency.py --book-dir projects/my-novel --chapter chapters/chapter-01.md

# 输出报告到文件
python3 scripts/check_consistency.py \
  --book-dir projects/my-novel \
  --chapter chapters/chapter-01.md \
  --output reports/chapter-01-consistency.md

# 简写
python3 scripts/check_consistency.py -d ./project -c chapter.md -o report.md

参数说明

参数 必填 说明
--book-dir / -d 小说项目目录路径
--chapter / -c 章节文件路径(相对于 book-dir)
--output / -o 输出报告文件路径

项目目录结构

projects/my-novel/
├── characters/         # 角色档案(必需)
│   ├── 主角.yml
│   └── 配角.yml
├── chapters/           # 章节正文
│   └── chapter-01.md
└── reports/            # 检查报告输出
    └── chapter-01-consistency.md

角色档案格式 (characters/*.yml)

name: 林风
aliases:
  - 林侦探
  - 风哥
gender: 男
age: 35
features:
  - 黑色短发
  - 灰色眼睛
  - 左眉疤痕
occupation: 私家侦探
relationships:
  苏雨:咖啡馆老板娘,朋友
background: 前刑警

输出报告格式

# 一致性检测报告

**章节**: chapters/chapter-01.md
**检测时间**: 2026-04-04 23:55:00
**问题数量**: 3

## 检测结果

| 检测项 | 状态 | 问题数 |
|--------|------|--------|
| 角色名称 | ⚠️ 警告 | 1 |
| 特征矛盾 | ✅ 通过 | 0 |
| 时间线 | ⚠️ 警告 | 1 |
| 地点矛盾 | ✅ 通过 | 0 |
| 关系矛盾 | ✅ 通过 | 0 |

## 问题详情

### 角色名称不一致
- "林峰" → 应为 "林风"(出现 2 次)

### 时间线混乱
- 第 5 段:"第二天清晨"
- 第 12 段:"三天后的夜晚"
- 建议:检查时间跨度是否合理

## 建议

1. 统一使用 "林风" 作为角色名称
2. 核实时间线是否连贯

依赖

  • Python 3.8+
  • rich (终端渲染)
  • PyYAML (配置文件解析)

安装依赖:

pip install -r scripts/requirements.txt

与其他技能集成

与 novel-writer 集成

# 1. 生成章节正文
python3 ../novel-writer/scripts/write_chapter.py \
  --book-dir projects/my-novel \
  --chapter 1 \
  --output chapters/chapter-01.md

# 2. 检查一致性
python3 scripts/check_consistency.py \
  --book-dir projects/my-novel \
  --chapter chapters/chapter-01.md \
  --output reports/chapter-01-consistency.md

与 quality-checker 集成

# 1. 质量检测
python3 ../quality-checker/scripts/check_quality.py \
  --input chapters/chapter-01.md \
  --output reports/chapter-01-quality.md

# 2. 一致性检查
python3 scripts/check_consistency.py \
  --book-dir projects/my-novel \
  --chapter chapters/chapter-01.md \
  --output reports/chapter-01-consistency.md

注意事项

  • 角色档案目录(characters/)为必需
  • 支持 UTF-8 和 GBK 编码
  • 时间线检测基于关键词识别,可能不完全准确
  • 建议每章完成后立即进行一致性检查
安全使用建议
This skill contains two execution paths: a local checker (safe to run locally) and an LLM-based script that sends your chapters/character data to https://coding.dashscope.aliyuncs.com using an API key read from DASHSCOPE_API_KEY. The SKILL.md and registry do not disclose that network call or the required env var. Before installing or running the LLM script, consider: 1) Only run the local script (check_consistency.py) if you want to avoid sending data externally. 2) If you need the LLM variant, verify the external service (dashscope.aliyuncs.com), why it’s used, and only provide an API key you trust; do not reuse sensitive credentials. 3) Prefer using a documented/trusted provider or modify the script to call a provider you control (or a local LLM) to avoid unintended data disclosure. 4) Ask the publisher to update SKILL.md and registry metadata to declare DASHSCOPE_API_KEY and to explicitly warn that text will be transmitted off-host; lack of that disclosure is the main risk.
功能分析
Type: OpenClaw Skill Name: consistency-checker Version: 2.0.0 The skill bundle provides a legitimate toolset for novel writers to verify consistency in character traits, timelines, and locations. It includes a rule-based script (check_consistency.py) and an LLM-integrated script (check_consistency_llm.py) that uses the Aliyun DashScope API (coding.dashscope.aliyuncs.com) to perform deeper analysis. The code follows safe practices such as using yaml.safe_load and lacks any indicators of malicious intent, unauthorized data exfiltration, or command execution.
能力评估
Purpose & Capability
The stated purpose (checking novel consistency) matches the included local script (check_consistency.py). Providing an LLM-based variant (check_consistency_llm.py) is plausible for deeper analysis, but the SKILL.md and registry metadata do not document that this variant requires network access or an API key.
Instruction Scope
SKILL.md documents running the local Python checker and lists only Python dependencies; it does not describe the LLM script. The LLM script will read chapters and character files and transmit summaries to an external service (coding.dashscope.aliyuncs.com). That network transmission of user content is not disclosed in SKILL.md.
Install Mechanism
No install spec; only small Python dependencies (rich, PyYAML) in requirements.txt. Nothing in the install mechanism looks suspicious or pulls arbitrary remote code during install.
Credentials
check_consistency_llm.py requires an environment variable DASHSCOPE_API_KEY to call the external API, but the skill metadata declares no required env vars and SKILL.md does not mention this key. Requesting an undocumented API key that grants remote service access to your book text is disproportionate and should be explicit.
Persistence & Privilege
The skill does not request permanent/always-on presence and does not modify other skills or system config. It runs as a CLI script and does not claim elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install consistency-checker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /consistency-checker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
v2.0 LLM 版本:新增 check_consistency_llm.py,通过 LLM 检测时间线/季节/角色/地点一致性,默认 qwen3-max-2026-01-23
v1.0.1
优化版本:增强时间线检测(时间表达式识别/季节矛盾/角色年龄变化)
v1.0.0
初始版本:opencode 生成脚本 + Claude Code debug 修复,角色名称/特征/时间线/地点一致性检测
元数据
Slug consistency-checker
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Consistency Checker 是什么?

一致性检查器 - 检测小说章节中的一致性问题。当需要检查角色名称、特征、时间线、地点描述是否前后一致时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 149 次。

如何安装 Consistency Checker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install consistency-checker」即可一键安装,无需额外配置。

Consistency Checker 是免费的吗?

是的,Consistency Checker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Consistency Checker 支持哪些平台?

Consistency Checker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Consistency Checker?

由 yuzhihui886(@yuzhihui886)开发并维护,当前版本 v2.0.0。

💬 留言讨论