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 agentmods add skills/midnightdarling/collate/mp-formatnpx skills add MidnightDarling/collate --skill mp-formatgit clone --depth 1 https://github.com/MidnightDarling/collateWhat 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 | $0.00215 | $0.02315 |
| Opus 5 | $0.00108 | $0.01157 |
| Sonnet 5 | $0.00043 | $0.00463 |
| Haiku 4.5 | $0.00021 | $0.00231 |
Grade A, and why
mp-format 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 2d 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Markdown → 公众号推文
Task
用户的 Word 稿是给学界看的,公众号版是给公众看的——要求不一样:
| 维度 | Word 版 | 公众号版 |
|---|---|---|
| 字体 | 宋体 | 无衬线(苹方 / 微信默认) |
| 繁简 | 保留繁(学术版本) | --simplify 把正文简化,blockquote 保留原貌 |
| 脚注 | 页底编号 | 正文内 <sup>[1]</sup>,文末集中列出 |
| 引文 | 无特殊样式 | 灰底 + 左竖条的引用框 |
| 图片 | 正文流式 | 满宽 + alt 做题注 |
输出(落在工作区 output/ 目录,与 to-docx 的 Word 稿并列):
<workspace>/output/<title>_<author>_<year>_wechat.html ← 带内联 CSS,粘贴到公众号后台 / 直接上传
<workspace>/output/<title>_<author>_<year>_wechat.md ← 秀米兼容 Markdown(用户想进一步精修时用)
路径约定:输出由脚本自动推导:优先
_internal/_import_provenance.json,缺失时回退到meta.json与 Markdown 标题,不用显式指定--output。权威规范见插件的references/workspace-layout.md。
Process
Step 1:确认输入
INPUT="<markdown-path>"
test -f "$INPUT" || { echo "文件不存在"; exit 1; }
Step 2:繁简处理
历史论文常见繁体字、异体字。公众号读者大部分读简体更顺。
默认不简化。传 --simplify 时,脚本用 OpenCC(t2s:繁 → 简)处理正文,但跳过以 > 开头的 blockquote(引文保持原貌,学术引文忠实要求)。
注意:脚本只保护 > 引用块,不识别 「」""『』 内的短引文。如果你的正文里有大量夹杂短引(「如此」「若是」),整段会被一并简化。若必须忠实保留这类短引,用默认(不传 --simplify)或手动在 Markdown 里把关键片段抽进 blockquote。
什么时候加 --simplify:
| 场景 | 处理 |
|---|---|
| 纯学术古籍研究(读者是学界) | 不加 --simplify,原样输出 |
| 现代简体论文(本来就简体) | 不加 --simplify,脚本不动字 |
| 民国排印 / 偶有繁体(读者是公众) | 加 --simplify,blockquote 自动保留 |
Step 3:调排版脚本
# --output / --also-markdown 都省略;脚本按工作区约定把两份文件放到 <ws>/output/
python3 "${CLAUDE_PLUGIN_ROOT}/skills/mp-format/scripts/md_to_wechat.py" \
--input "$INPUT" \
--also-markdown \
$( [ "$SIMPLIFY" = "1" ] && echo "--simplify" ) \
--byline "$BYLINE" \
--source "$SOURCE"
脚本会打印两行 [md_to_wechat] wrote <path>,第一行是 HTML,第二行是 Markdown。需要自定义路径(CI / 回归测试)仍可传 --output path 和 --also-markdown path。
脚本产出 HTML 特性(这些是脚本真正实现的,别过度承诺):
- 全内联 CSS(公众号后台剥离外联 style,所以每条规则都 inline 在 style 属性里)
- 标题层级:
#→ 22 px 加粗 深灰(同时 byline + source 会作为 meta 行放在 H1 下面)##→ 18 px 加粗 左侧橙色竖条###→ 16 px 加粗
- 引用块
>:灰底 + 左竖条 + 字号小一点 - 脚注:
[^1]转成<sup>[1]</sup>,[^1]: ...形式的定义抽到文末「注释」区 - 段首缩进:2 em(公众号移动端阅读友好)
- 图片:满宽 +
alt文本当题注显示在图片下方 - 作者 / 来源栏:byline 和 source 以 "·" 连接,居中显示在 H1 下方
--also-markdown:再额外输出一份 Markdown(顶部拼上 byline / source 斜体行),供秀米 / 壹伴导入
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 154 lines · 215 tokens per session scan A 7b59aba2d0dc
mp-format is a skill published in the GitHub repository MidnightDarling/collate (6 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 215 tokens to every session and 2,315 once invoked, about $0.0011 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
chinese-documentation
中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.
aws-wechat-article-formatting
公众号排版|Markdown 转 HTML|排版主题|段落样式 — 公众号一键排版工具,Markdown 文稿转微信后台可粘贴 HTML,多主题、多字号、段落样式切换,所见即所得。面向公众号编辑、独立作者、排版岗。触发词:「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个排版主题」「换个版式」「转 HTML」「弄好看点」「调整格式」。换预设包/品牌包/整套主题配色请走 aws-wechat-article-assets;需要多环节串联(写+审+排+配图+发)请走 aws-wechat-article-main。.
honey-superpowers
Inject Honey levers into dispatched subagent prompts.
honey-px
Read huge read-only text as PNG pages; big input cut.
honey-ccr
Compress-cache-retrieve huge array tool output.
honey-design
Same pixels, fewer tokens: dense CSS for user-facing UI.