format-exporter

format-exporter is a skill for Claude Code from zhiliyouxian/claude-novel-writer. It costs 48 tokens per session (3,035 once invoked), scanned A, original, MIT.

A format converter for turning chapter files into clean TXT or Markdown files for publication. It removes Markdown markers and YAML front matter, standardizes punctuation and spacing, and supports formats for several Chinese web-fiction platforms.

In plain words
What is it for?
Use it to export selected chapters or a whole novel as one file, separate chapter files, or platform-adapted output for Qidian, Jinjiang, Fanqie, or general use.
Why use it?
It saves time when the working files contain editing markup or metadata that should not appear in the published text. It also reduces repeated formatting for different platforms.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the novel-writer plugin — 9 skills, 11 commands, 9 agents shipped together

Good fit Use it to export selected chapters or a whole novel as one file, separate chapter files, or platform-adapted output for Qidian, Jinjiang, Fanqie, or general use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhiliyouxian/claude-novel-writer/format-exporter
Install

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.

Any agent
npx skills add zhiliyouxian/claude-novel-writer --skill format-exporter
Clone the repo
git clone --depth 1 https://github.com/zhiliyouxian/claude-novel-writer

Made for: Claude Code.

Or install novel-writer, the plugin that ships this one along with the rest of its 9 skills, 11 commands, 9 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 format-exporter

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhiliyouxian/claude-novel-writer/format-exporter/github.svg)](https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/format-exporter)
Your own site
<a href="https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/format-exporter"><img src="https://agentmods.dev/badge/skills/zhiliyouxian/claude-novel-writer/format-exporter/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.

agentmods 80×15 button for format-exporter

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhiliyouxian/claude-novel-writer/format-exporter"><img src="https://agentmods.dev/badge/skills/zhiliyouxian/claude-novel-writer/format-exporter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,035 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.00048 $0.03035
Opus 5 $0.00024 $0.01517
Sonnet 5 $0.00010 $0.00607
Haiku 4.5 $0.00005 $0.00303

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

Security

Grade A, and why

format-exporter 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 12d 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.

skills/format-exporter/SKILL.md · 498 lines

How it starts

The opening of the file, as written. The whole thing — 498 lines — stays where its author put it; the contents beside it link to each section on GitHub.

格式导出器

你是一位专业的格式转换专家,负责将创作完成的章节导出为各种发布平台需要的格式。

目录结构规范: specs/directory-structure.md

核心能力

1. 纯文本导出

  • 单文件TXT (所有章节合并)
  • 带目录TXT (自动生成章节目录)
  • 分章TXT (每章独立文件)

2. 格式清理

  • 移除Markdown格式标记
  • 移除YAML frontmatter
  • 统一标点符号
  • 规范段落间距

3. 平台适配

  • 起点中文网格式
  • 晋江文学城格式
  • 番茄小说格式
  • 通用格式

工作流程

激活条件

# 方式1: 导出指定范围
"导出章节 1-30 为TXT"
"导出所有章节"

# 方式2: Command触发
"/export-all"

步骤1: 扫描章节文件

使用Glob扫描:
productions/{project_id}/chapters/chapter-*.md

结果:
- 找到30个章节文件
- 排序: chapter-0001.md, chapter-0002.md, ..., chapter-0030.md

步骤1.5: 编码检查(前置)

调用 encoding-checker Skill:
├─ 无乱码 → 继续导出
└─ 有乱码 → 警告用户,询问是否继续
   ├─ 用户选择继续 → 带乱码导出(不推荐)
   └─ 用户选择修复 → 暂停导出,先修复

步骤2: 处理单个章节

对每个chapter-*.md执行:

2.1 读取原始内容
原始文件 (chapter-0001.md):
---
chapter_number: 1
title: {章节标题}
realm: {当前境界}
highlights:
  - {爽点关键词}
---

# 第1章 {章节标题}

{起始城镇},{主角家族}。

"{主角}哥哥,这是我给你带的糕点。"{女主}提着食盒,轻声说道。

...
2.2 移除YAML frontmatter
识别并删除:
---
...YAML内容...
---

保留正文部分
2.3 处理Markdown标记
转换规则:
# 第1章 标题 → 第1章 标题 (移除#号,保留标题文本)
**粗体** → 粗体 (移除星号)
*斜体* → 斜体 (移除星号)
`代码` → 代码 (移除反引号)

保留:
- 中文标点符号
- 段落换行
- 对话引号
2.4 规范化段落
规则:
- 段落间: 保留1个空行
- 章节间: 保留2个空行
- 对话段: 每段独立成行
- 描述段: 多句可合并为一段
2.5 生成纯文本章节
第1章 {章节标题}

{起始城镇},{主角家族}。

"{主角}哥哥,这是我给你带的糕点。"{女主}提着食盒,轻声说道。

...

步骤3: 单文件合并导出

格式1: novel.txt (纯合并)
第1章 {章节标题1}

{起始城镇},{主角家族}。
...


第2章 退婚之辱

三年之约...
...


第3章 {章节标题3}
...

输出位置:

releases/{project_id}/text/novel.txt
格式2: novel-with-toc.txt (带目录)
《{小说名}》
作者: AI创作工坊
共30章,约9.3万字

━━━━━━━━━━━━━━━━
目录
━━━━━━━━━━━━━━━━

第1章 {章节标题1}
第2章 {章节标题2}
第3章 {章节标题3}
...
第30章 {章节标题30}

━━━━━━━━━━━━━━━━
正文
━━━━━━━━━━━━━━━━

第1章 {章节标题1}

{起始城镇},{主角家族}。
...

输出位置:

releases/{project_id}/text/novel-with-toc.txt

步骤4: 分章导出

为每章生成独立文件:

releases/{project_id}/text/chapters/
├── 第001章-{章节标题1}.txt
├── 第002章-{章节标题2}.txt
├── 第003章-{章节标题3}.txt
...
└── 第030章-{章节标题30}.txt

Read the full file on GitHub · 498 lines

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. 12d ago First seen · 498 lines · 48 tokens per session scan A 673721bfd730

Subscribe to this mod's changes

format-exporter is a skill published in the GitHub repository zhiliyouxian/claude-novel-writer (5 stars, last pushed 8mo ago), licensed MIT. It adds 48 tokens to every session and 3,035 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens