Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add zhiliyouxian/claude-novel-writer --skill encoding-checkergit clone --depth 1 https://github.com/zhiliyouxian/claude-novel-writerWrote 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.
[](https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/encoding-checker)<a href="https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/encoding-checker"><img src="https://agentmods.dev/badge/skills/zhiliyouxian/claude-novel-writer/encoding-checker/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/encoding-checker"><img src="https://agentmods.dev/badge/skills/zhiliyouxian/claude-novel-writer/encoding-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.02718 |
| Opus 5 | $0.00023 | $0.01359 |
| Sonnet 5 | $0.00009 | $0.00544 |
| Haiku 4.5 | $0.00005 | $0.00272 |
Grade A, and why
encoding-checker 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.
编码检查与修复器
你是专业的文本质量修复工具,负责检测并自动修复章节文件中的编码问题(乱码字符),确保文本完整性。
目录结构规范:
specs/directory-structure.md
核心原则
检测到乱码必须立即修复,修复后再次检查,循环直到无乱码为止。
检测脚本
使用 Python 脚本进行精确检测:
# 脚本位置
{plugin_dir}/scripts/check-encoding.py
# 检测目录下所有 md 文件
python3 {plugin_dir}/scripts/check-encoding.py <目录路径>
# 生成详细修复报告
python3 {plugin_dir}/scripts/check-encoding.py <目录路径> --report
# 输出 JSON 格式(供程序解析)
python3 {plugin_dir}/scripts/check-encoding.py <目录路径> --json
脚本输出示例
❌ productions/xuanhuan_001/chapters/chapter-0003.md (3 个错误)
第15行: ...不像��渎那样锋利...
第87行: ...一口���,正要...
第156行: ...突破到���星...
============================================================
检测完成: 30 个文件
✅ 正常: 28
❌ 问题: 2
📍 总错误数: 5
核心能力
1. 乱码检测(脚本实现)
- 检测 Unicode 替换字符(U+FFFD,显示为 �)
- 检测异常控制字符(0x00-0x08, 0x0B, 0x0C, 0x0E-0x1F, 0x7F)
- 精确定位:文件名、行号、列号、上下文
2. 自动修复(Claude 实现)
- 根据上下文智能推测原文
- 直接修改文件完成修复
- 修复后立即再次检查
3. 循环验证
- 修复后重新运行脚本扫描
- 确保所有问题已解决
- 直到零乱码才通过
乱码模式
常见乱码类型
| 类型 | 特征 | 产生原因 |
|---|---|---|
| Unicode替换符 | � (U+FFFD) |
无法解码的字节序列 |
| GBK→UTF8乱码 | 锟斤拷、烫烫烫 |
编码转换错误 |
| 截断乱码 | 字符显示不完整 | 多字节字符被截断 |
| 控制字符 | 不可见但影响显示 | 复制粘贴引入 |
常见修复模式
| 乱码上下文 | 推测原文 | 置信度 |
|---|---|---|
| 一口���,正要 | 一口气,正要 | 高 |
| 微微���笑 | 微微一笑 | 高 |
| 但���住 | 但记住 | 高 |
| 一阵���意 | 一阵寒意/暖意 | 中(需看上下文) |
| ���星 | 三星/五星/九星 | 中(需看上下文) |
| 不像���渎 | 不像亵渎 | 高 |
工作流程
激活条件
# 自动触发
- 章节审核前(/nw-ch-audit)
- 导出发布前(/nw-release)
- 批量创作完成后
# 手动触发
- 用户说"检查乱码"、"修复乱码"
- 用户说"检查编码"、"修复编码"
完整流程(循环直到无乱码)
开始
↓
【第1轮】运行检测脚本
python3 {plugin_dir}/scripts/check-encoding.py <chapters_dir>
↓
检测到乱码?
├─ 否 → ✅ 通过,结束
└─ 是 → 进入修复流程
↓
解析脚本输出,获取问题列表
↓
逐个修复:
├─ Read 读取问题文件
├─ 根据上下文推测原文
├─ Edit 修复乱码
└─ 记录修复内容
↓
【第2轮】再次运行脚本
↓
还有乱码?
├─ 否 → ✅ 修复完成,结束
└─ 是 → 继续修复(循环)
步骤详解
步骤1: 运行检测脚本
# 检测章节目录
python3 {plugin_dir}/scripts/check-encoding.py productions/{project_id}/chapters/
# 或使用 JSON 输出便于解析
python3 {plugin_dir}/scripts/check-encoding.py productions/{project_id}/chapters/ --json
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.
- 11d ago First seen · 375 lines · 45 tokens per session scan A a3399face5d5
encoding-checker is a skill published in the GitHub repository zhiliyouxian/claude-novel-writer (5 stars, last pushed 8mo ago), licensed MIT. It adds 45 tokens to every session and 2,718 once invoked, about $0.0002 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-31.
Other skills, from other repositories
baoyu-youtube-transcript
A tool for downloading the written captions, subtitles, chapter information, speaker labels, and cover image from a YouTube video using its URL or ID.
orbit-notion
Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…
instrument-data-to-allotrope
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
read
Reads URLs and PDFs by fetching source content, defaulting to concise summaries for plain read requests and clean Markdown when asked to convert, save, quote, cite, or feed downstream work. Use when users ask in any language to read, fetch, check, summarize, quote, cite, convert, or save a URL or PDF. Not for local…
overleaf-sync
A two-way connection between a local paper folder and Overleaf, a web-based LaTeX editor for writing research papers. It lets you move changes between the local files and the shared Overleaf project.