format-extract

format-extract is a skill for Claude Code, Codex from rojim666/SztuCode. It costs 218 tokens per session (2,977 once invoked), scanned A, original, MIT.

A low-level tool that converts a Word document (.docx) into semantic HTML and extracts embedded images. It also reports on the quality of the resulting HTML conversion.

In plain words
What is it for?
Use it to analyse an existing Word document, extract its structure for later formatting work, or assess whether an HTML conversion is sound. The calling workflow must choose the input and output locations.
Why use it?
It exposes headings, tables, indentation, fonts, colours, and other structure so another workflow can inspect or reuse the document's formatting. It keeps conversion and assessment separate from decisions about when to run them.

Skill for Claude CodeCodex

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

Good fit Use it to analyse an existing Word document, extract its structure for later formatting work, or assess whether an HTML conversion is sound. The calling workflow must choose the input and output locations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rojim666/sztucode/format-extract
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 format-extract
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 format-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/rojim666/sztucode/format-extract/github.svg)](https://agentmods.dev/skills/rojim666/sztucode/format-extract)
Your own site
<a href="https://agentmods.dev/skills/rojim666/sztucode/format-extract"><img src="https://agentmods.dev/badge/skills/rojim666/sztucode/format-extract/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 format-extract

Your own site · 80×15
<a href="https://agentmods.dev/skills/rojim666/sztucode/format-extract"><img src="https://agentmods.dev/badge/skills/rojim666/sztucode/format-extract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 218 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,977 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.00218 $0.02977
Opus 5 $0.00109 $0.01489
Sonnet 5 $0.00044 $0.00595
Haiku 4.5 $0.00022 $0.00298

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

Security

Grade A, and why

format-extract 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/format-extract/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

format-extract — DOCX 格式提取与质量评估

职责边界:本 Skill 只负责"docx → HTML/images"与"HTML 质量评估"两件事。产物交付后如何使用(登记到哪个 yaml、喂给哪个下游流程、在什么阶段触发)完全由调用方决定,本 Skill 不做任何假设。

入口 用途 何时选用
run.py(一键入口) docx → HTML,自动做门禁检查 + artifact_id 目录隔离 + 产物校验 默认首选,适合 Agent 调用
node dist/cli.cjs convert 底层 CLI,支持单文件/批量/自定义输出路径 需要完全自定义路径或批量处理
node dist/cli.cjs assess 独立评估 HTML 质量(5 项检查) 怀疑转换质量、需要量化报告

底层 CLI 参数、编程式 API、返回结构详见 references/cli-reference.md,日常调用无需阅读。


输入契约(调用方需提供)

本 Skill 不负责判断"是否应该触发"或"如何找到要转的 docx"——这些都是调用方的职责。调用方在确定要用本 Skill 时,提供:

参数 必填 说明
<docx-path> 要转换的 .docx 文件路径,优先绝对路径以规避 cwd 差异
--output-dir 自定义输出的父目录;脚本会在其下自动追加 <artifact_id>/ 子目录做隔离

⚠️ 本 Skill 不再自行猜测输出位置:调用方(如 doc-formatter)必须显式传入 --output-dir,通常应指向 pipeline 目录下 stage 的中间产物区(例如 <workspace>/output/<request_id>/stage2/intermediate/format-extract/)。不传直接报错退出(exit code 2)。这是"关注点分离"——产物落点由编排层拥有,脚本只负责转换。

⚠️ 为什么不在 Skill 里做"是否触发"判定:触发时机强依赖调用方的业务语义(是用户上传的模板?是批处理任务?是质量抽检?),放在本 Skill 里会与调用方耦合。调用方自己判断"现在要不要跑这个 Skill",跑的时候把 docx 路径和输出目录都传进来。


标准流程(推荐走 run.py 一键入口)

步骤 1 — 定位 run.py

Skill 的安装位置与当前 Agent 的 cwd 可能不一致,按优先级尝试:

优先级 策略
L1 调用方显式告知路径(最稳)
L2 相对 cwd 拼 skills/format-extract/run.py
L3 相对 cwd 拼历史笔误目录 workpace/...(兼容)
L4 从 cwd 向上最多 10 级查找包含本 Skill 的祖先目录

四级都找不到 → 走 <failure-fallback>

步骤 2 — 环境前置(run.py 内部会自动检查,手动调 CLI 时需自检)

P1 — Node.js ≥ 18.0.0:跑 node -v,不达标则参照 references/node-install.md 安装。bundled CLI 依赖 Node 18+ 的原生 API(ESM / structuredClone / fetch),低版本直接抛 SyntaxError

Read the full file on GitHub · 203 lines

Files

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.

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 · 203 lines · 218 tokens per session scan A 712f689b4fb1

Subscribe to this mod's changes

format-extract is a skill published in the GitHub repository rojim666/SztuCode (64 stars, last pushed today), licensed MIT. It adds 218 tokens to every session and 2,977 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-09-12.

Related

Other skills, from other repositories

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…

closedloop-ai/claude-plugins · 173 tokens

upload-artifact

Upload a file as a ClosedLoop document (PRD, implementation plan, feature, or template). Reads file content and uploads via MCP without consuming conversation context. Also supports creating new versions of existing documents. Triggers on: "upload artifact", "upload PRD", "upload implementation plan", "upload…

closedloop-ai/claude-plugins · 103 tokens

extract-plan-md

Sync plan.md with plan.json content. MUST be used after ANY edit to plan.json to keep plan.md in sync. Triggers: After editing plan.json with Edit tool (REQUIRED - always sync after edits) User asks to "sync plan.md", "update plan.md", "extract the md from a plan" Converting plan.json to markdown or viewing plan as…

closedloop-ai/claude-plugins · 99 tokens

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.

copperheadhq/copperhead · 69 tokens

create-theme

Use this skill when the user wants a reusable house style for open-sheet workbooks — "make a theme with our brand colours", "all our spreadsheets should look like this", "create a corporate template". Writes themes/ .md and an optional demo workbook the gallery previews.

lianghsun/open-sheet · 61 tokens

notion

Search, read, create and update pages and databases in your Notion workspace via the Notion API. Use when the user asks to find, read, or write Notion pages, notes, docs, or database rows.

intentic/intentic · 48 tokens