texttomd

texttomd is a command for Claude Code from zsutxz/ClaudeLearning. It costs 0 tokens per session (715 once invoked), scanned A, original, MIT.

A command that turns plain text, such as a post from Twitter or Weibo, into a structured Markdown blog article. It can create a title, headings, lists, and bold key sentences.

In plain words
What is it for?
Use it to turn social-media posts or other unstructured writing into clearer blog drafts with highlighted conclusions and memorable lines.
Why use it?
It saves you from manually reorganising rough text and avoids formatting problems when bold text contains punctuation.

Command for Claude Code

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.

agentmods
npx agentmods add commands/zsutxz/claudelearning/texttomd
Clone the repo
git clone --depth 1 https://github.com/zsutxz/ClaudeLearning

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 texttomd

README.md
[![agentmods](https://agentmods.dev/badge/commands/zsutxz/claudelearning/texttomd.svg)](https://agentmods.dev/commands/zsutxz/claudelearning/texttomd)
Your own site
<a href="https://agentmods.dev/commands/zsutxz/claudelearning/texttomd"><img src="https://agentmods.dev/badge/commands/zsutxz/claudelearning/texttomd.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 715 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00715
Opus 5 $0.00000 $0.00358
Sonnet 5 $0.00000 $0.00143
Haiku 4.5 $0.00000 $0.00072

Measured 4d ago against content hash 320d8ca73a50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

texttomd 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 4d 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.

.claude/commands/texttomd.md · 46 lines

What it actually says

适用于你要把推文、微博这种纯文本内容转成格式良好的博客,可以帮你生成标题、列表,和加粗要点、金句。

亮点:

  • 借助思维链先提取要点、金句和可选标题,然后选择标题和高亮要点、金句
  • 解决了 LLM 在加粗带标点符号的文字时加粗失效的问题(如果你用过 LLM 生成的中文 Markdown 会明白我说什么,参考图4)

---- 提示词开始 ----

任务:将文本转换为结构化 Markdown

请你扮演一个专业的编辑,将提供的文本内容转换为一份格式良好、结构清晰、重点突出的 Markdown 文档。

A. 内部推理步骤 (请在你的思考过程中执行,无需输出)

在生成最终的 Markdown 之前,请先在内部完成以下思考:

  1. 理解与提取:
  • 通读全文,准确把握文章的核心主旨和目的。
  • 识别并提取文中的核心论点、关键结论和重要定义。
  • 找出文中具有高度概括性或特别精辟的“金句” (Golden Sentences)。
  1. 构思标题:
  • 基于文章主旨,生成 2-3 个备选的主标题 (H1 级别)。
  1. 最终决策:
  • 从备选项中选择一个最精炼、最贴切的标题作为最终主标题。
  • 从步骤 1 提取的内容中,最终确定哪些句子或短语最值得在正文中加粗,以引导读者快速抓住核心。

B. 最终输出规范 (请严格按此格式生成)

请根据你的内部推理,生成符合以下所有规范的 Markdown 文本:

  1. 主标题 (H1):
  • 使用 # 标题 格式,采用你在步骤 A.3 中选定的最佳标题。
  1. 内容结构:
  • 使用不同级别的子标题(如 ##、###)来组织文章脉络,使其逻辑清晰。
  • 适当使用项目符号(-)或编号列表(1.)来呈现并列或顺序关系。
  1. 突出重点 (句子优先):
  • 有选择性地使用粗体 (**) 来突出你在步骤 A.1 和 A.3 中确定的核心论点、关键结论或金句。
  • 优先加粗:优先考虑加粗能够概括要点的完整句子或关键短语。
  • 避免:避免只加粗零散的单个关键词,并切勿过度使用粗体,保持文档的专业性和易读性。
  1. 【!!!】重要格式规范:
  • 在设置粗体时,绝对不要将任何标点符号(如 。、,、:、"、(、) 等)包含在 ** 标记内部。
    • ✅ 正确示例 (标点在 ** 之外):这是“一个核心观点”。
    • ❌ 错误示例:这是**“一个核心观点”**。

请开始处理以下内容: $ARGUMENTS

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. 4d ago First seen · 46 lines · 0 tokens per session scan A 320d8ca73a50

Subscribe to this mod's changes

texttomd is a command published in the GitHub repository zsutxz/ClaudeLearning (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 715 tokens. 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.