Imported from innFactory-AI/company-ai-stack-skills (
en/skills/files/word-odt-skill/SKILL.md). Install upstream withnpx skills add innFactory-AI/company-ai-stack-skills --skill word-odt-skill. Copyright stays with the author.
Word & ODT Skill
Tools for creating Word (.docx) and ODT (.odt) documents, plus reading Word files.
Tools in This Skill
| Tool | Purpose |
|---|---|
create_word |
Create Word (.docx) from Markdown or plain text |
create_word_from_html |
Create Word from HTML with optional CSS |
create_word_from_json |
Create Word from structured JSON elements |
create_odt |
Create ODT from Markdown (LibreOffice/OpenOffice) |
create_odt_from_html |
Create ODT from HTML |
read_word |
Read a Word (.docx) file → text, HTML, Markdown (from base64 or LibreChat file) |
read_word_content |
Read stored Word document content by document_id → markdown-like string |
append_to_word |
Append Markdown content to an existing stored Word document in-place |
replace_word_content |
Replace entire content of an existing stored Word document in-place |
Decision Guide
User wants to create a Word document from...
Markdown / plain text → create_word (most common)
HTML + CSS → create_word_from_html
Structured JSON → create_word_from_json
A template → see templates-skill (create_word_from_template)
User wants OpenDocument format (LibreOffice)...
From Markdown → create_odt
From HTML → create_odt_from_html
From template → see templates-skill (create_odt_from_template)
User wants to READ a Word file...
From base64 / LibreChat attachment → read_word
From stored document (document_id) → read_word_content
User wants to EDIT an existing stored Word document...
Inspect current content first → read_word_content
Add more content at the end → append_to_word (keeps existing content)
Rewrite the whole document → replace_word_content
Tool Usage
create_word
{
"content": "# Annual Report\n\n## Summary\n\nThis year we achieved...",
"filename": "annual_report",
"title": "Annual Report 2025",
"page_size": "A4",
"page_orientation": "portrait",
"header_text": "Confidential",
"footer_text": "Acme Corp",
"show_page_numbers": true,
"page_number_position": "footer",
"page_number_format": "{page} / {pages}",
"include_toc": true,
"folder": "reports"
}
format can be "markdown" (default) or "plain". Note: create_word has no author field — only the HTML/ODT/JSON create tools (create_word_from_html, create_odt, create_odt_from_html) accept author.
create_word_from_html
{
"html": "<h1>Report</h1><p>Content here.</p><table>...</table>",
"css": "h1 { color: #336699; } body { font-family: Arial; }",
"filename": "report",
"title": "My Report",
"show_page_numbers": true,
"folder": "reports"
}
Supports inline images via doc:<documentId> (stored companyFILES doc) or lc:<file_id> (LibreChat attachment) URI: <img src="doc:abc123..." />. The same syntax works in Markdown for create_word:  or .
create_word_from_json
{
"json_content": "{\"elements\":[{\"type\":\"heading\",\"text\":\"Title\",\"level\":1},{\"type\":\"paragraph\",\"text\":\"Content\"},{\"type\":\"table\",\"rows\":[[\"A\",\"B\"],[\"1\",\"2\"]]}]}",
"filename": "document"
}
create_odt
{
"content": "# Letter\n\nDear John,\n\nPlease find enclosed...",
"filename": "letter",
"title": "Formal Letter",
"author": "Jane",
"page_size": "A4",
"header_text": "Private & Confidential",
"show_page_numbers": true,
"folder": "letters"
}
create_odt_from_html
{
"html": "<h1>Document</h1><p>Content</p>",
"filename": "document",
"page_size": "A4"
}
read_word
{
"file_content": "<base64-encoded docx>"
}
Accepts any one of file_content (base64), librechat_file_id (LibreChat attachment), or document_id (stored companyFILES doc). Returns { text, html, markdown }.
read_word_content
Read the content of a stored Word document (created or uploaded via companyFILES). Accepts document_id or librechat_file_id. Returns a markdown-like string plus character count — use this before appending or replacing to understand the current state.
{
"document_id": "uuid-of-stored-word-doc"
}
Returns { document_id, librechat_file_id, filename, character_count, content }.
append_to_word
Append Markdown (or plain text) to an existing Word document. Identify the target with document_id or librechat_file_id. A page break is inserted before the new content by default. The document is updated in-place — same document_id.
{
"document_id": "uuid-of-stored-word-doc",
"content": "## New Section\n\nAdditional content here...",
"format": "markdown",
"add_page_break": true
}
add_page_break defaults to true. Use false to continue on the same page.
replace_word_content
Replace the entire content of an existing Word document with new Markdown. Identify the target with document_id or librechat_file_id. All page layout options (page_size, header_text, etc.) work the same as create_word. The document is updated in-place — same document_id.
{
"document_id": "uuid-of-stored-word-doc",
"content": "# Updated Report\n\nFully rewritten content...",
"format": "markdown",
"page_size": "A4",
"header_text": "Confidential",
"show_page_numbers": true
}
Common Page Options (all create tools)
| Parameter | Values | Default |
|---|---|---|
page_size |
A4, Letter, Legal, A3, A5 |
A4 |
page_orientation |
portrait, landscape |
portrait |
page_number_position |
header, footer |
footer |
page_number_alignment |
left, center, right |
center |
page_number_format |
string with {page} and {pages} |
{page} / {pages} |
Iterative Document Editing Pattern
For long documents that exceed a single context window, build them section by section:
create_word— create the document with the first section; note the returneddocument_idappend_to_word— call repeatedly for each additional section- Optionally
read_word_contentto inspect the current state before continuing replace_word_content— if a section needs to be fully rewritten
All three in-place tools (read_word_content, append_to_word, replace_word_content) operate on existing documents identified by document_id or librechat_file_id (a LibreChat attachment, updated in-place on the shared volume), not on base64 file content.
Key Notes
- All create tools return
{id, filename, downloadUrl, markdownLink}— always rendermarkdownLinkin the reply. - In-place edit tools (
append_to_word,replace_word_content) return the samedocument_idand updatedmarkdownLink. - Inline images can be referenced via
doc:<documentId>orlc:<file_id>in Markdown or HTML — SVG is auto-converted to PNG for Word. - Unset page/header/footer options fall back to the org/user theme defaults (e.g.
defaultPageSize,defaultHeaderText,defaultShowPageNumbers) before the documented hard defaults apply. - For template-based Word creation (placeholders, loops, image injection), use the templates-skill.
- ODT files open natively in LibreOffice and Google Docs.
- Org/user color theme is automatically applied when configured.