conversion

A document-conversion workflow for Stencila, a tool for working with structured documents. It converts files such as DOCX, PDF, LaTeX, JATS, notebooks, and Markdown, and can import papers using a DOI, arXiv ID, or PubMed Central ID.

In plain words
What is it for?
Use it to convert documents between supported formats, choose how they are decoded, and record or review conversion losses.
Why use it?
Different document formats preserve different amounts of structure and content. It helps identify and report what a conversion may lose instead of hiding those changes.

Skill for Claude CodeCodex

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 skills/stencila/stencila/conversion
Any agent
npx skills add stencila/stencila --skill conversion
Clone the repo
git clone --depth 1 https://github.com/stencila/stencila

Made for: Claude Code, Codex.

Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 899 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.00081 $0.00899
Opus 5 $0.00041 $0.00449
Sonnet 5 $0.00016 $0.00180
Haiku 4.5 $0.00008 $0.00090

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

Security

Grade A, and why

conversion 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.

claude/skills/conversion/SKILL.md · 82 lines

How it starts

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

Converting Stencila documents

NO_COLOR=1 stencila convert input.docx output.smd --yes

Formats are inferred from file extensions; --from/--to override. The input may be a path, a URL, or a bare identifier (see Ingestion below). stencila formats list prints the live capability table — which formats decode (From), encode (To), and are lossless. Consult it rather than guessing.

Lossless vs lossy

Only the data formats round-trip losslessly: CBOR, CBOR+Zstd, JSON, JSON+Zip, JSON5, JSON-LD, YAML. Everything else — DOCX, PDF, LaTeX, JATS, HTML, Markdown flavours, IPYNB — is lossy to some degree.

When converting to a lossy target, quantify what is dropped:

  • --input-losses — action on losses decoding the input
  • --output-losses — action on losses encoding the output

Both accept ignore, trace, debug (default), info, warn, error, abort, or a .json/.yaml filename to write the losses to. After a lossy conversion, tell the user what was lost rather than silently producing a smaller document.

Decoding options that matter

  • --fine / --coarse — decoding granularity. Fine (the default for most formats) decodes to the finest structure; coarse preserves un-modelled markup in larger blocks and is the default for LaTeX. Use --coarse when fine decoding of a partially supported format mangles structure.
  • --pages N-M / --exclude-pages — page selection for multi-page inputs (e.g. PDFs): --pages 1,3,5-7, --pages 2-, keywords odd/even.
  • --include-structuring / --exclude-structuring — structuring operations that infer document structure (sections, abstracts, references) from loosely structured input. Example: --include-structuring sections-to-abstract.
  • --ignore-artifacts — re-download / re-process instead of using cached intermediate artifacts in .stencila/artifacts/.

Ingesting published papers

convert accepts identifiers directly as the input — a DOI, arXiv id, or PubMed Central id — and fetches the document:

Read the full file on GitHub · 82 lines

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. 2d ago First seen · 82 lines · 81 tokens per session scan A 275545aa84f7

Subscribe to this mod's changes

conversion is a skill published in the GitHub repository stencila/stencila (900 stars, last pushed 3d ago), licensed Apache-2.0. It adds 81 tokens to every session and 899 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

pdf-processing

Extract text from PDFs, fill forms, and merge documents.

PrefectHQ/fastmcp · 11 tokens

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

document-skills/pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

aitytech/agentkits-marketing · 53 tokens

engine-concurrency

Use when adding, reviewing, or debugging parallelism in ArcadeDB engine or server code - covers the dedicated thread pool inventory and sizing, saturation policy, lock-free read patterns, locking rules, Micrometer pool metrics, and the checklist a new pool must satisfy. Also use when deciding where to submit forked…

ArcadeData/arcadedb · 79 tokens

dingtalk-docs

Access DingTalk documents and knowledge spaces through the DingTalk document MCP. Use this skill whenever the user selects a DingTalk knowledge space, folder, or document.

wecode-ai/Wegent · 32 tokens

code-janitor

Reviews, cleans up, and verifies code as production-ready in a folder/package or recent git changes. Groups files by intent, then runs a 5-chain pipeline per group (Simplification → Abstraction → Readability → Documentation → Production-Readiness Sweep) with one supervisor granting an industry-standard…

docs-plus/docs.plus · 136 tokens