doc-typeset

doc-typeset is a skill for Claude Code, Codex from rojim666/SztuCode. It costs 127 tokens per session (5,431 once invoked), scanned A, original, MIT.

A document formatter that turns text and design settings into complete, styled HTML. It includes templates for contracts, academic papers, official documents, business reports, meeting notes, research reports, and annual reports.

In plain words
What is it for?
Use it to create polished HTML from plain text or Markdown for formal document types. It can add suitable layouts and components such as notices, section dividers, numbered section markers, and data cards.
Why use it?
It provides a consistent path from document content to structured HTML instead of requiring each caller to write HTML and inline styles by hand. It also keeps styles tied to reusable design settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: agent in frontmatter.

Good fit Use it to create polished HTML from plain text or Markdown for formal document types. It can add suitable layouts and components such as notices, section dividers, numbered section markers, and data cards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rojim666/sztucode/doc-typeset
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 rojim666/SztuCode --skill doc-typeset
Clone the repo
git clone --depth 1 https://github.com/rojim666/SztuCode

Made for: Claude Code, Codex.

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 doc-typeset

README.md
[![agentmods](https://agentmods.dev/badge/skills/rojim666/sztucode/doc-typeset/github.svg)](https://agentmods.dev/skills/rojim666/sztucode/doc-typeset)
Your own site
<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.

agentmods 80×15 button for doc-typeset

Your own site · 80×15
<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>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,431 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.00127 $0.05431
Opus 5 $0.00063 $0.02715
Sonnet 5 $0.00025 $0.01086
Haiku 4.5 $0.00013 $0.00543

Measured today against content hash 8e8b7c4270bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

packages/runtime-ts/prompts/workbuddy/skills/_builtin-plugins/tencent-docx/skills/doc-typeset/SKILL.md · 406 lines

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[];  // 插入的装饰组件列表
}

模板选择逻辑

  1. 检查 genre 是否命中垂类(legal-contract / academic-paper / government-doc / business-report / meeting-minutes / stock-research / annual-report)
  2. 命中 → 加载 prompts/{genre}.md(排版 prompt)+ templates/{genre}.html(HTML 骨架)
  3. 未命中 → 加载 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 不重起

Read the full file on GitHub · 406 lines

Files

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.

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. today First seen · 406 lines · 127 tokens per session scan A 8e8b7c4270bd

Subscribe to this mod's changes

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.