Skip to content

Add ODT skill — OpenDocument text creation and template filling#486

Open
GitHubNewbie0 wants to merge 4 commits intoanthropics:mainfrom
GitHubNewbie0:main
Open

Add ODT skill — OpenDocument text creation and template filling#486
GitHubNewbie0 wants to merge 4 commits intoanthropics:mainfrom
GitHubNewbie0:main

Conversation

@GitHubNewbie0
Copy link

Add ODT skill — OpenDocument text creation and template filling

What this adds

A new skills/odt/ skill enabling Claude to create and fill OpenDocument Format text files (.odt) using odf-kit, a Node.js library built specifically for this purpose.

Why

The current document skills cover docx, pdf, pptx, and xlsx — but not odt. ODT is:

  • The ISO standard document format (ISO/IEC 26300)
  • The native format for LibreOffice, the most widely used open-source office suite
  • Required by many governments (EU, Italy, France, Brazil, India, and others mandate or prefer ODF)
  • Supported by Google Docs, Microsoft Office, Collabora, OnlyOffice

Without this skill, Claude falls back to Python workarounds (odfpy) when users request .odt files — producing correct output but using an ad-hoc approach rather than a purpose-built tool.

What odf-kit provides

Two modes of document generation:

  1. Programmatic creation — Builder API for headings, paragraphs, formatted text, tables (with cell merging, borders, backgrounds), bullet/numbered lists with nesting, images, hyperlinks, bookmarks, tab stops, page layout, headers/footers, page breaks. Fluent method chaining throughout.

  2. Template filling — Load a .odt template created in LibreOffice with {placeholder} syntax, fill with JSON data. Supports loops, conditionals, dot notation for nested data, and automatic healing of XML fragments (LibreOffice splits placeholders across multiple XML spans — odf-kit reassembles them before replacement).

Library details:

  • npm: odf-kit (v0.3.0)
  • GitHub: GitHubNewbie0/odf-kit
  • License: Apache 2.0
  • Runtime dependencies: fflate only (zero transitive dependencies)
  • Test suite: 222 passing tests
  • Node.js: 22+ (ESM only)

Environment requirement

odf-kit would need to be added to the pre-installed global npm packages in Claude's environment, matching the pattern used by docx and pptxgenjs:

npm install -g odf-kit

SKILL.md structure

Follows the established pattern of the docx skill:

  • YAML frontmatter with trigger description listing ODT/ODF/OpenDocument/LibreOffice keywords
  • Quick reference table
  • Programmatic creation section covering the full API with progressive examples (simple → builder callback)
  • Template filling section with syntax reference, loops, conditionals, nesting
  • Validation guidance using LibreOffice headless
  • Critical rules section (async save, ESM only, required image options, etc.)
  • Complete example showing a realistic multi-section report

Checklist

  • SKILL.md with YAML frontmatter (name, description, license)
  • Under 500 lines (474 lines)
  • API examples verified against source
  • Apache 2.0 license
  • No bundled scripts needed (library installs via npm)

@GitHubNewbie0
Copy link
Author

Hi @klazuka — I submitted this PR a while back adding an ODF/ODT skill. It fills the gap between the existing docx, pdf, pptx, and xlsx document skills — ODF is the ISO standard format required by 20+ governments. Would appreciate a look when you have a chance, or guidance on whether community skill PRs are being reviewed. Thank you very much, I appreciate!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant