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 rojim666/SztuCode --skill doc-typesetgit clone --depth 1 https://github.com/rojim666/SztuCodeWrote 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/rojim666/sztucode/doc-typeset)<a href="https://agentmods.dev/skills/rojim666/sztucode/doc-typeset"><img src="https://agentmods.dev/badge/skills/rojim666/sztucode/doc-typeset/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/rojim666/sztucode/doc-typeset"><img src="https://agentmods.dev/badge/skills/rojim666/sztucode/doc-typeset.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.00127 | $0.05431 |
| Opus 5 | $0.00063 | $0.02715 |
| Sonnet 5 | $0.00025 | $0.01086 |
| Haiku 4.5 | $0.00013 | $0.00543 |
Grade A, and why
doc-typeset 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 today.
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 — 406 lines — stays where its author put it; the contents beside it link to each section on GitHub.
doc-typeset Skill
职责
接收上游 design-token skill 的 token 输出和原始文档内容,输出排版美化的完整 HTML 字符串。
输入契约
interface TypesetInput {
content: string; // 原始文档内容(Markdown 或纯文本)
design_tokens: DesignTokens; // 来自 doc-design-token skill 的 token 对象
genre: string; // 文档类型(如 legal-contract, academic-paper 等)
scene_type?: string; // 可选:场景类型(如 formal, casual)
}
输出契约
interface TypesetOutput {
html: string; // 美化后的完整 HTML 字符串
template_used: string; // 实际使用的模板名称
components_inserted: string[]; // 插入的装饰组件列表
}
模板选择逻辑
- 检查
genre是否命中垂类(legal-contract / academic-paper / government-doc / business-report / meeting-minutes / stock-research / annual-report) - 命中 → 加载
prompts/{genre}.md(排版 prompt)+templates/{genre}.html(HTML 骨架) - 未命中 → 加载
prompts/base.md+templates/base.html
渐进加载:只在实际需要时读取对应的 prompt 和 template 文件,不要预先加载所有文件。
装饰组件使用指南
| 组件 | 用途 | 触发条件 |
|---|---|---|
callout |
重要提示、警告、危险信息 | 内容含"注意""警告""重要""严禁"等关键词 |
divider |
章节分隔 | 主要章节之间,或文档需要视觉分隔时 |
section-marker |
编号章节标题 | 有序章节,需突出层级时 |
data-card |
数据/指标展示 | 表格含 KPI、评级、统计数据时 |
页面模型规范:语义 Section + CSS @page
自 S-26060126E 起,封面页 / 分节 / 横向页 / 页眉页脚页码 统一由「语义
<section role>+ CSS@page」表达。这是生成 HTML 时表达"分页结构"的唯一方式。
(a) 语义分节 <section>
<body> 下的顶层 <section> 按 DOM 顺序映射为独立 docx 节(节边界自动插 nextPage 分节符)。无 <section> 时按单节处理。
<body>
<section role="cover"> … </section> <!-- 封面节 -->
<section role="body" data-page-restart="1"> … </section> <!-- 正文,页码从 1 重起 -->
<section role="financials" data-orientation="landscape"> … </section> <!-- 横向节(财务报表) -->
</body>
| 属性 | 说明 | 默认 |
|---|---|---|
role |
开放字符串;用于 section[role=X]{page:Y} 命名页绑定 |
无 |
data-orientation |
portrait / landscape(横向 = 取文档尺寸交换宽高,取代旧 section-break landscape) |
文档默认 |
data-margin-top/bottom/left/right |
该节页边距(cm),按属性合并,未设项回落文档默认 | 文档默认 |
data-page-restart |
该节页码起始值(写入 pgNumType@w:start) |
不重起 |
What ships with it
8 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.
- today First seen · 406 lines · 127 tokens per session scan A 8e8b7c4270bd
doc-typeset is a skill published in the GitHub repository rojim666/SztuCode (64 stars, last pushed today), licensed MIT. It adds 127 tokens to every session and 5,431 once invoked, about $0.0006 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-09-12.
Other skills, from other repositories
generate-doc-template
Generates on-brand document and deck templates — letterhead, slide, and one-pager — as SVG from the active brand profile, with editable title, subtitle, and body zones. Vector output needs no account, key, or network. Use when a user asks for a letterhead, a slide or deck master, or a branded one-pager. Trigger with…
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
creative-popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
design-inventory
Use to run the Claude Design to ClosedLoop pipeline against the current web-ui. Stage A inventories a design export zip into schema-validated findings (typed design units - screens, regions like nav bars, standalone components like a chat dialog; UX and behavioral changes; Storybook component reuse mapping; token…
copperhead
Change or verify a KiCad project through copperhead's gated pipeline. Use whenever a task touches .kicadsch or .kicadpcb files, a schematic, a PCB layout, a netlist, ERC/DRC, a BOM, or hardware design docs — instead of editing those files directly.