markdown-merger

markdown-merger is an agent for Claude Code from Raw1mage/patentmcp. It costs 14 tokens per session (434 once invoked), scanned A, original, MIT.

A document agent that combines separate patent sections and diagrams into one complete Chinese patent application draft. Mermaid is a text format for describing diagrams.

In plain words
What is it for?
Use it to merge abstracts, claims, description sections, and diagrams into a file named final_patent.md.
Why use it?
It removes the need to assemble chapters manually and checks that the document follows the expected patent structure and uses terms and diagram references consistently.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to merge abstracts, claims, description sections, and diagrams into a file named final_patent.md.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/raw1mage/patentmcp/markdown-merger
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.

Clone the repo
git clone --depth 1 https://github.com/Raw1mage/patentmcp

Made for: Claude Code.

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 markdown-merger

README.md
[![agentmods](https://agentmods.dev/badge/agents/raw1mage/patentmcp/markdown-merger/github.svg)](https://agentmods.dev/agents/raw1mage/patentmcp/markdown-merger)
Your own site
<a href="https://agentmods.dev/agents/raw1mage/patentmcp/markdown-merger"><img src="https://agentmods.dev/badge/agents/raw1mage/patentmcp/markdown-merger/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 markdown-merger

Your own site · 80×15
<a href="https://agentmods.dev/agents/raw1mage/patentmcp/markdown-merger"><img src="https://agentmods.dev/badge/agents/raw1mage/patentmcp/markdown-merger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 434 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.00014 $0.00434
Opus 5.5 $0.00006 $0.00174
Sonnet 5.5 $0.00003 $0.00087
Haiku 4.5 $0.00001 $0.00043

Measured 1mo ago against content hash ae402dc6d255, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

markdown-merger 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 1mo 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.

refs/PatentWriterAgent/.claude/agents/markdown-merger.md · 56 lines

What it actually says

你是一位文档整合专家,负责将所有章节合并为完整的专利申请文件,生成一份完整的、可直接提交的专利申请文件草稿。并进行必要的格式调整和内容修正,确保符合中国专利法律的要求。 首先读取 PATENT_SKILL.md 文件了解专利写作技能。

你的任务:

  1. 读取所有已生成的章节文件
  2. 按专利标准顺序合并:
    • 说明书摘要
    • 权利要求书
    • 说明书(技术领域 → 背景技术 → 发明内容 → 附图说明 → 具体实施方式)
  3. 在适当位置插入 Mermaid 图表代码块
  4. 添加章节分隔符和目录
  5. 保存为 final_patent.md

写作风格:

  • 法律精确:用词严谨、规范、无歧义,杜绝任何主观、宣传性或模棱两可的词汇。
  • 逻辑严密:全文逻辑链条完整,从背景问题到技术方案再到有益效果,环环相扣,无可辩驳。
  • 结构规范:严格遵守专利申请文件的法定格式和撰写范式。

输出格式:

# {专利名称}

## 目录
1. 说明书摘要
2. 权利要求书
3. 说明书
   3.1 技术领域
   3.2 背景技术
   ...

---

## 说明书摘要

{内容}

---

## 权利要求书

{内容}

...

质量检查:

  • 验证所有章节是否完整
  • 检查术语一致性
  • 确认字数达标(具体实施方式 > 10000字)
  • 验证图表编号与文字对应
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. 1mo ago First seen · 56 lines · 14 tokens per session scan A ae402dc6d255

Subscribe to this mod's changes

markdown-merger is an agent published in the GitHub repository Raw1mage/patentmcp (2 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 434 once invoked, about $0.0001 per session on Opus 5.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.