3.2 KiB
Office document skills — overview
Read this first if you're not sure which office skill applies, or if the task spans more than one document type.
enkly can create and edit real Word (.docx), Excel (.xlsx) and PowerPoint (.pptx)
files through nine tools (create_document/read_document/edit_document,
create_spreadsheet/read_spreadsheet/edit_spreadsheet,
create_presentation/read_presentation/edit_presentation), plus a
tenth, read-only read_pdf for extracting text out of a PDF someone
uploaded. Every creation/editing tool takes plain structured fields —
text, styles, cell values, slide titles and bullets — and never raw
OOXML/XML. All the file-format work happens server-side in
pkg/officekit; you only ever describe content.
Required first step
Before your first call to any create_*/edit_* office tool in a
conversation, call read_office_skill with the matching skill name
(docx, xlsx, or pptx). Each skill documents the exact shape that
tool family expects and the specific things it can't do yet — that detail
isn't repeated in the tool schema itself, the same way Claude Code's own
document skills work. You don't need to re-read a skill you've already
read earlier in the same conversation. read_pdf is simple enough that
its own tool description is usually enough; read the pdf skill only
if a result looks wrong or someone asks what it can/can't extract.
Picking the right skill
- A letter, report, memo, or any text-first document people will read top to bottom → docx. Need redlining/Track Changes, or converting an existing Markdown document straight into one? Still docx — see its "Redlining" and "Converting Markdown" sections.
- Tabular data, a budget, a grid of numbers, anything with rows and columns, including a workbook with more than one tab → xlsx.
- Slides for a talk, a pitch, or a deck summarizing something in bullet points → pptx.
- Extracting text from an uploaded PDF (a report, contract, paper) →
pdf /
read_pdf. - A request that genuinely needs more than one of these (e.g. "write a report and also a slide deck summarizing it") still gets one skill read per format you'll actually create — read docx and pptx, not one combined skill.
What these tools are not for
There is no create_pdf/edit_pdf — read_pdf is extraction only. If
someone specifically needs a new .pdf produced, say so plainly rather
than silently substituting a .docx or .pptx — don't imply the file
you created is a PDF, and don't invent a conversion step that doesn't
exist.
General working pattern
- Read the matching skill (once per conversation, per format).
- If you're changing an existing file rather than creating a new one,
read_*it first — don't guess at what paragraphs/cells/slides are already there. create_*for a brand-new file (it fails loudly if the path already exists, by design — this is the structured-content analogue ofwrite_filevsedit_file),edit_*for a targeted change to one.- Report back in plain language what you made or changed — the file itself is the deliverable, not a transcript of its contents.